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 Decimal, Octal, and Hexadecimal Integers Decimal integers must begin with a nonzero decimal digit. Octal numbers must begin with a zero and may have octal digits only. Hexadecimal numbers must begin with the prefix "Ox" and may contain decimal digits and the letters "a" through "f" {in both uppercase and lowercase). The following are valid numbers: Decimal 34 4090 Octal 042 07772 Hexadecimal Ox22 Oxffa Although decimal numbers are displayed with a trailing decimal point (.), you must not use the decimal point when typing the number. Symbols Symbols are the names of global variables and functions defined within the program being debugged and are equal to the address of the given variable or function. Symbols are stored in the program's symbol table and are available if the symbol table has not been stripped from the program file (see strip in Appendix B, "Programming Commands"). In expressions, you may spell the symbol exactly as it is in the source program or as it has been stored in the symbol table. Symbols in the symbol table are no more than eight characters long, and those defined in C programs are given a leading underscore ( -). The following are examples of symbols: main main hex2bin out of Note that if the spelling of any two symbols is the same (except for a leading underscore), adb will ignore one of the symbols and allow references only to the other. For example, if both "main" and "_main" exist in a program, then adb accesses only the first to appear in the source and ignores the other. When you use the ? command, adb uses the symbols found in the symbol table of the program file to create symbolic addresses. Thus, the command sometimes gives a function name when it displays data. This does not happen if the ? command is used for text (instructions) and the I command for data. Local variables cannot be addressed. 6-5
adb: Program Debugger XENIX Programming adb Va riables adb automatically creates a set of its own variables whenever you start the debugger. These variables are set to the addresses and sizes of various parts of the program file as defined below. d size of data e entry address of the program m execution type n number of segments t size of text adb reads the program file to find the values for these variables. If the file does not seem to be a program file, then adb leaves the values undefined. You can use the current value of a variable in an expression by preceding the variable name with a less-than sign ( variable-name where expression is the value to be assigned to the variable, and variable-name must be a single letter. For example, the assignment Ox2000 >b assigns the hexadecimal value "Ox2000" to the variable b. You can display the value of all currently defined adb variables by using the $v command. The command lists the variable names followed by their values in the current format and displays any variable with a value that is not zero. If a variable also has a nonzero segment value, the variable's value is displayed as an address; otherwise it is displayed as a number. 6-6
- Page 51 and 52: lint: C Program Checker XENIX Progr
- Page 53 and 54: make: Program Maintainer XENIX Prog
- Page 55 and 56: make: Program Maintainer XENIX Prog
- Page 57 and 58: make: Program Maintainer XENIX Prog
- Page 59 and 60: make: Program Maintainer XENIX Prog
- Page 61 and 62: make: Program Maintainer XENIX Prog
- Page 63 and 64: make: Program Maintainer XENIX Prog
- Page 65 and 66: make: Program Maintainer print: $(F
- Page 67 and 68: SCCS: Source Code Control System XE
- 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 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 120 and 121: 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
<strong>XENIX</strong> Programming adb: Program Debugger<br />
Decimal, Octal, and Hexadecimal Integers<br />
Decimal integers must begin with a nonzero decimal digit. Octal numbers must begin<br />
with a zero and may have octal digits only. Hexadecimal numbers must begin with the<br />
prefix "Ox" and may contain decimal digits and the letters "a" through "f" {in both<br />
uppercase and lowercase). The following are valid numbers:<br />
Decimal<br />
34<br />
4090<br />
Octal<br />
042<br />
07772<br />
Hexadecimal<br />
Ox22<br />
Oxffa<br />
Although decimal numbers are displayed with a trailing decimal point (.), you must not<br />
use the decimal point when typing the number.<br />
Symbols<br />
Symbols are the names of global variables and functions defined within the program<br />
being debugged and are equal to the address of the given variable or function. Symbols<br />
are stored in the program's symbol table and are available if the symbol table has not<br />
been stripped from the program file (see strip in Appendix B, "Programming<br />
Commands").<br />
In expressions, you may spell the symbol exactly as it is in the source program or as it<br />
has been stored in the symbol table. Symbols in the symbol table are no more than eight<br />
characters long, and those defined in C programs are given a leading underscore ( -).<br />
The following are examples of symbols:<br />
main main hex2bin out of<br />
Note that if the spelling of any two symbols is the same (except for a leading<br />
underscore), adb will ignore one of the symbols and allow references only to the other.<br />
For example, if both "main" and "_main" exist in a program, then adb accesses only the<br />
first to appear in the source and ignores the other.<br />
When you use the ? command, adb uses the symbols found in the symbol table of the<br />
program file to create symbolic addresses. Thus, the command sometimes gives a<br />
function name when it displays data. This does not happen if the ? command is used for<br />
text (instructions) and the I command for data. Local variables cannot be addressed.<br />
6-5