dbx 命令
dbx 命令用于启动 dbx。
本地模式语法
- dbx options program_name
调试 program_name。
- dbx options program_name core
使用核心转储文件 core 调试 program_name。
- dbx options program_name process_id
使用进程 ID process_id 调试 program_name。
- dbx options - process_id
调试进程 ID process_id;dbx 使用 /proc 查找程序。
- dbx options - core
使用核心转储文件 core 进行调试;另请参见debug 命令。
- dbx options -r program_name arguments
使用参数 arguments 运行 program_name;如果出现异常终止,则开始调试 program_name,否则退出。
其中:
program_name 是要调试的程序的名称。
process_id 是运行中的进程的进程 ID。
arguments 是要传递给程序的参数。
options 在选项中进行了介绍。
Java 模式语法
- dbx options program_name{.class | .jar}
调试 program_name。
- dbx options program_name{.class | .jar} process_id
使用进程 ID process_id 调试 program_name。
- dbx options - process_id
调试进程 ID process_id;dbx 使用 /proc 查找程序。
- dbx options -r program_name{.class | .jar} arguments
使用参数 arguments 运行 program_name;如果出现异常终止,则开始调试 program_name,否则退出。
其中:
program_name 是要调试的程序的名称。
process_id 是运行中的进程的进程 ID。
arguments 是要传递给程序(而不是 JVM 软件)的参数。
options 在选项中进行了介绍。
选项
对于本地模式和 Java 模式,options 均如下所示:
-B |
抑制所有消息;返回时带有正在被调试的程序的退出代码。 |
-c commands |
执行 commands 后,提示输入。 |
-C |
|
-d |
与 -s 一起使用,读取后删除 file。 |
-e |
回显输入命令。 |
-f |
强制装入核心转储文件,即使该文件不匹配。 |
-h |
输出有关 dbx 的用法帮助。 |
-I
dir |
|
-k |
保存并恢复键盘转换状态。 |
-q |
禁止关于读取 stabs 的消息。 |
-r |
运行程序;如果程序正常退出,则退出。 |
-R |
输出 dbx 的自述文件。 |
-s file |
使用 file 而非
/current_directory/.dbxrc 或 $HOME/ .dbxrc 作为启动文件。 |
-S |
禁止读取初始化文件 /installation_directory/lib/dbxrc。 |
-V |
输出 dbx 的版本信息。 |
-w n |
执行 where 命令时跳过 n 帧。 |
-x exec32 |
运行
32 位 dbx 二进制文件,而不是运行 64 位操作系统的系统上缺省情况下运行的 64 位 dbx 二进制文件。 |
-- |
标记选项列表的末尾;如果程序名以短划线开头,则使用此选项。 |
|