DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH PRINT BOOK
 
adb: absolute debugger

Validating addresses

adb checks each address to ensure it is valid. To validate the address, adb uses the segment number, file position, and size values in each map entry. If an address is correct, adb carries out the command; otherwise, it displays an error message.

The first step adb takes when validating an address is to check the segment value to make sure it belongs to the appropriate map. Segments used with the ? command must appear in the text segments map; segments used with the / command must appear in the data segments map. If the value does not belong to the map, adb displays a bad segment error.

The next step is to check the offset to see if it is in range. The offset must be within the following range:

   0 <= offset <= segment-size
If it is not in this range, adb displays a bad address error.

If adb is currently accessing memory, the validating segment and offset are used to access a memory location and no other processing takes place. If adb is accessing files, it computes an effective file address like the following, then uses this effective address to read from the corresponding file:

   effective-file-address = offset + file-position

Next topic: Miscellaneous features
Previous topic: Creating new map entries

© 2003 Caldera International, Inc. All rights reserved.
SCO OpenServer Release 5.0.7 -- 11 February 2003