| # Copyright 2018 The Fuchsia Authors. All rights reserved. |
| # Use of this source code is governed by a BSD-style license that can be |
| # found in the LICENSE file. |
| |
| import("//build/test.gni") |
| import("//build/testing/host_test_data.gni") |
| |
| static_library("client") { |
| friend = [ |
| ":tests", |
| ":test_support", |
| ] |
| |
| public = [ |
| "arch_info.h", |
| "breakpoint.h", |
| "breakpoint_location.h", |
| "breakpoint_observer.h", |
| "breakpoint_settings.h", |
| "client_eval_context_impl.h", |
| "client_object.h", |
| "disassembler.h", |
| "exception_settings.h", |
| "execution_scope.h", |
| "filter.h", |
| "finish_physical_frame_thread_controller.h", |
| "finish_thread_controller.h", |
| "frame.h", |
| "frame_fingerprint.h", |
| "function_return_info.h", |
| "job.h", |
| "map_setting_store.h", |
| "memory_dump.h", |
| "pretty_stack_manager.h", |
| "process.h", |
| "process_observer.h", |
| "process_symbol_data_provider.h", |
| "remote_api.h", |
| "session.h", |
| "session_observer.h", |
| "setting_schema.h", |
| "setting_schema_definition.h", |
| "setting_store.h", |
| "setting_store_observer.h", |
| "setting_value.h", |
| "source_file_provider_impl.h", |
| "stack.h", |
| "step_into_specific_thread_controller.h", |
| "step_into_thread_controller.h", |
| "step_mode.h", |
| "step_over_thread_controller.h", |
| "step_thread_controller.h", |
| "step_through_plt_thread_controller.h", |
| "stop_info.h", |
| "substatement.h", |
| "system.h", |
| "system_observer.h", |
| "target.h", |
| "target_impl.h", |
| "target_observer.h", |
| "thread.h", |
| "thread_controller.h", |
| "thread_observer.h", |
| "until_thread_controller.h", |
| ] |
| |
| sources = [ |
| "arch_info.cc", |
| "breakpoint.cc", |
| "breakpoint_action.cc", |
| "breakpoint_impl.cc", |
| "breakpoint_impl.h", |
| "breakpoint_location.cc", |
| "breakpoint_location_impl.cc", |
| "breakpoint_location_impl.h", |
| "breakpoint_settings.cc", |
| "call_site_symbol_data_provider.cc", |
| "call_site_symbol_data_provider.h", |
| "client_eval_context_impl.cc", |
| "client_object.cc", |
| "cloud_storage_symbol_server.cc", |
| "disassembler.cc", |
| "exception_settings.cc", |
| "exception_settings.h", |
| "execution_scope.cc", |
| "filter.cc", |
| "finish_physical_frame_thread_controller.cc", |
| "finish_thread_controller.cc", |
| "frame.cc", |
| "frame_fingerprint.cc", |
| "frame_impl.cc", |
| "frame_impl.h", |
| "frame_symbol_data_provider.cc", |
| "frame_symbol_data_provider.h", |
| "function_return_info.cc", |
| "function_step.cc", |
| "function_step.h", |
| "function_thread_controller.cc", |
| "function_thread_controller.h", |
| "job.cc", |
| "map_setting_store.cc", |
| "memory_dump.cc", |
| "minidump_memory.cc", |
| "minidump_memory.h", |
| "minidump_remote_api.cc", |
| "minidump_remote_api.h", |
| "pretty_frame_glob.cc", |
| "pretty_frame_glob.h", |
| "pretty_stack_manager.cc", |
| "process.cc", |
| "process_impl.cc", |
| "process_impl.h", |
| "process_observer.cc", |
| "process_symbol_data_provider.cc", |
| "remote_api.cc", |
| "remote_api_impl.cc", |
| "remote_api_impl.h", |
| "session.cc", |
| "session.h", |
| "session_observer.cc", |
| "setting_schema.cc", |
| "setting_schema_definition.cc", |
| "setting_store.cc", |
| "setting_value.cc", |
| "socket_connect.cc", |
| "socket_connect.h", |
| "source_file_provider_impl.cc", |
| "stack.cc", |
| "step_into_specific_thread_controller.cc", |
| "step_into_thread_controller.cc", |
| "step_over_thread_controller.cc", |
| "step_thread_controller.cc", |
| "step_through_plt_thread_controller.cc", |
| "substatement.cc", |
| "symbol_server.cc", |
| "system.cc", |
| "target.cc", |
| "target_impl.cc", |
| "thread.cc", |
| "thread_controller.cc", |
| "thread_impl.cc", |
| "thread_impl.h", |
| "until_thread_controller.cc", |
| ] |
| |
| public_deps = [ |
| "//sdk/lib/fit", |
| "//src/developer/debug/ipc:client", |
| "//src/developer/debug/shared", |
| "//src/developer/debug/zxdb/common", |
| "//src/developer/debug/zxdb/expr", |
| "//src/developer/debug/zxdb/symbols", |
| "//src/lib/containers/cpp", |
| "//src/lib/fxl", |
| "//src/lib/llvm:LLVMAArch64Desc", |
| "//src/lib/llvm:LLVMAArch64Disassembler", |
| "//src/lib/llvm:LLVMX86Desc", |
| "//src/lib/llvm:LLVMX86Disassembler", |
| ] |
| |
| deps = [ |
| "//src/developer/debug/unwinder", |
| "//src/lib/elflib", |
| "//src/lib/llvm:LLVMMC", |
| "//src/lib/llvm:LLVMObject", |
| "//third_party/crashpad/client", |
| "//third_party/crashpad/compat", |
| "//third_party/crashpad/snapshot", |
| "//third_party/crashpad/util", |
| "//third_party/mini_chromium/base", |
| "//third_party/rapidjson", |
| ] |
| |
| # TODO(fxbug.dev/58162): delete the below and fix compiler warnings |
| configs += [ "//build/config:Wno-conversion" ] |
| } |
| |
| source_set("test_support") { |
| testonly = true |
| sources = [ |
| "mock_breakpoint.cc", |
| "mock_breakpoint.h", |
| "mock_breakpoint_location.h", |
| "mock_frame.cc", |
| "mock_frame.h", |
| "mock_process.cc", |
| "mock_process.h", |
| "mock_remote_api.cc", |
| "mock_remote_api.h", |
| "mock_stack_delegate.h", |
| "mock_target.cc", |
| "mock_target.h", |
| "mock_thread.h", |
| "remote_api_test.cc", |
| "remote_api_test.h", |
| "test_thread_observer.cc", |
| "test_thread_observer.h", |
| ] |
| |
| public_deps = [ |
| ":client", |
| "//src/developer/debug/zxdb/common:test_support", |
| "//src/developer/debug/zxdb/symbols:test_support", |
| "//third_party/googletest:gtest", |
| ] |
| |
| # TODO(fxbug.dev/58162): delete the below and fix compiler warnings |
| configs += [ "//build/config:Wno-conversion" ] |
| } |
| |
| if (is_host) { |
| host_test_data("test_data") { |
| sources = [ |
| "test_example_minidump.dmp", |
| "test_example_minidump_new_cvrecord.dmp", |
| "test_example_minidump_with_aspace.dmp", |
| ] |
| |
| outputs = [ "$root_out_dir/test_data/zxdb/{{source_file_part}}" ] |
| } |
| |
| host_test_data("fake_home") { |
| sources = [ "test_dummy_file" ] |
| |
| outputs = [ |
| "$root_out_dir/test_data/zxdb/fake_home/.fuchsia/debug/googleapi_auth", |
| ] |
| } |
| |
| host_test_data("sample_core") { |
| sources = [ |
| "//prebuilt/test_data/debug/sample_core/core/0ef11cdd012be885a0a08a2c6914a391c887654a", |
| "//prebuilt/test_data/debug/sample_core/core/0ef11cdd012be885a0a08a2c6914a391c887654a.debug", |
| "//prebuilt/test_data/debug/sample_core/core/4cf7a2a4abe78160de9ff7d641ac1afaf4480a46", |
| "//prebuilt/test_data/debug/sample_core/core/4cf7a2a4abe78160de9ff7d641ac1afaf4480a46.debug", |
| "//prebuilt/test_data/debug/sample_core/core/core.dmp", |
| "//prebuilt/test_data/debug/sample_core/core/ebc1c4a1e012b3d93e8638fc32c02b4ea0968584", |
| "//prebuilt/test_data/debug/sample_core/core/ebc1c4a1e012b3d93e8638fc32c02b4ea0968584.debug", |
| "//prebuilt/test_data/debug/sample_core/core/f7d86af0ee7ec020", |
| "//prebuilt/test_data/debug/sample_core/core/f7d86af0ee7ec020.debug", |
| ] |
| |
| outputs = |
| [ "$root_out_dir/test_data/zxdb/sample_core/core/{{source_file_part}}" ] |
| } |
| } |
| |
| source_set("tests") { |
| testonly = true |
| sources = [ |
| "breakpoint_impl_unittest.cc", |
| "call_site_symbol_data_provider_unittest.cc", |
| "client_eval_context_impl_unittest.cc", |
| "disassembler_unittest.cc", |
| "filter_unittest.cc", |
| "finish_physical_frame_thread_controller_unittest.cc", |
| "finish_thread_controller_unittest.cc", |
| "frame_fingerprint_unittest.cc", |
| "frame_impl_unittest.cc", |
| "function_thread_controller_unittest.cc", |
| "inline_thread_controller_test.cc", |
| "inline_thread_controller_test.h", |
| "job_unittest.cc", |
| "map_setting_store_unittest.cc", |
| "memory_dump_unittest.cc", |
| "minidump_memory_unittest.cc", |
| "minidump_unittest.cc", |
| "pretty_frame_glob_unittest.cc", |
| "pretty_stack_manager_unittest.cc", |
| "process_impl_unittest.cc", |
| "process_symbol_data_provider_unittest.cc", |
| "session_unittest.cc", |
| "setting_schema_unittest.cc", |
| "setting_value_unittest.cc", |
| "source_file_provider_impl_unittest.cc", |
| "stack_unittest.cc", |
| "step_into_specific_thread_controller_unittest.cc", |
| "step_into_thread_controller_unittest.cc", |
| "step_over_thread_controller_unittest.cc", |
| "step_thread_controller_unittest.cc", |
| "step_through_plt_thread_controller_unittest.cc", |
| "string_util_unittest.cc", |
| "substatement_unittest.cc", |
| "symbol_server_unittest.cc", |
| "system_unittest.cc", |
| "target_impl_unittest.cc", |
| "thread_controller_test.cc", |
| "thread_controller_test.h", |
| "thread_controller_unittest.cc", |
| "thread_impl_unittest.cc", |
| "until_thread_controller_unittest.cc", |
| ] |
| |
| data_deps = [ |
| ":fake_home($host_toolchain)", |
| ":sample_core($host_toolchain)", |
| ":test_data($host_toolchain)", |
| ] |
| |
| deps = [ |
| ":client", |
| ":test_support", |
| "//src/developer/debug/zxdb/common:test_support", |
| "//src/developer/debug/zxdb/symbols:test_support", |
| "//third_party/googletest:gtest", |
| |
| # Duplicate the crashpad dependency below to avoid making it into public_deps of :client. |
| "//third_party/crashpad/client", |
| "//third_party/crashpad/compat", |
| "//third_party/crashpad/snapshot", |
| "//third_party/crashpad/util", |
| "//third_party/mini_chromium/base", |
| ] |
| |
| # TODO(fxbug.dev/58162): delete the below and fix compiler warnings |
| configs += [ "//build/config:Wno-conversion" ] |
| } |