blob: e42524af7834a52a49ccf07117eba2b33c472df6 [file] [log] [blame]
# 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.
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",
"execution_scope.h",
"filter.h",
"finish_physical_frame_thread_controller.h",
"finish_thread_controller.h",
"frame.h",
"frame_fingerprint.h",
"job.h",
"job_context.h",
"map_setting_store.h",
"memory_dump.h",
"mock_stack_delegate.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",
"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",
"client_eval_context_impl.cc",
"client_object.cc",
"cloud_storage_symbol_server.cc",
"curl.cc",
"disassembler.cc",
"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",
"job.cc",
"job_context.cc",
"job_context_impl.cc",
"job_context_impl.h",
"job_impl.cc",
"job_impl.h",
"map_setting_store.cc",
"memory_dump.cc",
"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",
"substatement.cc",
"symbol_server.cc",
"system.cc",
"system_impl.cc",
"system_impl.h",
"target.cc",
"target_impl.cc",
"thread.cc",
"thread_controller.cc",
"thread_impl.cc",
"thread_impl.h",
"until_thread_controller.cc",
]
public_deps = [
"//src/developer/debug/ipc:client",
"//src/developer/debug/shared",
"//src/developer/debug/third_party/libunwindstack",
"//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",
"//third_party/curl:libcurl",
"//zircon/public/lib/fit",
]
deps = [
"//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/third_party/mini_chromium:base",
"//third_party/crashpad/util",
"//third_party/rapidjson",
]
}
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_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",
]
}
copy("copy_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}}" ]
}
copy("copy_fake_home") {
sources = [ "test_dummy_file" ]
if (is_mac) {
outputs = [ "$root_out_dir/test_data/zxdb/fake_home/Library/Caches/com.googlesource.fuchsia.zxdb/googleapi_auth" ]
} else {
outputs =
[ "$root_out_dir/test_data/zxdb/fake_home/.cache/zxdb/googleapi_auth" ]
}
}
copy("copy_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",
"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",
"inline_thread_controller_test.cc",
"inline_thread_controller_test.h",
"job_context_impl_unittest.cc",
"map_setting_store_unittest.cc",
"memory_dump_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",
"string_util_unittest.cc",
"substatement_unittest.cc",
"symbol_server_unittest.cc",
"system_impl_unittest.cc",
"target_impl_unittest.cc",
"thread_controller_test.cc",
"thread_controller_test.h",
"thread_controller_unittest.cc",
"thread_impl_unittest.cc",
]
data_deps = [
":copy_fake_home",
":copy_sample_core",
":copy_test_data",
]
metadata = {
test_runtime_deps = get_target_outputs(":copy_test_data") +
get_target_outputs(":copy_fake_home") +
get_target_outputs(":copy_sample_core")
}
deps = [
":client",
":test_support",
"//src/developer/debug/zxdb/common:test_support",
"//src/developer/debug/zxdb/symbols:test_support",
"//third_party/googletest:gtest",
]
}