Debug Manual

Table Of Contents
Sample Debug Sessions
Debug Manual421921-003
F-42
Native Program Example
VQ Command
We switch to another selectable segment with the VQ command and modify the data in
the segment in preparation to demonstrate the FN command.
FN Command
We can use the FN command to find the location of a 16-bit word that matches a
value. The value must be aligned on an even byte boundary. The "abcdefg" data we
entered was placed into the selectable segment 1 starting on an odd byte (41), so we
start by looking for a "bc," which is the first character starting on an even byte. We also
modified the selectable segment with an "bc" at offset 0x2ff0, which is an even
address.
Pressing return at the (FN) prompt causes the FN command to continue searching.
After the second return, we encounter the end of the selectable segment, and an error
is reported.
To find out the byte address in hexadecimal form, we can use the AMAP command to
convert the Q-address into a 32-bit address and use the = command to add in the 16-
bit offset. Furthermore, we enter the data found at the location to the = command and
find that the value equals "bc."
050,03,00266-vq 1
050,03,00266-?
USE SEGMENT ID = %000001
BASE STANDARD IN
BASE STANDARD OUT
TERM \M5.$ZTN00.#PTUGRB0
PRV = OFF
050,03,00266- M Q 0x2ff0, 'bc'
050,03,00266-FN Q 0, 'bc'
%000025: 0x6263
050,03,00266 (FN)-
%027760: 0x6263
050,03,00266 (FN)-
** DEBUG error 50: FN stopped searching at the following address: 0x0009FFF8
Address not valid
Note. The FN command specifies the output address offset for 16-bit words in octal.
050,03,00266-AMAP Q 0
Address: 0x00080000
Kind = 0x0013: Unknown
Attributes: none
050,03,00266-= 0x00080000 + (%000025 * 2)