list命令
命令功能
展示当前程序暂停位置的前后若干行代码。
命令格式
list [-h | --help] [-r RANK_ID | --rank RANK_ID] [-t THREAD_INDEX | --thread THREAD_INDEX] [-l LINE_NUMBER | --lines LINE_NUMBER]
list命令可简写为l。
参数说明
参数 |
参数选项 |
参数说明 |
|---|---|---|
-h/--help |
- |
可选参数,获取帮助信息。 |
-r/--rank |
RANK_ID |
可选参数,指定rank ID。 |
-t/--thread |
THREAD_INDEX |
可选参数,指定线程索引。 |
-l/--lines |
LINE_NUMBER |
可选参数,指定当前暂停位置前后代码行数,不包括当前行。 |
使用示例
执行以下命令,查看list支持的功能信息:
1 | list -h
|
返回信息如下:
OVERVIEW
Run this command to display the code context of the current pause location of the application.
USAGE
list
[-h | --help]
[-r RANK_ID | --rank RANK_ID]
[-l LINE_NUMBER | --lines LINE_NUMBER]
OPTIONS
-h, --help
Get help information.
-r, --rank RANK_ID
Specifies the rank ID of the source code to be queried.
-l, --lines LINE_NUMBER
Specifies the number of lines of code before and after the program pause position to be displayed.
EXAMPLE
# Displays the 10 lines of code before and after the pause location of the rank 0 application.
list -l 10 -r 0
父主题: 调试状态命令