| # Copyright 2026 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. | |
| load("//build/bazel/platforms:constraints.bzl", "HOST_OS_CONSTRAINTS") | |
| load("//build/bazel/rules/cc:fx_cc_library.bzl", "fx_cc_library") | |
| package(default_applicable_licenses = ["//:license"]) | |
| fx_cc_library( | |
| name = "client", | |
| srcs = [ | |
| "analytics.cc", | |
| "analytics_event.cc", | |
| "analytics_reporter.cc", | |
| "arch_info.cc", | |
| "async_task.cc", | |
| "async_task_tree.cc", | |
| "breakpoint.cc", | |
| "breakpoint_action.cc", | |
| "breakpoint_action.h", | |
| "breakpoint_impl.cc", | |
| "breakpoint_impl.h", | |
| "breakpoint_location.cc", | |
| "breakpoint_location_impl.cc", | |
| "breakpoint_location_impl.h", | |
| "breakpoint_settings.cc", | |
| "call_function_thread_controller.cc", | |
| "call_function_thread_controller_arm64.cc", | |
| "call_function_thread_controller_arm64.h", | |
| "call_function_thread_controller_x64.cc", | |
| "call_function_thread_controller_x64.h", | |
| "call_site_symbol_data_provider.cc", | |
| "call_site_symbol_data_provider.h", | |
| "client_eval_context_impl.cc", | |
| "client_object.cc", | |
| "disassembler.cc", | |
| "download_manager.cc", | |
| "elf_memory_region.cc", | |
| "exception_settings.cc", | |
| "execution_scope.cc", | |
| "fdf_dispatcher_task_provider.cc", | |
| "file_memory_region.cc", | |
| "filter.cc", | |
| "finish_physical_frame_thread_controller.cc", | |
| "finish_thread_controller.cc", | |
| "frame.cc", | |
| "frame_fingerprint.cc", | |
| "frame_impl.cc", | |
| "frame_symbol_data_provider.cc", | |
| "frame_symbol_data_provider.h", | |
| "fuchsia_async_rust_task_provider.cc", | |
| "function_return_info.cc", | |
| "function_step.cc", | |
| "function_step.h", | |
| "function_thread_controller.cc", | |
| "function_thread_controller.h", | |
| "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_stack_manager.cc", | |
| "process.cc", | |
| "process_impl.cc", | |
| "process_observer.cc", | |
| "process_symbol_data_provider.cc", | |
| "remote_api_impl.cc", | |
| "remote_api_impl.h", | |
| "remote_unwinder.cc", | |
| "remote_unwinder.h", | |
| "session.cc", | |
| "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", | |
| "symbol_server_impl.cc", | |
| "system.cc", | |
| "target.cc", | |
| "target_impl.cc", | |
| "thread.cc", | |
| "thread_controller.cc", | |
| "thread_impl.cc", | |
| "tracepoint.cc", | |
| "tracepoint_capture.cc", | |
| "until_process_controller.cc", | |
| "until_thread_controller.cc", | |
| ], | |
| hdrs = [ | |
| "analytics.h", | |
| "analytics_event.h", | |
| "analytics_reporter.h", | |
| "arch_info.h", | |
| "async_task.h", | |
| "async_task_provider.h", | |
| "async_task_tree.h", | |
| "breakpoint.h", | |
| "breakpoint_location.h", | |
| "breakpoint_observer.h", | |
| "breakpoint_settings.h", | |
| "call_function_thread_controller.h", | |
| "client_eval_context_impl.h", | |
| "client_object.h", | |
| "component_observer.h", | |
| "disassembler.h", | |
| "download_manager.h", | |
| "download_observer.h", | |
| "elf_memory_region.h", | |
| "exception_settings.h", | |
| "execution_scope.h", | |
| "fdf_dispatcher_task_provider.h", | |
| "file_memory_region.h", | |
| "filter.h", | |
| "finish_physical_frame_thread_controller.h", | |
| "finish_thread_controller.h", | |
| "frame.h", | |
| "frame_fingerprint.h", | |
| "frame_impl.h", | |
| "fuchsia_async_rust_task_provider.h", | |
| "function_return_info.h", | |
| "map_setting_store.h", | |
| "memory_dump.h", | |
| "pretty_frame_glob.h", | |
| "pretty_stack_manager.h", | |
| "process.h", | |
| "process_impl.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", | |
| "symbol_server.h", | |
| "symbol_server_impl.h", | |
| "system.h", | |
| "system_observer.h", | |
| "target.h", | |
| "target_impl.h", | |
| "target_observer.h", | |
| "thread.h", | |
| "thread_controller.h", | |
| "thread_impl.h", | |
| "thread_observer.h", | |
| "tracepoint.h", | |
| "tracepoint_capture.h", | |
| "tracepoint_spec.h", | |
| "until_process_controller.h", | |
| "until_thread_controller.h", | |
| ], | |
| # GN only: lets these targets include the non-public headers in `srcs`. | |
| friend = [ | |
| ":tests", | |
| ":test_support", | |
| ], | |
| implementation_deps = [ | |
| "//src/developer/debug/zxdb/format", | |
| "//src/lib/elflib", | |
| "//src/lib/llvm/host:LLVMMC", | |
| "//src/lib/llvm/host:LLVMObject", | |
| "//src/lib/unwinder", | |
| # Crashpad defines top-level Bazel targets rather than per-subdirectory packages. | |
| "//third_party/crashpad:compat", # @bazel2gn:path_overwrite://third_party/crashpad/src/compat | |
| # Crashpad defines top-level Bazel targets rather than per-subdirectory packages. | |
| "//third_party/crashpad:snapshot", # @bazel2gn:path_overwrite://third_party/crashpad/src/snapshot | |
| # Crashpad defines top-level Bazel targets rather than per-subdirectory packages. | |
| "//third_party/crashpad:util", # @bazel2gn:path_overwrite://third_party/crashpad/src/util | |
| # mini_chromium defines top-level Bazel targets rather than per-subdirectory packages. | |
| "//third_party/mini_chromium:base", # @bazel2gn:path_overwrite://third_party/mini_chromium/src/base | |
| "//third_party/rapidjson", | |
| "//third_party/zstd", | |
| ], | |
| # Host-only in Bazel (depends on host-only //src/developer/debug/zxdb/symbols | |
| # and //src/lib/llvm/host:*); keep unguarded in BUILD.gn. | |
| # @bazel2gn:skip | |
| target_compatible_with = HOST_OS_CONSTRAINTS, | |
| visibility = [ | |
| "//src/developer/debug:__subpackages__", | |
| "//tools/fidlcat:__pkg__", | |
| "//tools/fidlcat/lib:__pkg__", | |
| "//tools/symbolizer:__pkg__", | |
| ], | |
| deps = [ | |
| "//sdk/lib/fit", | |
| "//src/developer/debug/ipc", | |
| "//src/developer/debug/shared", | |
| "//src/developer/debug/zxdb/common", | |
| "//src/developer/debug/zxdb/expr", | |
| "//src/developer/debug/zxdb/symbols", | |
| "//src/lib/analytics/cpp/core_dev_tools", | |
| "//src/lib/containers/cpp", | |
| "//src/lib/fxl", | |
| "//src/lib/llvm/host:LLVMAArch64Desc", | |
| "//src/lib/llvm/host:LLVMAArch64Disassembler", | |
| "//src/lib/llvm/host:LLVMARMDesc", | |
| "//src/lib/llvm/host:LLVMARMDisassembler", | |
| "//src/lib/llvm/host:LLVMRISCVDesc", | |
| "//src/lib/llvm/host:LLVMRISCVDisassembler", | |
| "//src/lib/llvm/host:LLVMX86Desc", | |
| "//src/lib/llvm/host:LLVMX86Disassembler", | |
| "//src/lib/uuid", | |
| ], | |
| ) | |
| fx_cc_library( | |
| name = "test_support", | |
| testonly = True, | |
| srcs = [ | |
| "mock_breakpoint.cc", | |
| "mock_frame.cc", | |
| "mock_process.cc", | |
| "mock_remote_api.cc", | |
| "mock_target.cc", | |
| "remote_api_test.cc", | |
| "test_thread_observer.cc", | |
| ], | |
| hdrs = [ | |
| "mock_async_task.h", | |
| "mock_breakpoint.h", | |
| "mock_breakpoint_location.h", | |
| "mock_frame.h", | |
| "mock_process.h", | |
| "mock_remote_api.h", | |
| "mock_stack_delegate.h", | |
| "mock_symbol_server.h", | |
| "mock_target.h", | |
| "mock_thread.h", | |
| "remote_api_test.h", | |
| "test_thread_observer.h", | |
| ], | |
| # Host-only in Bazel (depends on host-only :client); keep unguarded in BUILD.gn. | |
| # @bazel2gn:skip | |
| target_compatible_with = HOST_OS_CONSTRAINTS, | |
| visibility = [ | |
| "//src/developer/debug/zxdb/console:__pkg__", | |
| "//src/developer/debug/zxdb/debug_adapter:__pkg__", | |
| "//tools/fidlcat/interception_tests:__pkg__", | |
| ], | |
| deps = [ | |
| ":client", | |
| "//src/developer/debug/zxdb/common:test_support", | |
| "//src/developer/debug/zxdb/symbols:test_support", | |
| "@com_google_googletest//:gtest", | |
| ], | |
| alwayslink = True, | |
| ) |