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

Displaying the memory maps

To display the contents of the memory maps, use the $m command. The command has the following form:

$m [ segment ]

In the above command line segment is the number of a segment used in the program.

The command displays the maps for all segments in the program using information taken from either the program and core files or directly from memory.

If adb is started but the program has not executed, the $m command display has the following form:

Text Segments	 File - 'sample'		
Seg #	File Pos	Vir Size	Phys Size	Reloc Base
0x3f	0x400		0xb48		0xb48		0x0

Data Segments File - 'sample' Seg # File Pos Vir Size Phys Size Reloc Base 0x47 0x1000 0xe90 0x460 0x1880000

Each entry provides the segment number, file position, and physical size of a segment. The segment number is the starting address of the segment. The file position is the offset from the start of the file to the contents of the segment. The physical size is the number of bytes the segment occupies in the program or core file. The filenames to the right of the display are the program and core filenames.

If the program is executed, the command displays the following form:

Text Segments	 File - 'sample'		
Seg #	File Pos	Vir Size	Phys Size	Reloc Base
0x3f	0x400		0xb48		0xb48		0x0	

Data Segments File - 'sample' Seg # File Pos Vir Size Phys Size Reloc Base 0x47 0x1000 0x1880e90 0x460 0x1880000

Virtual size is the number of bytes the segment occupies in memory. This size is sometimes different from the size of the segment in the file and will often change as the program is executed. This is due to expansion of the stack or allocation of additional memory during program execution. The filenames to the right always name program files. The file position value is ignored.

Giving segment numbers

By providing a segment number with the command, adb displays information only about that segment. For example, the following command displays a map for segment 63 only:

   $m 63

Next topic: Changing the memory map
Previous topic: Using the adb memory maps

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