zxdb Integration (ffx_zxdb)This crate contains the host Rust library that integrates zxdb with ffx subtools (ffx debug, ffx component, and ffx test).
The crate root (src/README.md) re-exports these entry points:
CommandBuilder: Builder for zxdb command-line arguments.Debugger and debugger::DebuggerSession: High-level controller that spawns zxdb and manages the background socket-forwarding task.debug_agent::{DebugAgentSocket, DebuggerProxy}: Local UNIX domain socket listener and FDomain FIDL proxy wrapper.spawn_forward_task and forward_to_agent: Asynchronous and blocking connection forwarders between UNIX domain sockets and FDomain FIDL sockets.util::{Agent, get_all_debug_agents, print_debug_agents}: Helpers that query and print active target DebugAgent instances.Callers and implementations must preserve these invariants:
DebugAgentSocket::forward_one_connection accepts local UNIX socket connections before opening remote FDomain FIDL socket connections.DebuggerSession keeps background socket-forwarding tasks alive for its entire lifetime, and Debugger::start blocks until zxdb sends SIGUSR1.*_rust_fdomain bindings, fho::Result/thiserror in new or refactored code, and #[fuchsia::test]).Using ffx_zxdb produces these host and target side effects:
std::env::temp_dir().zxdb host binary, and calls fuchsia.debugger FIDL methods over FDomain.Run this command to build ffx_zxdb:
fx build //src/developer/debug/ffx_zxdb