Debug Manual

Table Of Contents
Debug Command Overview
Debug Manual421921-003
3-16
Address Syntax
For example, to display (in character form) %20 bytes pointed to by the string
pointer SDB^BUF,
.
SDB^BUF VARIABLE STRING G+020 INDIRECT
.
this command is entered:
215,00,0003500-A20S,10
000116: .fr. .ed. . . . . . . . . . . . .
This converts the string address to a word address and displays %10 words
starting at that location ( G[%116] ).
Displaying Variables in Extended Data Segments
The command syntax for displaying variables in extended data segments
(selectable segments or flat segments) is similar to that for setting breakpoints in
extended data segments.
To display data in a flat segment, use the N address mode to display a 32-bit RISC
address within the flat segment range. You can obtain the address of a flat
segment within your program by using the ALLOCATESEGMENT or
SEGMENT_ALLOCATE_ procedure call. For example, assuming 0x42000A6F is
an address within a flat segment, this command displays the contents of the word
at that address:
106,05,00134-DN 0x42000A6F
42000A6F: 0x0000007E
Addresses in selectable segments can be expressed in a number of ways.
For example, suppose that, as in the third example in Set Unconditional Code
Breakpoint on page 4-7, the programmer has allocated a selectable segment by
using either the ALLOCATESEGMENT or SEGMENT_ALLOCATE_ procedure,
giving it segment ID 10. Again suppose that the segment has not been brought into
use by a call to either USESEGMENT or SEGMENT_USE_, and that no other
segment is in use. This time, rather than set a breakpoint, the programmer wants
to display the contents of word 80 of that segment. First a VQ command is needed:
215,00,00035-VQ#10
215,00,00035-
Then this command displays the contents of the 16-bit word 80:
215,00,00035-DQ#80
%000080: %177777
The same location could be displayed using extended addressing, with any of
these commands:
d 100 + #80<<1
d 2000000 + #80*2
d 2000000 + #160
d 2000240
d 10240
d 10#160