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 Programming Commands ad b (continued) Variables adb provides a number of variables. Named variables are set initially by adb but are not used subsequently. Numbered variables are reserved for communication as follows. 0 The last value printed. 1 The last offset part of an instruction source. 2 The previous value of variable 1. On entry, the following are set from the system header in the core file. If corefile does not appear to be a core file then these values are set from objfil: d The data segment size. e The entry point. m The execution type. n The number of segments. t The text segment size. Addresses Addresses in adb refer to either a location in a file or in actual memory. When there is no current process in memory, adb addresses are computed as file locations, and requested text and data are read from the objfil and corefile files. When there is a process, such as after a :r command, addresses are computed as actual memory locations. All text and data segments in a program have associated memory map entries. Each entry has a unique segment number. In addition, each entry has the file position of that segment's first byte and the physical size of the segment in the file. When a process is running, a segment's entry has a virtual size that defines the size of the segment in memory at the current time. This size can change during execution. When an address is given and no process is running, the file location corresponding to the address is calculated as effective-file-address = file-position + offset If a process is running, the memory location is simply the offset in the given segment. These addresses are valid if and only if 0 < = offset < = size where size is physical size for file locations and virtual size for memory locations. Otherwise, the requested address is not legal. 8-9
Programming Commands XENIX Programming ad b (continued) The initial setting of both mappings is suitable for normal a.out and core files. If either file is not of the kind expected then, for that file, file position is set to 0, and size is set to the maximum file size. In this way, the whole file can be examined with no address translation. So that adb may be used on large files, all appropriate values are kept as signed 32-bit integers. Files /dev/mem /dev/swap a. out core See Also ptrace in "System Functions" in the XENIX 286 C Library Guide a.out, core in "File Formats" in the XENIX 286 C Library Guide Diagnostics The message "adb" appears when there is no current command or format. Comments about inaccessible files, syntax errors, abnormal termination of commands, etc. may appear. Exit status is zero unless last command failed or returned nonzero status. Notes A breakpoint set at the entry point is not effective on initial entry to the program. System calls cannot be single-stepped. Local variables whose names are the same as an external variable may foul up the accessing of the external variable. B-10
- Page 224 and 225: XENIX Programming yacc: Compiler-Co
- Page 226 and 227: XENIX Programming yacc: Compiler-Co
- Page 228 and 229: XENIX Programming yacc: Compiler-Co
- Page 230 and 231: XENIX Programming yacc: Compiler-Co
- Page 232 and 233: XENIX Programming yacc: Compiler-Co
- Page 234 and 235: XENIX Programming yacc: Compiler-Co
- Page 236 and 237: XENIX Programming %left %left %left
- Page 238 and 239: XENIX Programming I* lexical analys
- Page 240: XENIX Programming yacc: Compiler-Co
- Page 243 and 244: m4: Macro Processor XENIX Programmi
- Page 245 and 246: m4: Macro Processor XENIX Programmi
- Page 247 and 248: m4: Macro Processor XENIX Programm
- Page 249 and 250: m4: Macro Processor XENIX Programmi
- Page 251 and 252: m4: Macro Processor XENIX Programmi
- Page 253 and 254: C Language Portability XENIX Progra
- Page 255 and 256: C Language Portability XENIX Progra
- Page 257 and 258: C Language Portability XENIX Progra
- Page 259 and 260: C Language Portability XENIX Progra
- Page 261 and 262: C Language Portability XENIX Progra
- Page 263 and 264: C Language Portability XENIX Progra
- Page 266 and 267: APPENDIX B PROG RAMMING COMMANDS Th
- Page 268 and 269: XENIX Programming ad b (continued)
- Page 270 and 271: XENIX Programming Programming Comma
- Page 272 and 273: XENIX Programming Programming Comma
- Page 276 and 277: XENIX Programming Programming Comma
- Page 278 and 279: XENIX Programming Programming Comma
- Page 280 and 281: XENIX Programming Programming Comma
- Page 282 and 283: XENIX Programming Programming Comma
- Page 284 and 285: XENIX Programming as (continued) Fi
- Page 286 and 287: XENIX Programming Programming Comma
- Page 288 and 289: XENIX Programming Programming Comma
- Page 290 and 291: XENIX Programming Programm ing Comm
- Page 292 and 293: XENIX Programming Programming Comma
- Page 294 and 295: XENIX Programming Programming Comma
- Page 296 and 297: XENIX Programming Programm ing Comm
- Page 298 and 299: XENIX Programming Programming Comma
- Page 300 and 301: XENIX Programming Programming Comma
- Page 302 and 303: XENIX Programming Programming Comma
- Page 304 and 305: XENIX Programming Programming Comma
- Page 306 and 307: XENIX Programming Programming Comma
- Page 308 and 309: XENIX Programming Programming Comma
- Page 310 and 311: XENIX Programming Programming Comma
- Page 312 and 313: XENIX Programming Programming Comma
- Page 314 and 315: XENIX Programm ing Programming Comm
- Page 316 and 317: XENIX Programming Programming Comma
- Page 318 and 319: XENIX Programming Programming Comma
- Page 320 and 321: XENIX Programming Programming Comma
- Page 322 and 323: XENIX Programming Programming Comma
<strong>XENIX</strong> Programming Programming Commands<br />
ad b (continued)<br />
Variables<br />
adb provides a number of variables. Named variables are set initially by adb but are not<br />
used subsequently. Numbered variables are reserved for communication as follows.<br />
0 The last value printed.<br />
1 The last offset part of an instruction source.<br />
2 The previous value of variable 1.<br />
On entry, the following are set from the system header in the core file. If corefile does<br />
not appear to be a core file then these values are set from objfil:<br />
d The data segment size.<br />
e The entry point.<br />
m The execution type.<br />
n The number of segments.<br />
t The text segment size.<br />
Addresses<br />
Addresses in adb refer to either a location in a file or in actual memory. When there is<br />
no current process in memory, adb addresses are computed as file locations, and<br />
requested text and data are read from the objfil and corefile files. When there is a<br />
process, such as after a :r command, addresses are computed as actual memory<br />
locations.<br />
All text and data segments in a program have associated memory map entries. Each<br />
entry has a unique segment number. In addition, each entry has the file position of that<br />
segment's first byte and the physical size of the segment in the file. When a process is<br />
running, a segment's entry has a virtual size that defines the size of the segment in<br />
memory at the current time. This size can change during execution.<br />
When an address is given and no process is running, the file location corresponding to the<br />
address is calculated as<br />
effective-file-address = file-position + offset<br />
If a process is running, the memory location is simply the offset in the given segment.<br />
These addresses are valid if and only if<br />
0 < = offset < = size<br />
where size is physical size for file locations and virtual size for memory locations.<br />
Otherwise, the requested address is not legal.<br />
8-9