zxdb [ <options> ]
For information on using the debugger, type "help" at the interactive prompt.
選項:
--analytics-show
Show the opt-in/out status for collection of analytics and what we collect when opt-in.
--analytics=enable|disable
Enable or disable collection of analytics:
--analytics=enable Enable collection of analytics and save the
status in a configuration file.
--analytics=disable Disable collection of analytics and save the
status in a configuration file.
--attach=<koid|filter>
-a <koid|filter>
Attaches to the given process or creates a filter that matches current
and future processes. The argument will be parsed in the same way as the
"attach" command in the console. Multiple attaches can be specified to
match more than one process.
--auto-attach-limbo
Enables automatically attaching to all processes found in Process Limbo
upon successful connection.
--build-id-dir=<path>
Adds the given directory to the symbol search path. Multiple
--build-id-dir switches can be passed to add multiple directories.
The directory must have the same structure as a .build-id directory,
that is, each symbol file lives at xx/yyyyyyyy.debug where xx is
the first two characters of the build ID and yyyyyyyy is the rest.
However, the name of the directory doesn't need to be .build-id.
--connect=<host>:<port>
-c <host>:<port>
Attempts to connect to a debug_agent running on the given host/port.
--console-mode
The style in which zxdb interacts with the console. Valid values are
"shell" (default), "embedded", and "embedded-interactive".
--core=<filename>
Attempts to open a core file for analysis.
--debug-adapter-port=<port>
Uses this port number to serve debug adapter protocol.
By default 15678 is used.
--debug-mode
-d
Output debug information about zxdb.
Should only be useful for people developing zxdb.
--embedded-mode-context
A short contextual string shown to the user when zxdb breaks out of
Embedded mode. This is typically something that the user would expect
to need to debug e.g. "test failure" or "crash". If unspecified, the
exception that caused the debugger to appear will be shown.
--enable-debug-adapter
Starts the debug adapter that serves debug adapter protocol.
This is useful for connecting the debugger with an IDE.
--execute=<command>
-e <command>
Execute one zxdb command. Multiple commands will be executed sequentially.
--help
-h
Prints all command-line switches.
--ids-txt=<path>
Adds the given file to the symbol search path. Multiple --ids-txt
switches can be passed to add multiple files. The file, typically named
"ids.txt", serves as a mapping from build ID to symbol file path and
should contain multiple lines in the format of "<build ID> <file path>".
--local
-l
Runs the built-in local debug_agent for debugging the local system. Only
supported on x64 Linux.
In this mode, any non-switch parameters (or anything after '--') will be
treated as the program to debug and its parameters.
--script-file=<file>
-S <file>
Reads a script file from a file. The file must contains valid zxdb
commands as they would be input from the command line. They will be
executed sequentially.
--signal-when-ready=<pid>
Send SIGUSR1 to pid when ready for interactive commands.
--stream-file=<path>
Stream the contents of the given file, usually a pipe, to the console.
--symbol-cache=<path>
Directory where we can keep a symbol cache, which defaults to
~/.fuchsia/debug/symbol-cache. If a symbol server has been specified,
downloaded symbols will be stored in this directory. The directory
structure will be the same as a .build-id directory, and symbols will
be read from this location as though you had specified
"--build-id-dir=<path>".
--symbol-index=<path>
Populates --ids-txt and --build-id-dir using the given symbol-index file,
which defaults to ~/.fuchsia/debug/symbol-index.json. The file should be
created and maintained by the "symbol-index" host tool.
--symbol-path=<path>
-s <path>
Adds the given directory or file to the symbol search path. Multiple
-s switches can be passed to add multiple locations. When a directory
path is passed, the directory will be enumerated non-recursively to
index all ELF files. When a file is passed, it will be loaded as an ELF
file (if possible).
--symbol-server=<url>
Adds the given URL to symbol servers. Symbol servers host the debug
symbols for prebuilt binaries and dynamic libraries.
--unix-connect=<filepath>
-u <filepath>
Attempts to connect to a debug_agent through a unix socket.
--version
-v
Prints the version.