Intel XENIX 286 Programmers Guide (86) - Tenox.tc
Intel XENIX 286 Programmers Guide (86) - Tenox.tc Intel XENIX 286 Programmers Guide (86) - Tenox.tc
XENIX Programming adb: Program Debugger 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 you have started adb but have not executed the program, the $m command display has the form Text Segments Seg # File Pos 63. 32. 71. 2080. Data Segments Seg # File Pos 39. 2736. Phys Size 2048. 656. Phys Size 242. 'sample' -File 'core' -File Each entry gives the segment num ber, 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 nu mber of bytes the segment occupies in the program or core file. The file names to the right of the display are the program and core file names. If you have executed the program, the command display has the form Text Segments Seg # File Pos 63. 32. 71. 2080. Data Segments Seg # File Pos 39. 2736. Vir Size 2048. 656. Vir Size 456. 'sample' - Memory 'sample' - Memory where virtual size is the number of bytes the segment occupies in memory. This size is sometimes different than the size of the segment in the file and will often change as you execute the program. This is due to expansion of the stack or allocation of additional memory during program execution. The file names to the right always name the program file. The file position value is ignored. If you give a segment number with the command, adb displays information only about that segment. For example, the command $m 63 displays a map for segment 63 only. The display has the form Segment #= 63. Type = Text File position = 32. Physical Size = 2048. 6-23
adb: Program Debugger XENIX Programming Changing the Memory Map You can change the values of a memory map by using the ?m and /m commands. These commands assign specified values to the corresponding map entries. The commands have the form and ?m segment-number file-position size /m segment-number file-position size where segment-number gives the number of the segment map you wish to change, fileposition gives the offset in the file to the beginning of the given address, and size gives the segment size in bytes. ?m assigns values to a text segment entry and /m to a data segment entry. For example, the following command changes the file position for segment 63 in the text map to Ox2000: ?m 63 Ox2000 The command /m 39 OxO changes the file position for segment 39 in the data map to 0. Creating New Map Entries You can create new segment maps and add them to your memory map by using the ?M and /M commands. Unlike ?m and /m, these commands create a new map instead of changing an existing one. These commands have the form and ?M segment-number file-position size /M segment-number file-position size where segment-number gives the number of the segment map you wish to create, fileposition gives the offset in the file to the beginning of the given address, and size gives the segment size in bytes. ?M creates a text segment entry and /M creates a data segment entry. The segment number must be unique. You cannot create a new map entry that has the same number as an existing one. The ?M and /M commands are especially useful if you wish to access segments otherwise allocated to your program. For example, the command ?M 71 0 2504 creates a text segment entry for segment 71 with size 2504 bytes. 6-24
- Page 69 and 70: SCCS: Source Code Control System XE
- Page 71 and 72: SCCS: Source Code Control System XE
- Page 73 and 74: SCCS: Source Code Control System XE
- Page 75 and 76: SCCS: Source Code Control System XE
- Page 77 and 78: SCCS: Source Code Control System XE
- Page 79 and 80: SCCS: Source Code Control System XE
- Page 81 and 82: SCCS: Source Code Control System XE
- Page 83 and 84: SCCS: Source Code Control System XE
- Page 85 and 86: SCCS: Source Code Control System XE
- Page 87 and 88: SCCS: Source Code Control System XE
- Page 89 and 90: SCCS: Source Code Control System XE
- Page 91 and 92: SCCS: Source Code Control System XE
- Page 93 and 94: SCCS: Source Code Control System XE
- Page 95 and 96: SCCS: Source Code Control System XE
- Page 98 and 99: CHAPTER 6 adb: PROGRAM DEBUGGER adb
- Page 100 and 101: XENIX Programming adb: Program Debu
- Page 102 and 103: XENIX Programming adb: Program Debu
- Page 104 and 105: XENIX Programming adb: Program Debu
- Page 106 and 107: XENIX Programming adb: Program Debu
- Page 108 and 109: XENIX Programming adb: Program Debu
- Page 110 and 111: XENIX Programming adb: Program Debu
- Page 112 and 113: XENIX Programming adb: Program Debu
- Page 114 and 115: XENIX Programming adb: Program Debu
- Page 116 and 117: XENIX Programming int fcnt,gcnt,hcn
- Page 118 and 119: XENIX Programming adb: Program Debu
- Page 122 and 123: XENIX Programming adb: Program Debu
- Page 124 and 125: XENIX Programming adb: Program Debu
- Page 126 and 127: XENIX Programming adb: Program Debu
- Page 128: XENIX Programming adb: Program Debu
- Page 131 and 132: as: A sse m bier XENIX Programming
- Page 133 and 134: as: Assembler XENIX Programming The
- Page 135 and 136: as: Assembler XENIX Programming Key
- Page 137 and 138: as: Assembler The combination rules
- Page 139 and 140: as: Assembler XENIX Programming Ins
- Page 141 and 142: as: Assembler Initial Value Directi
- Page 143 and 144: as: Assembler XENIX Programming int
- Page 145 and 146: as: A sse m bier sub subb test test
- Page 147 and 148: as: Assembler XENIX Programming lnt
- Page 149 and 150: as: Assembler XENIX Programming lnt
- Page 151 and 152: as: Assembler XENIX Programming Imm
- Page 153 and 154: as: A sse m bier XENIX Programming
- Page 156 and 157: CHAPTER 8 csh : C SHEll The C shell
- Page 158 and 159: XENIX Programming csh: C Shell Some
- Page 160 and 161: XENIX Programm ing *w 32 * q % !c -
- Page 162 and 163: XENIX Programming csh: C Shell the
- Page 164 and 165: XENIX Programming csh: C Shell Usin
- Page 166 and 167: XENIX Programming csh: C Shell Usin
- Page 168 and 169: XENIX Programming csh: C Shell The
<strong>XENIX</strong> Programming adb: Program Debugger<br />
The command displays the maps for all segments in the program using information taken<br />
from either the program and core files or directly from memory.<br />
If you have started adb but have not executed the program, the $m command display has<br />
the form<br />
Text Segments<br />
Seg # File Pos<br />
63. 32.<br />
71. 2080.<br />
Data Segments<br />
Seg # File Pos<br />
39. 2736.<br />
Phys Size<br />
2048.<br />
656.<br />
Phys Size<br />
242.<br />
'sample' -File<br />
'core' -File<br />
Each entry gives the segment num ber, file position, and physical size of a segment. The<br />
segment number is the starting address of the segment. The file position is the offset<br />
from the start of the file to the contents of the segment. The physical size is the<br />
nu mber of bytes the segment occupies in the program or core file. The file names to<br />
the right of the display are the program and core file names.<br />
If you have executed the program, the command display has the form<br />
Text Segments<br />
Seg # File Pos<br />
63. 32.<br />
71. 2080.<br />
Data Segments<br />
Seg # File Pos<br />
39. 2736.<br />
Vir Size<br />
2048.<br />
656.<br />
Vir Size<br />
456.<br />
'sample' - Memory<br />
'sample' - Memory<br />
where virtual size is the number of bytes the segment occupies in memory. This size is<br />
sometimes different than the size of the segment in the file and will often change as<br />
you execute the program. This is due to expansion of the stack or allocation of<br />
additional memory during program execution. The file names to the right always name<br />
the program file. The file position value is ignored.<br />
If you give a segment number with the command, adb displays information only about<br />
that segment. For example, the command<br />
$m 63<br />
displays a map for segment 63 only. The display has the form<br />
Segment #= 63.<br />
Type = Text<br />
File position = 32.<br />
Physical Size = 2048.<br />
6-23