1.3.85 list

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 use the set listsize command to modify the default settings.

Repeated commands display successive source lines in the same direction through the source file.

Syntax

list [[filename:]location | + | - | +offset | -offset] | [*address]

Where:

filename

Specifies the file.

location

Specifies the location:

line_num

is a line number

first, last

are start and finish line numbers

function

is a function.

+
Displays the source lines after the current location.
-

Displays the source lines before the current location.

offset

Specifies the line offset from the current location.

*address

Specifies the address. This can be either an address or an expression that evaluates to an address.

Default

The default directories for searching are:

  • compilation directory, $cdir

  • current working directory, $cwd

  • current image directory, $idir .

You can use the directory command to define additional search directories.

Example 1-88 Examples

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 
Non-ConfidentialPDF file icon PDF versionARM DUI0452Z
Copyright © 2010-2016 ARM Limited or its affiliates. All rights reserved.