Address expressions

An address_expression is a flexible MULTI command language construct which allows many ways of referring to a location within your program.

Examples of address_expression's using the e command:
Displaying variables
Expression Meaning
e 10
Examine line number 10 in current procedure or file.
e +10
Examine 10 lines from current position.
e 0x1234
Examine address 0x1234.
e proc2#4
Examine (procedure-relative) line 4 of procedure proc2.
e "file3"#4
Examine (file-relative) line 4 of file file3.
e "file3"#proc2#4
Examine (procedure-relative) line 4 of procedure proc2 in file file3.
e (expression)
Examine the address which is the value of the expression.
e ($ret( ))
Examine the return address (exit point) of the current procedure.
e 1b
Examine breakpoint with id equal to 1.
e %bp_label
Examine the location where breakpoint with label equal to bp_label.
e 2_
Examine stack level 2.
e "file3"#proc2##label4
Examine C Label label4 in procedure proc2 in file file3.
e proc2##label4
Examine C Label label4 in procedure proc2.
e ##label4
Examine C Label label4 in current procedure.
e *
Examine procedure list (wild card search).

Procedure-relative vs file-relative line numbers

The configuration option procRelativeLines controls whether or not a line number given in address expressions is to be interpreted as file-relative or procedure-relative. The default is to use procedure-relative line numbers.

Procedure relative:
Procedure-relative
Expression Meaning
e proc3#4
Examine (procedure-relative) line 4 of procedure proc3.
e 4
Examine source code at line number 4 in the current procedure.
e #4
Examine source code at line number 4 in the current file.

File-relative (Non-procedure relative):
File-relative
Expression Meaning
e proc3#4
Examine (file-relative) line 4 of file containing procedure proc3. (The line must exist within proc3).
e 4
Examine source code at line number 4 in the current file.
e #4
Examine source code at line number 4 in the current procedure.

See "Line numbers".

Related topic:


Previous

Next



Copyright © 1999, Green Hills Software. All rights reserved.