Commit | Line | Data |
---|---|---|
07e50d06 M |
1 | .ds TW \v'.25m'\s+2~\s-2\v'-.25m' |
2 | .ds ST \v'.25m'*\v'-.25m' | |
3 | .ds IM \v'.1m'=\v'-.1m'\s-2\h'-.1m'>\h'.1m'\s+2 | |
4 | .ds LE \(<= | |
5 | .ds LT \s-2<\s+2 | |
6 | .ds GT \s-2>\s+2 | |
7 | .TH ADB 1 | |
8 | .SH NAME | |
9 | adb \- debugger | |
10 | .SH SYNOPSIS | |
11 | .B adb | |
12 | [\fB\-w\fR] [ objfil [ corfil ] ] | |
13 | .SH DESCRIPTION | |
14 | .I Adb | |
15 | is a general purpose debugging program. | |
16 | It may be used to examine files and to provide | |
17 | a controlled environment for the execution | |
18 | of UNIX programs. | |
19 | .PP | |
20 | .I Objfil | |
21 | is normally an executable program file, preferably | |
22 | containing a symbol table; | |
23 | if not then the | |
24 | symbolic features of | |
25 | .I adb | |
26 | cannot be used although the file can still | |
27 | be examined. | |
28 | The default for | |
29 | .I objfil | |
30 | is | |
31 | .B a.out. | |
32 | .I Corfil | |
33 | is assumed to be a core image file produced after | |
34 | executing | |
35 | .IR objfil ; | |
36 | the default for | |
37 | .I corfil | |
38 | is | |
39 | .B core. | |
40 | .PP | |
41 | Requests to | |
42 | .I adb | |
43 | are read from the standard input and | |
44 | responses are to the standard output. | |
45 | If the | |
46 | .B \-w | |
47 | flag is present then both | |
48 | .I objfil | |
49 | and | |
50 | .I corfil | |
51 | are | |
52 | created if necessary and | |
53 | opened for reading and writing | |
54 | so that files can be modified using | |
55 | .IR adb . | |
56 | .I Adb | |
57 | ignores QUIT; INTERRUPT | |
58 | causes return to the next | |
59 | .I adb | |
60 | command. | |
61 | .PP | |
62 | In general requests to | |
63 | .I adb | |
64 | are of the form | |
65 | .PP | |
66 | .if n .ti 16 | |
67 | .if t .ti 1.6i | |
68 | [\|\fIaddress\fR\|] [\|, | |
69 | .IR count \|] | |
70 | [\|\fIcommand\fR\|] [\|;\|] | |
71 | .PP | |
72 | If | |
73 | .I address | |
74 | is present then | |
75 | .I dot | |
76 | is set to | |
77 | .IR address . | |
78 | Initially | |
79 | .I dot | |
80 | is set to 0. | |
81 | For most commands | |
82 | .I count | |
83 | specifies how many times | |
84 | the command will be executed. | |
85 | The default | |
86 | .I count | |
87 | is 1. | |
88 | .I Address | |
89 | and | |
90 | .I count | |
91 | are expressions. | |
92 | .PP | |
93 | The interpretation of an address depends | |
94 | on the context it is used in. | |
95 | If a subprocess is being debugged then | |
96 | addresses are interpreted | |
97 | in the usual way in the address space of the subprocess. | |
98 | For further details of address mapping see | |
99 | .SM ADDRESSES. | |
100 | .SH EXPRESSIONS | |
101 | .TP 7.2n | |
102 | .B . | |
103 | The value of | |
104 | .IR dot . | |
105 | .TP 7.2n | |
106 | + | |
107 | The value of | |
108 | .I dot | |
109 | incremented by the current increment. | |
110 | .TP 7.2n | |
111 | ^ | |
112 | The value of | |
113 | .I dot | |
114 | decremented by the current increment. | |
115 | .TP 7.2n | |
116 | " | |
117 | The last | |
118 | .I address | |
119 | typed. | |
120 | .TP 7.2n | |
121 | .I integer | |
122 | An octal number if | |
123 | .I integer | |
124 | begins with a 0; | |
125 | a hexadecimal number if preceded by | |
126 | .BR # ; | |
127 | otherwise a decimal number. | |
128 | .TP 7.2n | |
129 | .IB integer . fraction | |
130 | A 32 bit floating point number. | |
131 | .TP 7.2n | |
132 | .I \'cccc\|\' | |
133 | The ASCII value of up to 4 characters. | |
134 | \\ may be used to escape a \'. | |
135 | .TP 7.2n | |
136 | .I \*(LT name | |
137 | The value of | |
138 | .IR name , | |
139 | which is either a variable name or a register name. | |
140 | .I Adb | |
141 | maintains a number of variables | |
142 | (see | |
143 | .SM VARIABLES\*S) | |
144 | named by single letters or digits. | |
145 | If | |
146 | .I name | |
147 | is a register name then | |
148 | the value of the register is obtained from | |
149 | the system header in | |
150 | .IR corfil . | |
151 | The register names are | |
152 | .BR "r0 ... r5 sp pc ps" "." | |
153 | .TP 7.2n | |
154 | .I symbol | |
155 | A | |
156 | .I symbol | |
157 | is a sequence | |
158 | of upper or lower case letters, underscores or | |
159 | digits, not starting with a digit. | |
160 | .BR \\ " may be used to escape other characters." | |
161 | The value of the | |
162 | .I symbol | |
163 | is taken from the symbol table | |
164 | in | |
165 | .IR objfil . | |
166 | An initial \_ or \*(TW will be prepended to | |
167 | .I symbol | |
168 | if needed. | |
169 | .TP | |
170 | .I _ symbol | |
171 | In C, the `true name' of an external symbol begins with _. | |
172 | It may be necessary to utter this name to disinguish it | |
173 | from internal or hidden variables of a program. | |
174 | .TP 7.2n | |
175 | .IB routine . name | |
176 | The address of the variable | |
177 | .I name | |
178 | in the specified | |
179 | C routine. | |
180 | Both | |
181 | .I routine | |
182 | and | |
183 | .I name | |
184 | are | |
185 | .IR symbols . | |
186 | If | |
187 | .I name | |
188 | is omitted the value is the address of the | |
189 | most recently activated C stack frame | |
190 | corresponding to | |
191 | .IR routine . | |
192 | .TP 7.2n | |
193 | .RI ( exp \|) | |
194 | The value of the expression | |
195 | .IR exp . | |
196 | .LP | |
197 | .SM | |
198 | .B "Monadic\ operators" | |
199 | .TP 7.2n | |
200 | .RI \*(ST exp | |
201 | The contents of the location addressed | |
202 | by | |
203 | .I exp | |
204 | in | |
205 | .IR corfil . | |
206 | .TP 7.2n | |
207 | .RI @ exp | |
208 | The contents of the location addressed by | |
209 | .I exp | |
210 | in | |
211 | .IR objfil . | |
212 | .TP 7.2n | |
213 | .RI \- exp | |
214 | Integer negation. | |
215 | .TP 7.2n | |
216 | .RI \*(TW exp | |
217 | Bitwise complement. | |
218 | .LP | |
219 | .B "Dyadic\ operators" | |
220 | are left associative | |
221 | and are less binding than monadic operators. | |
222 | .TP 7.2n | |
223 | .IR e1 + e2 | |
224 | Integer addition. | |
225 | .TP 7.2n | |
226 | .IR e1 \- e2 | |
227 | Integer subtraction. | |
228 | .TP 7.2n | |
229 | .IR e1 \*(ST e2 | |
230 | Integer multiplication. | |
231 | .TP 7.2n | |
232 | .IR e1 % e2 | |
233 | Integer division. | |
234 | .TP 7.2n | |
235 | .IR e1 & e2 | |
236 | Bitwise conjunction. | |
237 | .TP 7.2n | |
238 | .IR e1 \(bv e2 | |
239 | Bitwise disjunction. | |
240 | .TP 7.2n | |
241 | .IR e1 # e2 | |
242 | .I E1 | |
243 | rounded up to the next multiple of | |
244 | .IR e2 . | |
245 | .DT | |
246 | .SH COMMANDS | |
247 | Most commands consist of a verb followed by a modifier or list | |
248 | of modifiers. | |
249 | The following verbs are available. | |
250 | (The commands `?' and `/' may be followed by `\*(ST'; | |
251 | see | |
252 | .SM ADDRESSES | |
253 | for further details.) | |
254 | .TP .5i | |
255 | .RI ? f | |
256 | Locations starting at | |
257 | .I address | |
258 | in | |
259 | .I objfil | |
260 | are printed according to the format | |
261 | .IR f . | |
262 | .TP | |
263 | .RI / f | |
264 | Locations starting at | |
265 | .I address | |
266 | in | |
267 | .I corfil | |
268 | are printed according to the format | |
269 | .IR f . | |
270 | .TP | |
271 | .RI = f | |
272 | The value of | |
273 | .I address | |
274 | itself is printed in the | |
275 | styles indicated by the format | |
276 | .IR f . | |
277 | (For | |
278 | .B i | |
279 | format `?' is printed for the parts of the instruction that reference | |
280 | subsequent words.) | |
281 | .PP | |
282 | A | |
283 | .I format | |
284 | consists of one or more characters that specify a style | |
285 | of printing. | |
286 | Each format character may be preceded by a decimal integer | |
287 | that is a repeat count for the format character. | |
288 | While stepping through a format | |
289 | .I dot | |
290 | is incremented temporarily | |
291 | by the amount given for each format letter. | |
292 | If no format is given then the last format is used. | |
293 | The format letters available are as follows. | |
294 | .ta 2.5n .5i | |
295 | .RS | |
296 | .TP | |
297 | .BR o " 2" | |
298 | Print 2 bytes in octal. | |
299 | All octal numbers output by | |
300 | .I adb | |
301 | are preceded by 0. | |
302 | .br | |
303 | .ns | |
304 | .TP | |
305 | .BR O " 4" | |
306 | Print 4 bytes in octal. | |
307 | .br | |
308 | .ns | |
309 | .TP | |
310 | .BR q " 2" | |
311 | Print in signed octal. | |
312 | .br | |
313 | .ns | |
314 | .TP | |
315 | .BR Q " 4" | |
316 | Print long signed octal. | |
317 | .br | |
318 | .ns | |
319 | .TP | |
320 | .BR d " 2" | |
321 | Print in decimal. | |
322 | .br | |
323 | .ns | |
324 | .TP | |
325 | .BR D " 4" | |
326 | Print long decimal. | |
327 | .br | |
328 | .ns | |
329 | .TP | |
330 | .BR x " 2" | |
331 | Print 2 bytes in hexadecimal. | |
332 | .br | |
333 | .ns | |
334 | .TP | |
335 | .BR X " 4" | |
336 | Print 4 bytes in hexadecimal. | |
337 | .br | |
338 | .ns | |
339 | .TP | |
340 | .BR u " 2" | |
341 | Print as an unsigned decimal number. | |
342 | .br | |
343 | .ns | |
344 | .TP | |
345 | .BR U " 4" | |
346 | Print long unsigned decimal. | |
347 | .br | |
348 | .ns | |
349 | .TP | |
350 | .BR f " 4" | |
351 | Print the 32 bit value | |
352 | as a floating point number. | |
353 | .br | |
354 | .ns | |
355 | .TP | |
356 | .BR F " 8" | |
357 | Print double floating point. | |
358 | .br | |
359 | .ns | |
360 | .TP | |
361 | .BR b " 1" | |
362 | Print the addressed byte in octal. | |
363 | .br | |
364 | .ns | |
365 | .TP | |
366 | .BR c " 1" | |
367 | Print the addressed character. | |
368 | .br | |
369 | .ns | |
370 | .TP | |
371 | .BR C " 1" | |
372 | Print the addressed character using | |
373 | the following escape convention. | |
374 | Character values 000 to 040 are printed as @ followed by the corresponding | |
375 | character in the range 0100 to 0140. | |
376 | The character @ is printed as @@. | |
377 | .br | |
378 | .ns | |
379 | .TP | |
380 | .BI s " n" | |
381 | Print the addressed characters until a zero character | |
382 | is reached. | |
383 | .br | |
384 | .ns | |
385 | .TP | |
386 | .BI S " n" | |
387 | Print a string using | |
388 | the @ escape convention. | |
389 | .I n | |
390 | is the length of the string including its zero terminator. | |
391 | .br | |
392 | .ns | |
393 | .TP | |
394 | .BR Y " 4" | |
395 | Print 4 bytes in date format (see | |
396 | .IR ctime (3)). | |
397 | .br | |
398 | .ns | |
399 | .TP | |
400 | .BR i " n" | |
401 | Print as PDP11 instructions. | |
402 | .I n | |
403 | is the number of bytes occupied by the instruction. | |
404 | This style of printing causes variables 1 and 2 to be set | |
405 | to the offset parts of the source and destination respectively. | |
406 | .br | |
407 | .ns | |
408 | .TP | |
409 | .BR a " 0" | |
410 | Print the value of | |
411 | .I dot | |
412 | in symbolic form. | |
413 | Symbols are checked to ensure that they have an appropriate | |
414 | type as indicated below. | |
415 | .LP | |
416 | / local or global data symbol | |
417 | .br | |
418 | ? local or global text symbol | |
419 | .br | |
420 | = local or global absolute symbol | |
421 | .TP | |
422 | .BR p " 2" | |
423 | Print the addressed value in symbolic form using | |
424 | the same rules for symbol lookup as | |
425 | .BR a . | |
426 | .br | |
427 | .ns | |
428 | .TP | |
429 | .BR t " 0" | |
430 | When preceded by an integer tabs to the next | |
431 | appropriate tab stop. | |
432 | For example, | |
433 | .B 8t | |
434 | moves to the next 8-space tab stop. | |
435 | .br | |
436 | .ns | |
437 | .TP | |
438 | .BR r " 0" | |
439 | Print a space. | |
440 | .br | |
441 | .ns | |
442 | .TP | |
443 | .BR n " 0" | |
444 | Print a newline. | |
445 | .br | |
446 | .ns | |
447 | .tr '" | |
448 | .TP | |
449 | .BR '...' " 0" | |
450 | Print the enclosed string. | |
451 | .br | |
452 | .tr '' | |
453 | .br | |
454 | .ns | |
455 | .TP | |
456 | .B ^ | |
457 | .I Dot | |
458 | is decremented by the current increment. | |
459 | Nothing is printed. | |
460 | .br | |
461 | .ns | |
462 | .TP | |
463 | + | |
464 | .I Dot | |
465 | is incremented by 1. | |
466 | Nothing is printed. | |
467 | .br | |
468 | .ns | |
469 | .TP | |
470 | \- | |
471 | .I Dot | |
472 | is decremented by 1. | |
473 | Nothing is printed. | |
474 | .RE | |
475 | .TP | |
476 | newline | |
477 | If the previous command temporarily incremented | |
478 | .IR dot , | |
479 | make the increment permanent. | |
480 | Repeat the previous command with a | |
481 | .I count | |
482 | of 1. | |
483 | .TP | |
484 | .RB [ ?/ ] l "\fI value mask\fR" | |
485 | Words starting at | |
486 | .I dot | |
487 | are masked with | |
488 | .I mask | |
489 | and compared with | |
490 | .I value | |
491 | until | |
492 | a match is found. | |
493 | If | |
494 | .B L | |
495 | is used then the match is for 4 bytes at a time instead of 2. | |
496 | If no match is found then | |
497 | .I dot | |
498 | is unchanged; otherwise | |
499 | .I dot | |
500 | is set to the matched location. | |
501 | If | |
502 | .I mask | |
503 | is omitted then \-1 is used. | |
504 | .TP | |
505 | .RB [ ?/ ] w "\fI value ...\fR" | |
506 | Write the 2-byte | |
507 | .I value | |
508 | into the addressed | |
509 | location. | |
510 | If the command is | |
511 | .BR W , | |
512 | write 4 bytes. | |
513 | Odd addresses are not allowed when writing to the subprocess | |
514 | address space. | |
515 | .TP | |
516 | [\fB?/\fR]\fBm\fI b1 e1 f1\fR[\fB?/\fR] | |
517 | .br | |
518 | New values for | |
519 | .RI ( b1,\ e1,\ f1 ) | |
520 | are recorded. | |
521 | If less than three expressions are given then | |
522 | the remaining map parameters are left unchanged. | |
523 | If the `?' or `/' is followed by `\*(ST' then | |
524 | the second segment (\fIb2\fR\|,\|\fIe2\fR\|,\|\fIf2\fR) | |
525 | of the mapping is changed. | |
526 | If the list is terminated by `?' or `/' then the file | |
527 | (\fIobjfil\fR or | |
528 | .I corfil | |
529 | respectively) is used | |
530 | for subsequent requests. | |
531 | (So that, for example, `/m?' will cause `/' to refer to | |
532 | .IR objfil .) | |
533 | .TP | |
534 | .BI \*(GT name | |
535 | .I Dot | |
536 | is assigned to the variable or register named. | |
537 | .TP | |
538 | .B ! | |
539 | A shell is called to read the | |
540 | rest of the line following `!'. | |
541 | .TP | |
542 | .RI $ modifier | |
543 | Miscellaneous commands. | |
544 | The available | |
545 | .I modifiers | |
546 | are: | |
547 | .RS | |
548 | .TP | |
549 | .BI < f | |
550 | Read commands from the file | |
551 | .I f | |
552 | and return. | |
553 | .br | |
554 | .ns | |
555 | .TP | |
556 | .BI > f | |
557 | Send output to the file | |
558 | .I f, | |
559 | which is created if it does not exist. | |
560 | .br | |
561 | .ns | |
562 | .TP | |
563 | .B r | |
564 | Print the general registers and | |
565 | the instruction addressed by | |
566 | .BR pc . | |
567 | .I Dot | |
568 | is set to \fBpc\fR. | |
569 | .br | |
570 | .ns | |
571 | .TP | |
572 | .B f | |
573 | Print the floating registers in | |
574 | single or double length. | |
575 | If the floating point status of | |
576 | .B ps | |
577 | is set to double (0200 bit) | |
578 | then double length is used anyway. | |
579 | .br | |
580 | .ns | |
581 | .TP | |
582 | .B b | |
583 | Print all breakpoints | |
584 | and their associated counts and commands. | |
585 | .br | |
586 | .ns | |
587 | .TP | |
588 | .B a | |
589 | ALGOL 68 stack backtrace. | |
590 | If | |
591 | .I address | |
592 | is given then it is taken to be the | |
593 | address of the current frame (instead of | |
594 | .BR r4 ). | |
595 | If | |
596 | .I count | |
597 | is given then only the first | |
598 | .I count | |
599 | frames are printed. | |
600 | .br | |
601 | .ns | |
602 | .TP | |
603 | .B c | |
604 | C stack backtrace. | |
605 | If | |
606 | .I address | |
607 | is given then it is taken as the | |
608 | address of the current frame (instead of | |
609 | .BR r5 ). | |
610 | If | |
611 | .B C | |
612 | is used then the names and (16 bit) values of all automatic | |
613 | and static variables are printed for each active function. | |
614 | If | |
615 | .I count | |
616 | is given then only the first | |
617 | .I count | |
618 | frames are printed. | |
619 | .br | |
620 | .ns | |
621 | .TP | |
622 | .B e | |
623 | The names and values of | |
624 | external variables are printed. | |
625 | .br | |
626 | .ns | |
627 | .TP | |
628 | .B w | |
629 | Set the page width for output to | |
630 | .I address | |
631 | (default 80). | |
632 | .br | |
633 | .ns | |
634 | .TP | |
635 | .B s | |
636 | Set the limit for symbol matches to | |
637 | .I address | |
638 | (default 255). | |
639 | .br | |
640 | .ns | |
641 | .TP | |
642 | .B o | |
643 | All integers input are regarded as octal. | |
644 | .br | |
645 | .ns | |
646 | .TP | |
647 | .B d | |
648 | Reset integer input as described in | |
649 | .SM EXPRESSIONS. | |
650 | .br | |
651 | .ns | |
652 | .TP | |
653 | .B q | |
654 | Exit from | |
655 | .IR adb . | |
656 | .br | |
657 | .ns | |
658 | .TP | |
659 | .B v | |
660 | Print all non zero variables in octal. | |
661 | .br | |
662 | .ns | |
663 | .TP | |
664 | .B m | |
665 | Print the address map. | |
666 | .RE | |
667 | .TP | |
668 | .BI : modifier | |
669 | Manage a subprocess. | |
670 | Available modifiers are: | |
671 | .RS | |
672 | .TP | |
673 | .BI b c | |
674 | Set breakpoint at | |
675 | .IR address . | |
676 | The breakpoint is executed | |
677 | .IR count \-1 | |
678 | times before | |
679 | causing a stop. | |
680 | Each time the breakpoint is encountered | |
681 | the command | |
682 | .I c | |
683 | is executed. | |
684 | If this command sets | |
685 | .I dot | |
686 | to zero | |
687 | then the breakpoint causes a stop. | |
688 | .TP | |
689 | .B d | |
690 | Delete breakpoint at | |
691 | .IR address . | |
692 | .TP | |
693 | .B r | |
694 | Run | |
695 | .I objfil | |
696 | as a subprocess. | |
697 | If | |
698 | .I address | |
699 | is given explicitly then the | |
700 | program is entered at this point; otherwise | |
701 | the program is entered at its standard entry point. | |
702 | .I count | |
703 | specifies how many breakpoints are to be | |
704 | ignored before stopping. | |
705 | Arguments to the subprocess may be supplied on the | |
706 | same line as the command. | |
707 | An argument starting with < or > causes the standard | |
708 | input or output to be established for the command. | |
709 | All signals are turned on on entry to the subprocess. | |
710 | .TP | |
711 | .BI c s | |
712 | The subprocess is continued | |
713 | with signal | |
714 | .I s | |
715 | c | |
716 | .I s, | |
717 | see | |
718 | .IR signal (2). | |
719 | If | |
720 | .I address | |
721 | is given then the subprocess | |
722 | is continued at this address. | |
723 | If no signal is specified then the signal | |
724 | that caused the subprocess to stop is sent. | |
725 | Breakpoint skipping is the same | |
726 | as for | |
727 | .BR r . | |
728 | .TP | |
729 | .BI s s | |
730 | As for | |
731 | .B c | |
732 | except that | |
733 | the subprocess is single stepped | |
734 | .I count | |
735 | times. | |
736 | If there is no current subprocess then | |
737 | .I objfil | |
738 | is run | |
739 | as a subprocess as for | |
740 | .BR r . | |
741 | In this case no signal can be sent; the remainder of the line | |
742 | is treated as arguments to the subprocess. | |
743 | .TP | |
744 | .B k | |
745 | The current subprocess, if any, is terminated. | |
746 | .RE | |
747 | .SH VARIABLES | |
748 | .I Adb | |
749 | provides a number of variables. | |
750 | Named variables are set initially by | |
751 | .I adb | |
752 | but are not used subsequently. | |
753 | Numbered variables are reserved for communication | |
754 | as follows. | |
755 | .TP | |
756 | 0 | |
757 | The last value printed. | |
758 | .br | |
759 | .ns | |
760 | .TP | |
761 | 1 | |
762 | The last offset part of an instruction source. | |
763 | .br | |
764 | .ns | |
765 | .TP | |
766 | 2 | |
767 | The previous value of variable 1. | |
768 | .PP | |
769 | On entry the following are set | |
770 | from the system header in the | |
771 | .IR corfil . | |
772 | If | |
773 | .I corfil | |
774 | does not appear to be a | |
775 | .B core | |
776 | file then | |
777 | these values are set from | |
778 | .IR objfil . | |
779 | .TP | |
780 | b | |
781 | The base address of the data segment. | |
782 | .br | |
783 | .ns | |
784 | .TP | |
785 | d | |
786 | The data segment size. | |
787 | .br | |
788 | .ns | |
789 | .TP | |
790 | e | |
791 | The entry point. | |
792 | .br | |
793 | .ns | |
794 | .TP | |
795 | m | |
796 | The `magic' number (0405, 0407, 0410 or 0411). | |
797 | .br | |
798 | .ns | |
799 | .TP | |
800 | s | |
801 | The stack segment size. | |
802 | .br | |
803 | .ns | |
804 | .TP | |
805 | t | |
806 | The text segment size. | |
807 | .SH ADDRESSES | |
808 | The address in a file associated with | |
809 | a written address is determined by a mapping | |
810 | associated with that file. | |
811 | Each mapping is represented by two triples | |
812 | .RI ( "b1, e1, f1" ) | |
813 | and | |
814 | .RI ( "b2, e2, f2" ) | |
815 | and the | |
816 | .I file address | |
817 | corresponding to a written | |
818 | .I address | |
819 | is calculated as follows. | |
820 | .PP | |
821 | .if t .ti 1.5i | |
822 | .if n .ti 8 | |
823 | .IR b1 \*(LE address < e1 | |
824 | \*(IM | |
825 | .IR "file address" = address + f1\-b1, | |
826 | otherwise, | |
827 | .PP | |
828 | .if t .ti 1.5i | |
829 | .if n .ti 8 | |
830 | .IR b2 \*(LE address < e2 | |
831 | \*(IM | |
832 | .IR "file address" = address + f2\-b2, | |
833 | .PP | |
834 | otherwise, the requested | |
835 | .I address | |
836 | is not legal. | |
837 | In some cases (e.g. for programs with separated I and D | |
838 | space) the two segments for a file may overlap. | |
839 | If a | |
840 | .B ? | |
841 | or | |
842 | .B / | |
843 | is followed by an | |
844 | .B \*(ST | |
845 | then only the second | |
846 | triple is used. | |
847 | .PP | |
848 | The initial setting of both mappings is suitable for | |
849 | normal | |
850 | .B a.out | |
851 | and | |
852 | .B core | |
853 | files. | |
854 | If either file is not of the kind expected then, for that file, | |
855 | .I b1 | |
856 | is set to 0, | |
857 | .I e1 | |
858 | is set to | |
859 | the maximum file size | |
860 | and | |
861 | .I f1 | |
862 | is set to 0; in this way the whole | |
863 | file can be examined with no address translation. | |
864 | .PP | |
865 | So that | |
866 | .I adb | |
867 | may be used on large files | |
868 | all appropriate values are kept as signed 32 bit integers. | |
869 | .SH FILES | |
870 | /dev/mem | |
871 | .br | |
872 | /dev/swap | |
873 | .br | |
874 | a.out | |
875 | .br | |
876 | core | |
877 | .SH SEE\ ALSO | |
878 | ptrace(2), | |
879 | a.out(5), | |
880 | core(5) | |
881 | .SH DIAGNOSTICS | |
882 | `Adb' when there is no current command or format. | |
883 | Comments about inaccessible files, syntax errors, | |
884 | abnormal termination of commands, etc. | |
885 | Exit status is 0, unless last command failed or | |
886 | returned nonzero status. | |
887 | .SH BUGS | |
888 | A breakpoint set at the entry point is not effective | |
889 | on initial entry to the program. | |
890 | .br | |
891 | When single stepping, system calls do not count as an | |
892 | executed instruction. | |
893 | .br | |
894 | Local variables whose names are the same as an external | |
895 | variable may foul up the accessing of the external. |