BSD 4_3_Tahoe development
[unix-history] / usr / man / cat1 / dbx.0
CommitLineData
362b077f
C
1
2
3
4DBX(1) UNIX Programmer's Manual DBX(1)
5
6
7
8N\bNA\bAM\bME\bE
9 dbx - debugger
10
11S\bSY\bYN\bNO\bOP\bPS\bSI\bIS\bS
12 d\bdb\bbx\bx [ -\b-r\br ] [ -\b-i\bi ] [ -\b-k\bk ] [ -\b-I\bI _\bd_\bi_\br ] [ -\b-c\bc _\bf_\bi_\bl_\be ] [ _\bo_\bb_\bj_\bf_\bi_\bl_\be [
13 _\bc_\bo_\br_\be_\bd_\bu_\bm_\bp ]]
14
15D\bDE\bES\bSC\bCR\bRI\bIP\bPT\bTI\bIO\bON\bN
16 _\bD_\bb_\bx is a tool for source level debugging and execution of
17 programs under UNIX. The _\bo_\bb_\bj_\bf_\bi_\bl_\be is an object file produced
18 by a compiler with the appropriate flag (usually ``-g'')
19 specified to produce symbol information in the object file.
20 Currently, _\bc_\bc(1), _\bf_\b7_\b7(1), _\bp_\bc(1), and the DEC Western
21 Research Laboratory Modula-2 compiler, _\bm_\bo_\bd(l), produce the
22 appropriate source information. The machine level facili-
23 ties of _\bd_\bb_\bx can be used on any program.
24
25 The object file contains a symbol table that includes the
26 name of the all the source files translated by the compiler
27 to create it. These files are available for perusal while
28 using the debugger.
29
30 If a file named ``core'' exists in the current directory or
31 a _\bc_\bo_\br_\be_\bd_\bu_\bm_\bp file is specified, _\bd_\bb_\bx can be used to examine the
32 state of the program when it faulted.
33
34 If the file ``.dbxinit'' exists in the current directory
35 then the debugger commands in it are executed. _\bD_\bb_\bx also
36 checks for a ``.dbxinit'' in the user's home directory if
37 there isn't one in the current directory.
38
39 The command line options and their meanings are:
40
41 -\b-r\br Execute _\bo_\bb_\bj_\bf_\bi_\bl_\be immediately. If it terminates suc-
42 cessfully _\bd_\bb_\bx exits. Otherwise the reason for ter-
43 mination will be reported and the user offered the
44 option of entering the debugger or letting the pro-
45 gram fault. _\bD_\bb_\bx will read from ``/dev/tty'' when -\b-r\br
46 is specified and standard input is not a terminal.
47
48 -\b-i\bi Force _\bd_\bb_\bx to act as though standard input is a ter-
49 minal.
50
51 -\b-k\bk Map memory addresses, useful for kernel debugging.
52
53 -\b-I\bI _\bd_\bi_\br Add _\bd_\bi_\br to the list of directories that are searched
54 when looking for a source file. Normally _\bd_\bb_\bx looks
55 for source files in the current directory and in the
56 directory where _\bo_\bb_\bj_\bf_\bi_\bl_\be is located. The directory
57 search path can also be set with the u\bus\bse\be command.
58
59 -\b-c\bc _\bf_\bi_\bl_\be Execute the _\bd_\bb_\bx commands in the _\bf_\bi_\bl_\be before reading
60
61
62
63Printed 7/9/88 January 12, 1986 1
64
65
66
67
68
69
70DBX(1) UNIX Programmer's Manual DBX(1)
71
72
73
74 from standard input.
75
76
77 Unless -\b-r\br is specified, _\bd_\bb_\bx just prompts and waits for a
78 command.
79
80 E\bEx\bxe\bec\bcu\but\bti\bio\bon\bn a\ban\bnd\bd T\bTr\bra\bac\bci\bin\bng\bg C\bCo\bom\bmm\bma\ban\bnd\bds\bs
81
82
83 r\bru\bun\bn [_\ba_\br_\bg_\bs] [<\b< _\bf_\bi_\bl_\be_\bn_\ba_\bm_\be] [>\b> _\bf_\bi_\bl_\be_\bn_\ba_\bm_\be]
84 r\bre\ber\bru\bun\bn [_\ba_\br_\bg_\bs] [<\b< _\bf_\bi_\bl_\be_\bn_\ba_\bm_\be] [>\b> _\bf_\bi_\bl_\be_\bn_\ba_\bm_\be]
85 Start executing _\bo_\bb_\bj_\bf_\bi_\bl_\be, passing _\ba_\br_\bg_\bs as command line
86 arguments; <\b< or >\b> can be used to redirect input or out-
87 put in the usual manner. When r\bre\ber\bru\bun\bn is used without
88 any arguments the previous argument list is passed to
89 the program; otherwise it is identical to r\bru\bun\bn. If
90 _\bo_\bb_\bj_\bf_\bi_\bl_\be has been written since the last time the sym-
91 bolic information was read in, _\bd_\bb_\bx will read in the new
92 information.
93
94 t\btr\bra\bac\bce\be [i\bin\bn _\bp_\br_\bo_\bc_\be_\bd_\bu_\br_\be/_\bf_\bu_\bn_\bc_\bt_\bi_\bo_\bn] [i\bif\bf _\bc_\bo_\bn_\bd_\bi_\bt_\bi_\bo_\bn]
95 t\btr\bra\bac\bce\be _\bs_\bo_\bu_\br_\bc_\be-_\bl_\bi_\bn_\be-_\bn_\bu_\bm_\bb_\be_\br [i\bif\bf _\bc_\bo_\bn_\bd_\bi_\bt_\bi_\bo_\bn]
96 t\btr\bra\bac\bce\be _\bp_\br_\bo_\bc_\be_\bd_\bu_\br_\be/_\bf_\bu_\bn_\bc_\bt_\bi_\bo_\bn [i\bin\bn _\bp_\br_\bo_\bc_\be_\bd_\bu_\br_\be/_\bf_\bu_\bn_\bc_\bt_\bi_\bo_\bn] [i\bif\bf _\bc_\bo_\bn_\bd_\bi_\bt_\bi_\bo_\bn]
97 t\btr\bra\bac\bce\be _\be_\bx_\bp_\br_\be_\bs_\bs_\bi_\bo_\bn a\bat\bt _\bs_\bo_\bu_\br_\bc_\be-_\bl_\bi_\bn_\be-_\bn_\bu_\bm_\bb_\be_\br [i\bif\bf _\bc_\bo_\bn_\bd_\bi_\bt_\bi_\bo_\bn]
98 t\btr\bra\bac\bce\be _\bv_\ba_\br_\bi_\ba_\bb_\bl_\be [i\bin\bn _\bp_\br_\bo_\bc_\be_\bd_\bu_\br_\be/_\bf_\bu_\bn_\bc_\bt_\bi_\bo_\bn] [i\bif\bf _\bc_\bo_\bn_\bd_\bi_\bt_\bi_\bo_\bn]
99 Have tracing information printed when the program is
100 executed. A number is associated with the command that
101 is used to turn the tracing off (see the d\bde\bel\ble\bet\bte\be com-
102 mand).
103
104 The first argument describes what is to be traced. If
105 it is a _\bs_\bo_\bu_\br_\bc_\be-_\bl_\bi_\bn_\be-_\bn_\bu_\bm_\bb_\be_\br, then the line is printed
106 immediately prior to being executed. Source line
107 numbers in a file other than the current one must be
108 preceded by the name of the file in quotes and a colon,
109 e.g. "mumble.p":17.
110
111 If the argument is a procedure or function name then
112 every time it is called, information is printed telling
113 what routine called it, from what source line it was
114 called, and what parameters were passed to it. In
115 addition, its return is noted, and if it's a function
116 then the value it is returning is also printed.
117
118 If the argument is an _\be_\bx_\bp_\br_\be_\bs_\bs_\bi_\bo_\bn with an a\bat\bt clause then
119 the value of the expression is printed whenever the
120 identified source line is reached.
121
122 If the argument is a variable then the name and value
123 of the variable is printed whenever it changes. Execu-
124 tion is substantially slower during this form of trac-
125 ing.
126
127
128
129Printed 7/9/88 January 12, 1986 2
130
131
132
133
134
135
136DBX(1) UNIX Programmer's Manual DBX(1)
137
138
139
140 If no argument is specified then all source lines are
141 printed before they are executed. Execution is sub-
142 stantially slower during this form of tracing.
143
144 The clause ``i\bin\bn _\bp_\br_\bo_\bc_\be_\bd_\bu_\br_\be/_\bf_\bu_\bn_\bc_\bt_\bi_\bo_\bn'' restricts tracing
145 information to be printed only while executing inside
146 the given procedure or function.
147
148 _\bC_\bo_\bn_\bd_\bi_\bt_\bi_\bo_\bn is a boolean expression and is evaluated
149 prior to printing the tracing information; if it is
150 false then the information is not printed.
151
152 s\bst\bto\bop\bp i\bif\bf _\bc_\bo_\bn_\bd_\bi_\bt_\bi_\bo_\bn
153 s\bst\bto\bop\bp a\bat\bt _\bs_\bo_\bu_\br_\bc_\be-_\bl_\bi_\bn_\be-_\bn_\bu_\bm_\bb_\be_\br [i\bif\bf _\bc_\bo_\bn_\bd_\bi_\bt_\bi_\bo_\bn]
154 s\bst\bto\bop\bp i\bin\bn _\bp_\br_\bo_\bc_\be_\bd_\bu_\br_\be/_\bf_\bu_\bn_\bc_\bt_\bi_\bo_\bn [i\bif\bf _\bc_\bo_\bn_\bd_\bi_\bt_\bi_\bo_\bn]
155 s\bst\bto\bop\bp _\bv_\ba_\br_\bi_\ba_\bb_\bl_\be [i\bif\bf _\bc_\bo_\bn_\bd_\bi_\bt_\bi_\bo_\bn]
156 Stop execution when the given line is reached, pro-
157 cedure or function called, variable changed, or condi-
158 tion true.
159
160 s\bst\bta\bat\btu\bus\bs [>\b> _\bf_\bi_\bl_\be_\bn_\ba_\bm_\be]
161 Print out the currently active t\btr\bra\bac\bce\be and s\bst\bto\bop\bp commands.
162
163 d\bde\bel\ble\bet\bte\be _\bc_\bo_\bm_\bm_\ba_\bn_\bd-_\bn_\bu_\bm_\bb_\be_\br ...
164 The traces or stops corresponding to the given numbers
165 are removed. The numbers associated with traces and
166 stops are printed by the s\bst\bta\bat\btu\bus\bs command.
167
168 c\bca\bat\btc\bch\bh _\bn_\bu_\bm_\bb_\be_\br
169 c\bca\bat\btc\bch\bh _\bs_\bi_\bg_\bn_\ba_\bl-_\bn_\ba_\bm_\be
170 i\big\bgn\bno\bor\bre\be _\bn_\bu_\bm_\bb_\be_\br
171 i\big\bgn\bno\bor\bre\be _\bs_\bi_\bg_\bn_\ba_\bl-_\bn_\ba_\bm_\be
172 Start or stop trapping a signal before it is sent to
173 the program. This is useful when a program being
174 debugged handles signals such as interrupts. A signal
175 may be specified by number or by a name (e.g., SIGINT).
176 Signal names are case insensitive and the ``SIG'' pre-
177 fix is optional. By default all signals are trapped
178 except SIGCONT, SIGCHILD, SIGALRM and SIGKILL.
179
180 c\bco\bon\bnt\bt _\bi_\bn_\bt_\be_\bg_\be_\br
181 c\bco\bon\bnt\bt _\bs_\bi_\bg_\bn_\ba_\bl-_\bn_\ba_\bm_\be
182 Continue execution from where it stopped. If a signal
183 is specified, the process continues as though it
184 received the signal. Otherwise, the process is contin-
185 ued as though it had not been stopped.
186
187 Execution cannot be continued if the process has ``fin-
188 ished'', that is, called the standard procedure ``exit''.
189 _\bD_\bb_\bx does not allow the process to exit, thereby letting the
190 user to examine the program state.
191
192
193
194
195Printed 7/9/88 January 12, 1986 3
196
197
198
199
200
201
202DBX(1) UNIX Programmer's Manual DBX(1)
203
204
205
206 s\bst\bte\bep\bp Execute one source line.
207
208 n\bne\bex\bxt\bt Execute up to the next source line. The difference
209 between this and s\bst\bte\bep\bp is that if the line contains a
210 call to a procedure or function the s\bst\bte\bep\bp command will
211 stop at the beginning of that block, while the n\bne\bex\bxt\bt
212 command will not.
213
214 r\bre\bet\btu\bur\brn\bn [_\bp_\br_\bo_\bc_\be_\bd_\bu_\br_\be]
215 Continue until a return to _\bp_\br_\bo_\bc_\be_\bd_\bu_\br_\be is executed, or
216 until the current procedure returns if none is speci-
217 fied.
218
219 c\bca\bal\bll\bl _\bp_\br_\bo_\bc_\be_\bd_\bu_\br_\be(_\bp_\ba_\br_\ba_\bm_\be_\bt_\be_\br_\bs)
220 Execute the object code associated with the named pro-
221 cedure or function.
222
223
224 P\bPr\bri\bin\bnt\bti\bin\bng\bg V\bVa\bar\bri\bia\bab\bbl\ble\bes\bs a\ban\bnd\bd E\bEx\bxp\bpr\bre\bes\bss\bsi\bio\bon\bns\bs
225
226
227 Names are resolved first using the static scope of the
228 current function, then using the dynamic scope if the name
229 is not defined in the static scope. If static and dynamic
230 searches do not yield a result, an arbitrary symbol is
231 chosen and the message ``[using _\bq_\bu_\ba_\bl_\bi_\bf_\bi_\be_\bd _\bn_\ba_\bm_\be]'' is
232 printed. The name resolution procedure may be overridden by
233 qualifying an identifier with a block name, e.g.,
234 ``_\bm_\bo_\bd_\bu_\bl_\be._\bv_\ba_\br_\bi_\ba_\bb_\bl_\be''. For C, source files are treated as
235 modules named by the file name without ``.c''.
236
237 Expressions are specified with an approximately common sub-
238 set of C and Pascal (or equivalently Modula-2) syntax.
239 Indirection can be denoted using either a prefix ``*'' or a
240 postfix ``^'' and array expressions are subscripted by
241 brackets (``[ ]''). The field reference operator (``.'')
242 can be used with pointers as well as records, making the C
243 operator ``->'' unnecessary (although it is supported).
244
245 Types of expressions are checked; the type of an expression
246 may be overridden by using ``_\bt_\by_\bp_\be-_\bn_\ba_\bm_\be(_\be_\bx_\bp_\br_\be_\bs_\bs_\bi_\bo_\bn)''. When
247 there is no corresponding named type the special constructs
248 ``&_\bt_\by_\bp_\be-_\bn_\ba_\bm_\be'' and ``$$_\bt_\ba_\bg-_\bn_\ba_\bm_\be'' can be used to represent a
249 pointer to a named type or C structure tag.
250
251
252 a\bas\bss\bsi\big\bgn\bn _\bv_\ba_\br_\bi_\ba_\bb_\bl_\be =\b= _\be_\bx_\bp_\br_\be_\bs_\bs_\bi_\bo_\bn
253 Assign the value of the expression to the variable.
254
255 d\bdu\bum\bmp\bp [_\bp_\br_\bo_\bc_\be_\bd_\bu_\br_\be] [>\b> _\bf_\bi_\bl_\be_\bn_\ba_\bm_\be]
256 Print the names and values of variables in the given
257 procedure, or the current one if none is specified. If
258
259
260
261Printed 7/9/88 January 12, 1986 4
262
263
264
265
266
267
268DBX(1) UNIX Programmer's Manual DBX(1)
269
270
271
272 the procedure given is ``.'', then the all active vari-
273 ables are dumped.
274
275 p\bpr\bri\bin\bnt\bt _\be_\bx_\bp_\br_\be_\bs_\bs_\bi_\bo_\bn [,\b, _\be_\bx_\bp_\br_\be_\bs_\bs_\bi_\bo_\bn ...]
276 Print out the values of the expressions.
277
278 w\bwh\bha\bat\bti\bis\bs _\bn_\ba_\bm_\be
279 Print the declaration of the given name, which may be
280 qualified with block names as above.
281
282 w\bwh\bhi\bic\bch\bh _\bi_\bd_\be_\bn_\bt_\bi_\bf_\bi_\be_\br
283 Print the full qualification of the given identifer,
284 i.e. the outer blocks that the identifier is associ-
285 ated with.
286
287 u\bup\bp [_\bc_\bo_\bu_\bn_\bt]
288 d\bdo\bow\bwn\bn [_\bc_\bo_\bu_\bn_\bt]
289 Move the current function, which is used for resolving
290 names, up or down the stack _\bc_\bo_\bu_\bn_\bt levels. The default
291 _\bc_\bo_\bu_\bn_\bt is 1.
292
293 w\bwh\bhe\ber\bre\be
294 Print out a list of the active procedures and function.
295
296 w\bwh\bhe\ber\bre\bei\bis\bs _\bi_\bd_\be_\bn_\bt_\bi_\bf_\bi_\be_\br
297 Print the full qualification of all the symbols whose
298 name matches the given identifier. The order in which
299 the symbols are printed is not meaningful.
300
301
302 A\bAc\bcc\bce\bes\bss\bsi\bin\bng\bg S\bSo\bou\bur\brc\bce\be F\bFi\bil\ble\bes\bs
303
304
305 /_\br_\be_\bg_\bu_\bl_\ba_\br _\be_\bx_\bp_\br_\be_\bs_\bs_\bi_\bo_\bn[/]
306 ?_\br_\be_\bg_\bu_\bl_\ba_\br _\be_\bx_\bp_\br_\be_\bs_\bs_\bi_\bo_\bn[?]
307 Search forward or backward in the current source file
308 for the given pattern.
309
310 e\bed\bdi\bit\bt [_\bf_\bi_\bl_\be_\bn_\ba_\bm_\be]
311 e\bed\bdi\bit\bt _\bp_\br_\bo_\bc_\be_\bd_\bu_\br_\be/_\bf_\bu_\bn_\bc_\bt_\bi_\bo_\bn-_\bn_\ba_\bm_\be
312 Invoke an editor on _\bf_\bi_\bl_\be_\bn_\ba_\bm_\be or the current source file
313 if none is specified. If a _\bp_\br_\bo_\bc_\be_\bd_\bu_\br_\be or _\bf_\bu_\bn_\bc_\bt_\bi_\bo_\bn name
314 is specified, the editor is invoked on the file that
315 contains it. Which editor is invoked by default
316 depends on the installation. The default can be over-
317 ridden by setting the environment variable EDITOR to
318 the name of the desired editor.
319
320 f\bfi\bil\ble\be [_\bf_\bi_\bl_\be_\bn_\ba_\bm_\be]
321 Change the current source file name to _\bf_\bi_\bl_\be_\bn_\ba_\bm_\be. If
322 none is specified then the current source file name is
323 printed.
324
325
326
327Printed 7/9/88 January 12, 1986 5
328
329
330
331
332
333
334DBX(1) UNIX Programmer's Manual DBX(1)
335
336
337
338 f\bfu\bun\bnc\bc [_\bp_\br_\bo_\bc_\be_\bd_\bu_\br_\be/_\bf_\bu_\bn_\bc_\bt_\bi_\bo_\bn]
339 Change the current function. If none is specified then
340 print the current function. Changing the current func-
341 tion implicitly changes the current source file to the
342 one that contains the function; it also changes the
343 current scope used for name resolution.
344
345 l\bli\bis\bst\bt [_\bs_\bo_\bu_\br_\bc_\be-_\bl_\bi_\bn_\be-_\bn_\bu_\bm_\bb_\be_\br [,\b, _\bs_\bo_\bu_\br_\bc_\be-_\bl_\bi_\bn_\be-_\bn_\bu_\bm_\bb_\be_\br]]
346 l\bli\bis\bst\bt _\bp_\br_\bo_\bc_\be_\bd_\bu_\br_\be/_\bf_\bu_\bn_\bc_\bt_\bi_\bo_\bn
347 List the lines in the current source file from the
348 first line number to the second inclusive. If no lines
349 are specified, the next 10 lines are listed. If the
350 name of a procedure or function is given lines _\bn-_\bk to
351 _\bn+_\bk are listed where _\bn is the first statement in the
352 procedure or function and _\bk is small.
353
354 u\bus\bse\be _\bd_\bi_\br_\be_\bc_\bt_\bo_\br_\by-_\bl_\bi_\bs_\bt
355 Set the list of directories to be searched when looking
356 for source files.
357
358
359 C\bCo\bom\bmm\bma\ban\bnd\bd A\bAl\bli\bia\bas\bse\bes\bs a\ban\bnd\bd V\bVa\bar\bri\bia\bab\bbl\ble\bes\bs
360
361
362 a\bal\bli\bia\bas\bs _\bn_\ba_\bm_\be _\bn_\ba_\bm_\be
363 a\bal\bli\bia\bas\bs _\bn_\ba_\bm_\be ``_\bs_\bt_\br_\bi_\bn_\bg''
364 a\bal\bli\bia\bas\bs _\bn_\ba_\bm_\be (_\bp_\ba_\br_\ba_\bm_\be_\bt_\be_\br_\bs) ``_\bs_\bt_\br_\bi_\bn_\bg''
365 When commands are processed, dbx first checks to see if
366 the word is an alias for either a command or a string.
367 If it is an alias, then dbx treats the input as though
368 the corresponding string (with values substituted for
369 any parameters) had been entered. For example, to
370 define an alias ``rr'' for the command ``rerun'', one
371 can say
372
373 alias rr rerun
374
375 To define an alias called ``b'' that sets a stop at a
376 particular line one can say
377
378 alias b(x) ``stop at x''
379
380 Subsequently, the command ``b(12)'' will expand to
381 ``stop at 12''.
382
383 s\bse\bet\bt _\bn_\ba_\bm_\be [= _\be_\bx_\bp_\br_\be_\bs_\bs_\bi_\bo_\bn]
384 The s\bse\bet\bt command defines values for debugger variables.
385 The names of these variables cannot conflict with names
386 in the program being debugged, and are expanded to the
387 corresponding expression within other commands. The
388 following variables have a special meaning:
389
390
391
392
393Printed 7/9/88 January 12, 1986 6
394
395
396
397
398
399
400DBX(1) UNIX Programmer's Manual DBX(1)
401
402
403
404 $frame
405 Setting this variable to an address causes dbx
406 to use the stack frame pointed to by the
407 address for doing stack traces and accessing
408 local variables. This facility is of particu-
409 lar use for kernel debugging.
410
411 $hexchars
412 $hexints
413 $hexoffsets
414 $hexstrings
415 When set, dbx prints out out characters,
416 integers, offsets from registers, or character
417 pointers respectively in hexadecimal.
418
419 $listwindow
420 The value of this variable specifies the number
421 of lines to list around a function or when the
422 l\bli\bis\bst\bt command is given without any parameters.
423 Its default value is 10.
424
425 $mapaddrs
426 Setting (unsetting) this variable causes dbx to
427 start (stop) mapping addresses. As with
428 ``$frame'', this is useful for kernel debug-
429 ging.
430
431 $unsafecall
432 $unsafeassign
433 When ``$unsafecall'' is set, strict type check-
434 ing is turned off for arguments to subroutine
435 or function calls (_\be._\bg. in the c\bca\bal\bll\bl statement).
436 When ``$unsafeassign'' is set, strict type
437 checking between the two sides of an a\bas\bss\bsi\big\bgn\bn
438 statement is turned off. These variables
439 should be used only with great care, because
440 they severely limit dbx's usefulness for
441 detecting errors.
442
443 u\bun\bna\bal\bli\bia\bas\bs _\bn_\ba_\bm_\be
444 Remove the alias with the given name.
445
446 u\bun\bns\bse\bet\bt _\bn_\ba_\bm_\be
447 Delete the debugger variable associated with _\bn_\ba_\bm_\be.
448
449
450
451
452
453
454
455
456
457
458
459Printed 7/9/88 January 12, 1986 7
460
461
462
463
464
465
466DBX(1) UNIX Programmer's Manual DBX(1)
467
468
469
470 M\bMa\bac\bch\bhi\bin\bne\be L\bLe\bev\bve\bel\bl C\bCo\bom\bmm\bma\ban\bnd\bds\bs
471
472
473 t\btr\bra\bac\bce\bei\bi [_\ba_\bd_\bd_\br_\be_\bs_\bs] [i\bif\bf _\bc_\bo_\bn_\bd]
474 t\btr\bra\bac\bce\bei\bi [_\bv_\ba_\br_\bi_\ba_\bb_\bl_\be] [a\bat\bt _\ba_\bd_\bd_\br_\be_\bs_\bs] [i\bif\bf _\bc_\bo_\bn_\bd]
475 s\bst\bto\bop\bpi\bi [_\ba_\bd_\bd_\br_\be_\bs_\bs] [i\bif\bf _\bc_\bo_\bn_\bd]
476 s\bst\bto\bop\bpi\bi [a\bat\bt] [_\ba_\bd_\bd_\br_\be_\bs_\bs] [i\bif\bf _\bc_\bo_\bn_\bd]
477 Turn on tracing or set a stop using a machine instruc-
478 tion address.
479
480 s\bst\bte\bep\bpi\bi
481 n\bne\bex\bxt\bti\bi
482 Single step as in s\bst\bte\bep\bp or n\bne\bex\bxt\bt, but do a single
483 instruction rather than source line.
484
485 _\ba_\bd_\bd_\br_\be_\bs_\bs ,\b,_\ba_\bd_\bd_\br_\be_\bs_\bs/\b/ [_\bm_\bo_\bd_\be]
486 _\ba_\bd_\bd_\br_\be_\bs_\bs /\b/ [_\bc_\bo_\bu_\bn_\bt] [_\bm_\bo_\bd_\be]
487 Print the contents of memory starting at the first
488 _\ba_\bd_\bd_\br_\be_\bs_\bs and continuing up to the second _\ba_\bd_\bd_\br_\be_\bs_\bs or
489 until _\bc_\bo_\bu_\bn_\bt items are printed. If the address is
490 ``.'', the address following the one printed most
491 recently is used. The _\bm_\bo_\bd_\be specifies how memory is to
492 be printed; if it is omitted the previous mode speci-
493 fied is used. The initial mode is ``X''. The follow-
494 ing modes are supported:
495
496 i\bi print the machine instruction
497 d\bd print a short word in decimal
498 D\bD print a long word in decimal
499 o\bo print a short word in octal
500 O\bO print a long word in octal
501 x\bx print a short word in hexadecimal
502 X\bX print a long word in hexadecimal
503 b\bb print a byte in octal
504 c\bc print a byte as a character
505 s\bs print a string of characters terminated by a null
506 byte
507 f\bf print a single precision real number
508 g\bg print a double precision real number
509
510
511 Symbolic addresses are specified by preceding the name with
512 an ``&''. Registers are denoted by ``$rN'' where N is the
513 number of the register. Addresses may be expressions made
514 up of other addresses and the operators ``+'', ``-'', and
515 indirection (unary ``*'').
516
517
518
519
520
521
522
523
524
525Printed 7/9/88 January 12, 1986 8
526
527
528
529
530
531
532DBX(1) UNIX Programmer's Manual DBX(1)
533
534
535
536 M\bMi\bis\bsc\bce\bel\bll\bla\ban\bne\beo\bou\bus\bs C\bCo\bom\bmm\bma\ban\bnd\bds\bs
537
538
539 g\bgr\bri\bip\bpe\be
540 Invoke a mail program to send a message to the person
541 in charge of _\bd_\bb_\bx.
542
543 h\bhe\bel\blp\bp Print out a synopsis of _\bd_\bb_\bx commands.
544
545 q\bqu\bui\bit\bt Exit _\bd_\bb_\bx.
546
547 s\bsh\bh _\bc_\bo_\bm_\bm_\ba_\bn_\bd-_\bl_\bi_\bn_\be
548 Pass the command line to the shell for execution. The
549 SHELL environment variable determines which shell is
550 used.
551
552 s\bso\bou\bur\brc\bce\be _\bf_\bi_\bl_\be_\bn_\ba_\bm_\be
553 Read _\bd_\bb_\bx commands from the given _\bf_\bi_\bl_\be_\bn_\ba_\bm_\be.
554
555F\bFI\bIL\bLE\bES\bS
556 a.out object file
557 .dbxinit initial commands
558
559S\bSE\bEE\bE A\bAL\bLS\bSO\bO
560 cc(1), f77(1), pc(1), mod(l)
561
562C\bCO\bOM\bMM\bME\bEN\bNT\bTS\bS
563 _\bD_\bb_\bx suffers from the same ``multiple include'' malady as did
564 _\bs_\bd_\bb. If you have a program consisting of a number of object
565 files and each is built from source files that include
566 header files, the symbolic information for the header files
567 is replicated in each object file. Since about one debugger
568 start-up is done for each link, having the linker (ld) re-
569 organize the symbol information would not save much time,
570 though it would reduce some of the disk space used.
571
572 This problem is an artifact of the unrestricted semantics of
573 #include's in C; for example an include file can contain
574 static declarations that are separate entities for each file
575 in which they are included. However, even with Modula-2
576 there is a substantial amount of duplication of symbol
577 information necessary for inter-module type checking.
578
579 Some problems remain with the support for individual
580 languages. Fortran problems include: inability to assign to
581 logical, logical*2, complex and double complex variables;
582 inability to represent parameter constants which are not
583 type integer or real; peculiar representation for the values
584 of dummy procedures (the value shown for a dummy procedure
585 is actually the first few bytes of the procedure text; to
586 find the location of the procedure, use ``&'' to take the
587 address of the variable).
588
589
590
591Printed 7/9/88 January 12, 1986 9
592
593
594