This command displays lines of source code surrounding the
current or specified location. The default listing is 10 lines of
source code unless you specify start and finish line numbers. You can
set listsize command to modify the default
Repeated commands display successive source lines in the same direction through the source file.
location | + | - | +
offset | -
offset] | [
Specifies the file.
Specifies the location:
is a line number
are start and finish line numbers
is a function.
Displays the source lines after the current location.
Displays the source lines before the current location.
Specifies the line offset from the current location.
Specifies the address. This can be either an address or an expression that evaluates to an address.
The default directories for searching are:
current working directory,
You can use the
directory command to define
additional search directories.
list main # Set current location to main() and display source list +3 # Increment current location then display source list - # Decrement current location then display source list *0x8120 # Set current location to address 0x8120 and display source list 35 # Set current location to line 35 and display source list dhry_1.c:10,23 # Display source lines 10 to 23 in dhry_1.c list *main # Set current location to address of main and display source