/sys$common/syshlp/DBG$HELP.HLB DEBUG, Address Expressions *Conan The Librarian |
Several debugger commands require that you specify an address expression. An address expression is an entity that denotes a memory address or a register. Commands for which you specify address expressions are: (SET,ACTIVATE,DEACTIVATE,CANCEL) BREAK (SET,ACTIVATE,DEACTIVATE,CANCEL) TRACE (SET,ACTIVATE,DEACTIVATE,CANCEL) WATCH EVALUATE/ADDRESS EXAMINE DEPOSIT (at the left of the equal sign) In general, you can specify address expressions using the syntax of the currently set language. For example: DBG> EXAMINE A(1) ! FORTRAN DBG> SET WATCH A[1] ! Pascal DBG> EXAMINE C OF R ! COBOL In addition, you can specify address expressions numerically, and you can also use the built-in symbols %LINE and %LABEL to refer to code locations: DBG> EXAMINE 512 DBG> SET BREAK %LINE 10 You can also use the following operators to specify addresses that you might not be able to access by name (nonsymbolic addresses): + - * Arithmetic operators / @ or . Indirection <p,s> Select bit field For example, examine the instruction 3 bytes after line 10: DBG> EXAMINE %LINE 10 + 3 Examine the location pointed to by P: DBG> EXAMINE @P Do not confuse an address expression with a language expression, which denotes a value rather than a program location. The following examples show how the same command parameter is treated either as an address expression or as a language expression depending on the command: Show the address of the variable X (address expression): DBG> EVALUATE/ADDR X 512 Show the current value of X (address expression): DBG> EXAMINE X X: 0 Evaluate X (language expression): DBG> EVALUATE X 0 Evaluate X+1 (language expression): DBG> EVALUATE X+1 1 Show value at location X plus 1 byte (address expression): DBG> EXAMINE X+1 513: 0
Additional Information (explode) :
|