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