The list command displays lines of a source file. It has the same syntax and functionality in native mode and in Java mode.
The default number of lines listed, N, is controlled by the dbx output_list_size environment variable.
List N lines.
List line number number.
List next N lines.
List next n lines.
List previous N lines.
List previous n lines.
List lines from n1 to n2.
List from n1 to n1 + N.
List from n1 to n1 + n2.
List from n1-N to n1.
List from n1-n2 to n1.
List the start of the source for function. list function changes the current scope. See Program Scope for more information.
List the start of the file filename.
List file filename from line n.
where:
filename is the file name of a source code file.
function is the name of a function to display.
number is the number of a line in the source file.
n is a number of lines to display.
n1 is the number of the first line to display.
n2 is the number of the last line to display. Where appropriate, the line number can be ”$” which denotes the last line of the file. Comma is optional.
Intermix source lines and assembly code.
List N (or n) lines (window) around line or function. This option is not allowed in combination with the plus sign (+) or minus sign (-) syntax or when two line numbers are specified.
When used with a function name, lists the entire function. When used without parameters, lists the remains of the current visiting function, if any.
list // list N lines starting at current line list +5 // list next 5 lines starting at current line list - // list previous N lines list -20 // list previous 20 lines list 1000 // list line 1000 list 1000,$ // list from line 1000 to last line list 2737 +24 // list line 2737 and next 24 lines list 1000 -20 // list line 980 to 1000 list test.cc:33 // list source line 33 in file test.cc list -w // list N lines around current line list -w8 ”test.cc”func1 // list 8 lines around function func1 list -i 500 +10 // list source and assembly code for line 500 to line 510