]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - share/man/man4/ddb.4
Remove deprecated GEOM classes
[FreeBSD/FreeBSD.git] / share / man / man4 / ddb.4
1 .\"
2 .\" Mach Operating System
3 .\" Copyright (c) 1991,1990 Carnegie Mellon University
4 .\" Copyright (c) 2007 Robert N. M. Watson
5 .\" All Rights Reserved.
6 .\"
7 .\" Permission to use, copy, modify and distribute this software and its
8 .\" documentation is hereby granted, provided that both the copyright
9 .\" notice and this permission notice appear in all copies of the
10 .\" software, derivative works or modified versions, and any portions
11 .\" thereof, and that both notices appear in supporting documentation.
12 .\"
13 .\" CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS"
14 .\" CONDITION.  CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR
15 .\" ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
16 .\"
17 .\" Carnegie Mellon requests users of this software to return to
18 .\"
19 .\"  Software Distribution Coordinator  or  Software.Distribution@CS.CMU.EDU
20 .\"  School of Computer Science
21 .\"  Carnegie Mellon University
22 .\"  Pittsburgh PA 15213-3890
23 .\"
24 .\" any improvements or extensions that they make and grant Carnegie Mellon
25 .\" the rights to redistribute these changes.
26 .\"
27 .\" changed a \# to #, since groff choked on it.
28 .\"
29 .\" HISTORY
30 .\" ddb.4,v
31 .\" Revision 1.1  1993/07/15  18:41:02  brezak
32 .\" Man page for DDB
33 .\"
34 .\" Revision 2.6  92/04/08  08:52:57  rpd
35 .\"     Changes from OSF.
36 .\"     [92/01/17  14:19:22  jsb]
37 .\"     Changes for OSF debugger modifications.
38 .\"     [91/12/12            tak]
39 .\"
40 .\" Revision 2.5  91/06/25  13:50:22  rpd
41 .\"     Added some watchpoint explanation.
42 .\"     [91/06/25            rpd]
43 .\"
44 .\" Revision 2.4  91/06/17  15:47:31  jsb
45 .\"     Added documentation for continue/c, match, search, and watchpoints.
46 .\"     I've not actually explained what a watchpoint is; maybe Rich can
47 .\"     do that (hint, hint).
48 .\"     [91/06/17  10:58:08  jsb]
49 .\"
50 .\" Revision 2.3  91/05/14  17:04:23  mrt
51 .\"     Correcting copyright
52 .\"
53 .\" Revision 2.2  91/02/14  14:10:06  mrt
54 .\"     Changed to new Mach copyright
55 .\"     [91/02/12  18:10:12  mrt]
56 .\"
57 .\" Revision 2.2  90/08/30  14:23:15  dbg
58 .\"     Created.
59 .\"     [90/08/30            dbg]
60 .\"
61 .\" $FreeBSD$
62 .\"
63 .Dd November 30, 2018
64 .Dt DDB 4
65 .Os
66 .Sh NAME
67 .Nm ddb
68 .Nd interactive kernel debugger
69 .Sh SYNOPSIS
70 In order to enable kernel debugging facilities include:
71 .Bd -ragged -offset indent
72 .Cd options KDB
73 .Cd options DDB
74 .Ed
75 .Pp
76 To prevent activation of the debugger on kernel
77 .Xr panic 9 :
78 .Bd -ragged -offset indent
79 .Cd options KDB_UNATTENDED
80 .Ed
81 .Pp
82 In order to print a stack trace of the current thread on the console
83 for a panic:
84 .Bd -ragged -offset indent
85 .Cd options KDB_TRACE
86 .Ed
87 .Pp
88 To print the numerical value of symbols in addition to the symbolic
89 representation, define:
90 .Bd -ragged -offset indent
91 .Cd options DDB_NUMSYM
92 .Ed
93 .Pp
94 To enable the
95 .Xr gdb 1
96 backend, so that remote debugging with
97 .Xr kgdb 1
98 is possible, include:
99 .Bd -ragged -offset indent
100 .Cd options GDB
101 .Ed
102 .Sh DESCRIPTION
103 The
104 .Nm
105 kernel debugger is an interactive debugger with a syntax inspired by
106 .Xr gdb 1 .
107 If linked into the running kernel,
108 it can be invoked locally with the
109 .Ql debug
110 .Xr keymap 5
111 action, usually mapped to Ctrl+Alt+Esc, or by setting the
112 .Va debug.kdb.enter
113 sysctl to 1.
114 The debugger is also invoked on kernel
115 .Xr panic 9
116 if the
117 .Va debug.debugger_on_panic
118 .Xr sysctl 8
119 MIB variable is set non-zero,
120 which is the default
121 unless the
122 .Dv KDB_UNATTENDED
123 option is specified.
124 .Pp
125 The current location is called
126 .Va dot .
127 The
128 .Va dot
129 is displayed with
130 a hexadecimal format at a prompt.
131 The commands
132 .Ic examine
133 and
134 .Ic write
135 update
136 .Va dot
137 to the address of the last line
138 examined or the last location modified, and set
139 .Va next
140 to the address of
141 the next location to be examined or changed.
142 Other commands do not change
143 .Va dot ,
144 and set
145 .Va next
146 to be the same as
147 .Va dot .
148 .Pp
149 The general command syntax is:
150 .Ar command Ns Op Li / Ns Ar modifier
151 .Oo Ar addr Oc Ns Op , Ns Ar count
152 .Pp
153 A blank line repeats the previous command from the address
154 .Va next
155 with
156 count 1 and no modifiers.
157 Specifying
158 .Ar addr
159 sets
160 .Va dot
161 to the address.
162 Omitting
163 .Ar addr
164 uses
165 .Va dot .
166 A missing
167 .Ar count
168 is taken
169 to be 1 for printing commands or infinity for stack traces.
170 A
171 .Ar count
172 of -1 is equivalent to a missing
173 .Ar count .
174 Options that are supplied but not supported by the given
175 .Ar command
176 are usually ignored.
177 .Pp
178 The
179 .Nm
180 debugger has a pager feature (like the
181 .Xr more 1
182 command)
183 for the output.
184 If an output line exceeds the number set in the
185 .Va lines
186 variable, it displays
187 .Dq Li --More--
188 and waits for a response.
189 The valid responses for it are:
190 .Pp
191 .Bl -tag -compact -width ".Li SPC"
192 .It Li SPC
193 one more page
194 .It Li RET
195 one more line
196 .It Li q
197 abort the current command, and return to the command input mode
198 .El
199 .Pp
200 Finally,
201 .Nm
202 provides a small (currently 10 items) command history, and offers
203 simple
204 .Nm emacs Ns -style
205 command line editing capabilities.
206 In addition to
207 the
208 .Nm emacs
209 control keys, the usual
210 .Tn ANSI
211 arrow keys may be used to
212 browse through the history buffer, and move the cursor within the
213 current line.
214 .Sh COMMANDS
215 .Bl -tag -width indent -compact
216 .It Xo
217 .Ic examine Ns Op Li / Ns Cm AISabcdghilmorsuxz ...
218 .Oo Ar addr Oc Ns Op , Ns Ar count
219 .Xc
220 .It Xo
221 .Ic x       Ns Op Li / Ns Cm AISabcdghilmorsuxz ...
222 .Oo Ar addr Oc Ns Op , Ns Ar count
223 .Xc
224 Display the addressed locations according to the formats in the modifier.
225 Multiple modifier formats display multiple locations.
226 If no format is specified, the last format specified for this command
227 is used.
228 .Pp
229 The format characters are:
230 .Bl -tag -compact -width indent
231 .It Cm b
232 look at by bytes (8 bits)
233 .It Cm h
234 look at by half words (16 bits)
235 .It Cm l
236 look at by long words (32 bits)
237 .It Cm g
238 look at by quad words (64 bits)
239 .It Cm a
240 print the location being displayed
241 .It Cm A
242 print the location with a line number if possible
243 .It Cm x
244 display in unsigned hex
245 .It Cm z
246 display in signed hex
247 .It Cm o
248 display in unsigned octal
249 .It Cm d
250 display in signed decimal
251 .It Cm u
252 display in unsigned decimal
253 .It Cm r
254 display in current radix, signed
255 .It Cm c
256 display low 8 bits as a character.
257 Non-printing characters are displayed as an octal escape code (e.g.,
258 .Ql \e000 ) .
259 .It Cm s
260 display the null-terminated string at the location.
261 Non-printing characters are displayed as octal escapes.
262 .It Cm m
263 display in unsigned hex with character dump at the end of each line.
264 The location is also displayed in hex at the beginning of each line.
265 .It Cm i
266 display as a disassembled instruction
267 .It Cm I
268 display as an disassembled instruction with possible alternate formats depending on the
269 machine.
270 On i386, this selects the alternate format for the instruction decoding
271 (16 bits in a 32-bit code segment and vice versa).
272 .It Cm S
273 display a symbol name for the pointer stored at the address
274 .El
275 .Pp
276 .It Ic xf
277 Examine forward:
278 execute an
279 .Ic examine
280 command with the last specified parameters to it
281 except that the next address displayed by it is used as the start address.
282 .Pp
283 .It Ic xb
284 Examine backward:
285 execute an
286 .Ic examine
287 command with the last specified parameters to it
288 except that the last start address subtracted by the size displayed by it
289 is used as the start address.
290 .Pp
291 .It Ic print Ns Op Li / Ns Cm acdoruxz
292 .It Ic p Ns Op Li / Ns Cm acdoruxz
293 Print
294 .Ar addr Ns s
295 according to the modifier character (as described above for
296 .Cm examine ) .
297 Valid formats are:
298 .Cm a , x , z , o , d , u , r ,
299 and
300 .Cm c .
301 If no modifier is specified, the last one specified to it is used.
302 The argument
303 .Ar addr
304 can be a string, in which case it is printed as it is.
305 For example:
306 .Bd -literal -offset indent
307 print/x "eax = " $eax "\enecx = " $ecx "\en"
308 .Ed
309 .Pp
310 will print like:
311 .Bd -literal -offset indent
312 eax = xxxxxx
313 ecx = yyyyyy
314 .Ed
315 .Pp
316 .It Xo
317 .Ic write Ns Op Li / Ns Cm bhl
318 .Ar addr expr1 Op Ar expr2 ...
319 .Xc
320 .It Xo
321 .Ic w Ns Op Li / Ns Cm bhl
322 .Ar addr expr1 Op Ar expr2 ...
323 .Xc
324 Write the expressions specified after
325 .Ar addr
326 on the command line at succeeding locations starting with
327 .Ar addr .
328 The write unit size can be specified in the modifier with a letter
329 .Cm b
330 (byte),
331 .Cm h
332 (half word) or
333 .Cm l
334 (long word) respectively.
335 If omitted,
336 long word is assumed.
337 .Pp
338 .Sy Warning :
339 since there is no delimiter between expressions, strange
340 things may happen.
341 It is best to enclose each expression in parentheses.
342 .Pp
343 .It Ic set Li $ Ns Ar variable Oo Li = Oc Ar expr
344 Set the named variable or register with the value of
345 .Ar expr .
346 Valid variable names are described below.
347 .Pp
348 .It Ic break Ns Oo Li / Ns Cm u Oc Oo Ar addr Oc Ns Op , Ns Ar count
349 .It Ic b     Ns Oo Li / Ns Cm u Oc Oo Ar addr Oc Ns Op , Ns Ar count
350 Set a break point at
351 .Ar addr .
352 If
353 .Ar count
354 is supplied, the
355 .Ic continue
356 command will not stop at this break point on the first
357 .Ar count
358 \- 1 times that it is hit.
359 If the break point is set, a break point number is
360 printed with
361 .Ql # .
362 This number can be used in deleting the break point
363 or adding conditions to it.
364 .Pp
365 If the
366 .Cm u
367 modifier is specified, this command sets a break point in user
368 address space.
369 Without the
370 .Cm u
371 option, the address is considered to be in the kernel
372 space, and a wrong space address is rejected with an error message.
373 This modifier can be used only if it is supported by machine dependent
374 routines.
375 .Pp
376 .Sy Warning :
377 If a user text is shadowed by a normal user space debugger,
378 user space break points may not work correctly.
379 Setting a break
380 point at the low-level code paths may also cause strange behavior.
381 .Pp
382 .It Ic delete Op Ar addr
383 .It Ic d      Op Ar addr
384 .It Ic delete Li # Ns Ar number
385 .It Ic d      Li # Ns Ar number
386 Delete the specified break point.
387 The break point can be specified by a
388 break point number with
389 .Ql # ,
390 or by using the same
391 .Ar addr
392 specified in the original
393 .Ic break
394 command, or by omitting
395 .Ar addr
396 to get the default address of
397 .Va dot .
398 .Pp
399 .It Ic watch Oo Ar addr Oc Ns Op , Ns Ar size
400 Set a watchpoint for a region.
401 Execution stops when an attempt to modify the region occurs.
402 The
403 .Ar size
404 argument defaults to 4.
405 If you specify a wrong space address, the request is rejected
406 with an error message.
407 .Pp
408 .Sy Warning :
409 Attempts to watch wired kernel memory
410 may cause unrecoverable error in some systems such as i386.
411 Watchpoints on user addresses work best.
412 .Pp
413 .It Ic hwatch Oo Ar addr Oc Ns Op , Ns Ar size
414 Set a hardware watchpoint for a region if supported by the
415 architecture.
416 Execution stops when an attempt to modify the region occurs.
417 The
418 .Ar size
419 argument defaults to 4.
420 .Pp
421 .Sy Warning :
422 The hardware debug facilities do not have a concept of separate
423 address spaces like the watch command does.
424 Use
425 .Ic hwatch
426 for setting watchpoints on kernel address locations only, and avoid
427 its use on user mode address spaces.
428 .Pp
429 .It Ic dhwatch Oo Ar addr Oc Ns Op , Ns Ar size
430 Delete specified hardware watchpoint.
431 .Pp
432 .It Ic step Ns Oo Li / Ns Cm p Oc Ns Op , Ns Ar count
433 .It Ic s    Ns Oo Li / Ns Cm p Oc Ns Op , Ns Ar count
434 Single step
435 .Ar count
436 times.
437 If the
438 .Cm p
439 modifier is specified, print each instruction at each step.
440 Otherwise, only print the last instruction.
441 .Pp
442 .Sy Warning :
443 depending on machine type, it may not be possible to
444 single-step through some low-level code paths or user space code.
445 On machines with software-emulated single-stepping (e.g., pmax),
446 stepping through code executed by interrupt handlers will probably
447 do the wrong thing.
448 .Pp
449 .It Ic continue Ns Op Li / Ns Cm c
450 .It Ic c Ns Op Li / Ns Cm c
451 Continue execution until a breakpoint or watchpoint.
452 If the
453 .Cm c
454 modifier is specified, count instructions while executing.
455 Some machines (e.g., pmax) also count loads and stores.
456 .Pp
457 .Sy Warning :
458 when counting, the debugger is really silently single-stepping.
459 This means that single-stepping on low-level code may cause strange
460 behavior.
461 .Pp
462 .It Ic until Ns Op Li / Ns Cm p
463 Stop at the next call or return instruction.
464 If the
465 .Cm p
466 modifier is specified, print the call nesting depth and the
467 cumulative instruction count at each call or return.
468 Otherwise,
469 only print when the matching return is hit.
470 .Pp
471 .It Ic next Ns Op Li / Ns Cm p
472 .It Ic match Ns Op Li / Ns Cm p
473 Stop at the matching return instruction.
474 If the
475 .Cm p
476 modifier is specified, print the call nesting depth and the
477 cumulative instruction count at each call or return.
478 Otherwise, only print when the matching return is hit.
479 .Pp
480 .It Xo
481 .Ic trace Ns Op Li / Ns Cm u
482 .Op Ar pid | tid Ns
483 .Op , Ns Ar count
484 .Xc
485 .It Xo
486 .Ic t Ns Op Li / Ns Cm u
487 .Op Ar pid | tid Ns
488 .Op , Ns Ar count
489 .Xc
490 .It Xo
491 .Ic where Ns Op Li / Ns Cm u
492 .Op Ar pid | tid Ns
493 .Op , Ns Ar count
494 .Xc
495 .It Xo
496 .Ic bt Ns Op Li / Ns Cm u
497 .Op Ar pid | tid Ns
498 .Op , Ns Ar count
499 .Xc
500 Stack trace.
501 The
502 .Cm u
503 option traces user space; if omitted,
504 .Ic trace
505 only traces
506 kernel space.
507 The optional argument
508 .Ar count
509 is the number of frames to be traced.
510 If
511 .Ar count
512 is omitted, all frames are printed.
513 .Pp
514 .Sy Warning :
515 User space stack trace is valid
516 only if the machine dependent code supports it.
517 .Pp
518 .It Xo
519 .Ic search Ns Op Li / Ns Cm bhl
520 .Ar addr
521 .Ar value
522 .Op Ar mask Ns
523 .Op , Ns Ar count
524 .Xc
525 Search memory for
526 .Ar value .
527 The optional
528 .Ar count
529 argument limits the search.
530 .\"
531 .Pp
532 .It Xo
533 .Ic findstack
534 .Ar addr
535 .Xc
536 Prints the thread address for a thread kernel-mode stack of which contains the
537 specified address.
538 If the thread is not found, search the thread stack cache and prints the
539 cached stack address.
540 Otherwise, prints nothing.
541 .Pp
542 .It Ic show Cm all procs Ns Op Li / Ns Cm a
543 .It Ic ps Ns Op Li / Ns Cm a
544 Display all process information.
545 The process information may not be shown if it is not
546 supported in the machine, or the bottom of the stack of the
547 target process is not in the main memory at that time.
548 The
549 .Cm a
550 modifier will print command line arguments for each process.
551 .\"
552 .Pp
553 .It Ic show Cm all trace
554 .It Ic alltrace
555 Show a stack trace for every thread in the system.
556 .Pp
557 .It Ic show Cm all ttys
558 Show all TTY's within the system.
559 Output is similar to
560 .Xr pstat 8 ,
561 but also includes the address of the TTY structure.
562 .\"
563 .Pp
564 .It Ic show Cm all vnets
565 Show the same output as "show vnet" does, but lists all
566 virtualized network stacks within the system.
567 .\"
568 .Pp
569 .It Ic show Cm allchains
570 Show the same information like "show lockchain" does, but
571 for every thread in the system.
572 .\"
573 .Pp
574 .It Ic show Cm alllocks
575 Show all locks that are currently held.
576 This command is only available if
577 .Xr witness 4
578 is included in the kernel.
579 .\"
580 .Pp
581 .It Ic show Cm allpcpu
582 The same as "show pcpu", but for every CPU present in the system.
583 .\"
584 .Pp
585 .It Ic show Cm allrman
586 Show information related with resource management, including
587 interrupt request lines, DMA request lines, I/O ports, I/O memory
588 addresses, and Resource IDs.
589 .\"
590 .Pp
591 .It Ic show Cm apic
592 Dump data about APIC IDT vector mappings.
593 .\"
594 .Pp
595 .It Ic show Cm breaks
596 Show breakpoints set with the "break" command.
597 .\"
598 .Pp
599 .It Ic show Cm bio Ar addr
600 Show information about the bio structure
601 .Vt struct bio
602 present at
603 .Ar addr .
604 See the
605 .Pa sys/bio.h
606 header file and
607 .Xr g_bio 9
608 for more details on the exact meaning of the structure fields.
609 .\"
610 .Pp
611 .It Ic show Cm buffer Ar addr
612 Show information about the buf structure
613 .Vt struct buf
614 present at
615 .Ar addr .
616 See the
617 .Pa sys/buf.h
618 header file for more details on the exact meaning of the structure fields.
619 .\"
620 .Pp
621 .It Ic show Cm callout Ar addr
622 Show information about the callout structure
623 .Vt struct callout
624 present at
625 .Ar addr .
626 .\"
627 .Pp
628 .It Ic show Cm cbstat
629 Show brief information about the TTY subsystem.
630 .\"
631 .Pp
632 .It Ic show Cm cdev
633 Without argument, show the list of all created cdev's, consisting of devfs
634 node name and struct cdev address.
635 When address of cdev is supplied, show some internal devfs state of the cdev.
636 .\"
637 .Pp
638 .It Ic show Cm conifhk
639 Lists hooks currently waiting for completion in
640 run_interrupt_driven_config_hooks().
641 .\"
642 .Pp
643 .It Ic show Cm cpusets
644 Print numbered root and assigned CPU affinity sets.
645 See
646 .Xr cpuset 2
647 for more details.
648 .\"
649 .Pp
650 .It Ic show Cm cyrixreg
651 Show registers specific to the Cyrix processor.
652 .\"
653 .Pp
654 .It Ic show Cm devmap
655 Prints the contents of the static device mapping table.
656 Currently only available on the
657 ARM
658 architecture.
659 .\"
660 .Pp
661 .It Ic show Cm domain Ar addr
662 Print protocol domain structure
663 .Vt struct domain
664 at address
665 .Ar addr .
666 See the
667 .Pa sys/domain.h
668 header file for more details on the exact meaning of the structure fields.
669 .\"
670 .Pp
671 .It Ic show Cm ffs Op Ar addr
672 Show brief information about ffs mount at the address
673 .Ar addr ,
674 if argument is given.
675 Otherwise, provides the summary about each ffs mount.
676 .\"
677 .Pp
678 .It Ic show Cm file Ar addr
679 Show information about the file structure
680 .Vt struct file
681 present at address
682 .Ar addr .
683 .\"
684 .Pp
685 .It Ic show Cm files
686 Show information about every file structure in the system.
687 .\"
688 .Pp
689 .It Ic show Cm freepages
690 Show the number of physical pages in each of the free lists.
691 .\"
692 .Pp
693 .It Ic show Cm geom Op Ar addr
694 If the
695 .Ar addr
696 argument is not given, displays the entire GEOM topology.
697 If
698 .Ar addr
699 is given, displays details about the given GEOM object (class, geom,
700 provider or consumer).
701 .\"
702 .Pp
703 .It Ic show Cm idt
704 Show IDT layout.
705 The first column specifies the IDT vector.
706 The second one is the name of the interrupt/trap handler.
707 Those functions are machine dependent.
708 .\"
709 .Pp
710 .It Ic show Cm igi_list Ar addr
711 Show information about the IGMP structure
712 .Vt struct igmp_ifsoftc
713 present at
714 .Ar addr .
715 .\"
716 .Pp
717 .It Ic show Cm inodedeps Op Ar addr
718 Show brief information about each inodedep structure.
719 If
720 .Ar addr
721 is given, only inodedeps belonging to the fs located at the
722 supplied address are shown.
723 .\"
724 .Pp
725 .It Ic show Cm inpcb Ar addr
726 Show information on IP Control Block
727 .Vt struct in_pcb
728 present at
729 .Ar addr .
730 .\"
731 .Pp
732 .It Ic show Cm intr
733 Dump information about interrupt handlers.
734 .\"
735 .Pp
736 .It Ic show Cm intrcnt
737 Dump the interrupt statistics.
738 .\"
739 .Pp
740 .It Ic show Cm irqs
741 Show interrupt lines and their respective kernel threads.
742 .\"
743 .Pp
744 .It Ic show Cm jails
745 Show the list of
746 .Xr jail 8
747 instances.
748 In addition to what
749 .Xr jls 8
750 shows, also list kernel internal details.
751 .\"
752 .Pp
753 .It Ic show Cm lapic
754 Show information from the local APIC registers for this CPU.
755 .\"
756 .Pp
757 .It Ic show Cm lock Ar addr
758 Show lock structure.
759 The output format is as follows:
760 .Bl -tag -width "flags"
761 .It Ic class:
762 Class of the lock.
763 Possible types include
764 .Xr mutex 9 ,
765 .Xr rmlock 9 ,
766 .Xr rwlock 9 ,
767 .Xr sx 9 .
768 .It Ic name:
769 Name of the lock.
770 .It Ic flags:
771 Flags passed to the lock initialization function.
772 .Em flags
773 values are lock class specific.
774 .It Ic state:
775 Current state of a lock.
776 .Em state
777 values are lock class specific.
778 .It Ic owner:
779 Lock owner.
780 .El
781 .\"
782 .Pp
783 .It Ic show Cm lockchain Ar addr
784 Show all threads a particular thread at address
785 .Ar addr
786 is waiting on based on non-spin locks.
787 .\"
788 .Pp
789 .It Ic show Cm lockedbufs
790 Show the same information as "show buf", but for every locked
791 .Vt struct buf
792 object.
793 .\"
794 .Pp
795 .It Ic show Cm lockedvnods
796 List all locked vnodes in the system.
797 .\"
798 .Pp
799 .It Ic show Cm locks
800 Prints all locks that are currently acquired.
801 This command is only available if
802 .Xr witness 4
803 is included in the kernel.
804 .\"
805 .Pp
806 .It Ic show Cm locktree
807 .\"
808 .Pp
809 .It Ic show Cm malloc
810 Prints
811 .Xr malloc 9
812 memory allocator statistics.
813 The output format is as follows:
814 .Pp
815 .Bl -tag -compact -offset indent -width "Requests"
816 .It Ic Type
817 Specifies a type of memory.
818 It is the same as a description string used while defining the
819 given memory type with
820 .Xr MALLOC_DECLARE 9 .
821 .It Ic InUse
822 Number of memory allocations of the given type, for which
823 .Xr free 9
824 has not been called yet.
825 .It Ic MemUse
826 Total memory consumed by the given allocation type.
827 .It Ic Requests
828 Number of memory allocation requests for the given
829 memory type.
830 .El
831 .Pp
832 The same information can be gathered in userspace with
833 .Dq Nm vmstat Fl m .
834 .\"
835 .Pp
836 .It Ic show Cm map Ns Oo Li / Ns Cm f Oc Ar addr
837 Prints the VM map at
838 .Ar addr .
839 If the
840 .Cm f
841 modifier is specified the
842 complete map is printed.
843 .\"
844 .Pp
845 .It Ic show Cm msgbuf
846 Print the system's message buffer.
847 It is the same output as in the
848 .Dq Nm dmesg
849 case.
850 It is useful if you got a kernel panic, attached a serial cable
851 to the machine and want to get the boot messages from before the
852 system hang.
853 .\"
854 .It Ic show Cm mount
855 Displays short info about all currently mounted file systems.
856 .Pp
857 .It Ic show Cm mount Ar addr
858 Displays details about the given mount point.
859 .\"
860 .Pp
861 .It Ic show Cm object Ns Oo Li / Ns Cm f Oc Ar addr
862 Prints the VM object at
863 .Ar addr .
864 If the
865 .Cm f
866 option is specified the
867 complete object is printed.
868 .\"
869 .Pp
870 .It Ic show Cm panic
871 Print the panic message if set.
872 .\"
873 .Pp
874 .It Ic show Cm page
875 Show statistics on VM pages.
876 .\"
877 .Pp
878 .It Ic show Cm pageq
879 Show statistics on VM page queues.
880 .\"
881 .Pp
882 .It Ic show Cm pciregs
883 Print PCI bus registers.
884 The same information can be gathered in userspace by running
885 .Dq Nm pciconf Fl lv .
886 .\"
887 .Pp
888 .It Ic show Cm pcpu
889 Print current processor state.
890 The output format is as follows:
891 .Pp
892 .Bl -tag -compact -offset indent -width "spin locks held:"
893 .It Ic cpuid
894 Processor identifier.
895 .It Ic curthread
896 Thread pointer, process identifier and the name of the process.
897 .It Ic curpcb
898 Control block pointer.
899 .It Ic fpcurthread
900 FPU thread pointer.
901 .It Ic idlethread
902 Idle thread pointer.
903 .It Ic APIC ID
904 CPU identifier coming from APIC.
905 .It Ic currentldt
906 LDT pointer.
907 .It Ic spin locks held
908 Names of spin locks held.
909 .El
910 .\"
911 .Pp
912 .It Ic show Cm pgrpdump
913 Dump process groups present within the system.
914 .\"
915 .Pp
916 .It Ic show Cm proc Op Ar addr
917 If no
918 .Op Ar addr
919 is specified, print information about the current process.
920 Otherwise, show information about the process at address
921 .Ar addr .
922 .\"
923 .Pp
924 .It Ic show Cm procvm
925 Show process virtual memory layout.
926 .\"
927 .Pp
928 .It Ic show Cm protosw Ar addr
929 Print protocol switch structure
930 .Vt struct protosw
931 at address
932 .Ar addr .
933 .\"
934 .Pp
935 .It Ic show Cm registers Ns Op Li / Ns Cm u
936 Display the register set.
937 If the
938 .Cm u
939 modifier is specified, it displays user registers instead of
940 kernel registers or the currently saved one.
941 .Pp
942 .Sy Warning :
943 The support of the
944 .Cm u
945 modifier depends on the machine.
946 If not supported, incorrect information will be displayed.
947 .\"
948 .Pp
949 .It Ic show Cm rman Ar addr
950 Show resource manager object
951 .Vt struct rman
952 at address
953 .Ar addr .
954 Addresses of particular pointers can be gathered with "show allrman"
955 command.
956 .\"
957 .Pp
958 .It Ic show Cm rtc
959 Show real time clock value.
960 Useful for long debugging sessions.
961 .\"
962 .Pp
963 .It Ic show Cm sleepchain
964 Deprecated.
965 Now an alias for
966 .Ic show Cm lockchain .
967 .\"
968 .Pp
969 .It Ic show Cm sleepq
970 .It Ic show Cm sleepqueue
971 Both commands provide the same functionality.
972 They show sleepqueue
973 .Vt struct sleepqueue
974 structure.
975 Sleepqueues are used within the
976 .Fx
977 kernel to implement sleepable
978 synchronization primitives (thread holding a lock might sleep or
979 be context switched), which at the time of writing are:
980 .Xr condvar 9 ,
981 .Xr sx 9
982 and standard
983 .Xr msleep 9
984 interface.
985 .\"
986 .Pp
987 .It Ic show Cm sockbuf Ar addr
988 .It Ic show Cm socket Ar addr
989 Those commands print
990 .Vt struct sockbuf
991 and
992 .Vt struct socket
993 objects placed at
994 .Ar addr .
995 Output consists of all values present in structures mentioned.
996 For exact interpretation and more details, visit
997 .Pa sys/socket.h
998 header file.
999 .\"
1000 .Pp
1001 .It Ic show Cm sysregs
1002 Show system registers (e.g.,
1003 .Li cr0-4
1004 on i386.)
1005 Not present on some platforms.
1006 .\"
1007 .Pp
1008 .It Ic show Cm tcpcb Ar addr
1009 Print TCP control block
1010 .Vt struct tcpcb
1011 lying at address
1012 .Ar addr .
1013 For exact interpretation of output, visit
1014 .Pa netinet/tcp.h
1015 header file.
1016 .\"
1017 .Pp
1018 .It Ic show Cm thread Op Ar addr | tid
1019 If no
1020 .Ar addr
1021 or
1022 .Ar tid
1023 is specified, show detailed information about current thread.
1024 Otherwise, print information about the thread with ID
1025 .Ar tid
1026 or kernel address
1027 .Ar addr .
1028 (If the argument is a decimal number, it is assumed to be a tid.)
1029 .\"
1030 .Pp
1031 .It Ic show Cm threads
1032 Show all threads within the system.
1033 Output format is as follows:
1034 .Pp
1035 .Bl -tag -compact -offset indent -width "Second column"
1036 .It Ic First column
1037 Thread identifier (TID)
1038 .It Ic Second column
1039 Thread structure address
1040 .It Ic Third column
1041 Backtrace.
1042 .El
1043 .\"
1044 .Pp
1045 .It Ic show Cm tty Ar addr
1046 Display the contents of a TTY structure in a readable form.
1047 .\"
1048 .Pp
1049 .It Ic show Cm turnstile Ar addr
1050 Show turnstile
1051 .Vt struct turnstile
1052 structure at address
1053 .Ar addr .
1054 Turnstiles are structures used within the
1055 .Fx
1056 kernel to implement
1057 synchronization primitives which, while holding a specific type of lock, cannot
1058 sleep or context switch to another thread.
1059 Currently, those are:
1060 .Xr mutex 9 ,
1061 .Xr rwlock 9 ,
1062 .Xr rmlock 9 .
1063 .\"
1064 .Pp
1065 .It Ic show Cm uma
1066 Show UMA allocator statistics.
1067 Output consists five columns:
1068 .Pp
1069 .Bl -tag -compact -offset indent -width "Requests"
1070 .It Cm "Zone"
1071 Name of the UMA zone.
1072 The same string that was passed to
1073 .Xr uma_zcreate 9
1074 as a first argument.
1075 .It Cm "Size"
1076 Size of a given memory object (slab).
1077 .It Cm "Used"
1078 Number of slabs being currently used.
1079 .It Cm "Free"
1080 Number of free slabs within the UMA zone.
1081 .It Cm "Requests"
1082 Number of allocations requests to the given zone.
1083 .El
1084 .Pp
1085 The very same information might be gathered in the userspace
1086 with the help of
1087 .Dq Nm vmstat Fl z .
1088 .\"
1089 .Pp
1090 .It Ic show Cm unpcb Ar addr
1091 Shows UNIX domain socket private control block
1092 .Vt struct unpcb
1093 present at the address
1094 .Ar addr .
1095 .\"
1096 .Pp
1097 .It Ic show Cm vmochk
1098 Prints, whether the internal VM objects are in a map somewhere
1099 and none have zero ref counts.
1100 .\"
1101 .Pp
1102 .It Ic show Cm vmopag
1103 This is supposed to show physical addresses consumed by a
1104 VM object.
1105 Currently, it is not possible to use this command when
1106 .Xr witness 4
1107 is compiled in the kernel.
1108 .\"
1109 .Pp
1110 .It Ic show Cm vnet Ar addr
1111 Prints virtualized network stack
1112 .Vt struct vnet
1113 structure present at the address
1114 .Ar addr .
1115 .\"
1116 .Pp
1117 .It Ic show Cm vnode Op Ar addr
1118 Prints vnode
1119 .Vt struct vnode
1120 structure lying at
1121 .Op Ar addr .
1122 For the exact interpretation of the output, look at the
1123 .Pa sys/vnode.h
1124 header file.
1125 .\"
1126 .Pp
1127 .It Ic show Cm vnodebufs Ar addr
1128 Shows clean/dirty buffer lists of the vnode located at
1129 .Ar addr .
1130 .\"
1131 .Pp
1132 .It Ic show Cm vpath Ar addr
1133 Walk the namecache to lookup the pathname of the vnode located at
1134 .Ar addr .
1135 .\"
1136 .Pp
1137 .It Ic show Cm watches
1138 Displays all watchpoints.
1139 Shows watchpoints set with "watch" command.
1140 .\"
1141 .Pp
1142 .It Ic show Cm witness
1143 Shows information about lock acquisition coming from the
1144 .Xr witness 4
1145 subsystem.
1146 .\"
1147 .Pp
1148 .It Ic gdb
1149 Toggles between remote GDB and DDB mode.
1150 In remote GDB mode, another machine is required that runs
1151 .Xr gdb 1
1152 using the remote debug feature, with a connection to the serial
1153 console port on the target machine.
1154 Currently only available on the
1155 i386
1156 architecture.
1157 .Pp
1158 .It Ic halt
1159 Halt the system.
1160 .Pp
1161 .It Ic kill Ar sig pid
1162 Send signal
1163 .Ar sig
1164 to process
1165 .Ar pid .
1166 The signal is acted on upon returning from the debugger.
1167 This command can be used to kill a process causing resource contention
1168 in the case of a hung system.
1169 See
1170 .Xr signal 3
1171 for a list of signals.
1172 Note that the arguments are reversed relative to
1173 .Xr kill 2 .
1174 .Pp
1175 .It Ic reboot Op Ar seconds
1176 .It Ic reset Op Ar seconds
1177 Hard reset the system.
1178 If the optional argument
1179 .Ar seconds
1180 is given, the debugger will wait for this long, at most a week,
1181 before rebooting.
1182 .Pp
1183 .It Ic help
1184 Print a short summary of the available commands and command
1185 abbreviations.
1186 .Pp
1187 .It Ic capture on
1188 .It Ic capture off
1189 .It Ic capture reset
1190 .It Ic capture status
1191 .Nm
1192 supports a basic output capture facility, which can be used to retrieve the
1193 results of debugging commands from userspace using
1194 .Xr sysctl 3 .
1195 .Ic capture on
1196 enables output capture;
1197 .Ic capture off
1198 disables capture.
1199 .Ic capture reset
1200 will clear the capture buffer and disable capture.
1201 .Ic capture status
1202 will report current buffer use, buffer size, and disposition of output
1203 capture.
1204 .Pp
1205 Userspace processes may inspect and manage
1206 .Nm
1207 capture state using
1208 .Xr sysctl 8 :
1209 .Pp
1210 .Va debug.ddb.capture.bufsize
1211 may be used to query or set the current capture buffer size.
1212 .Pp
1213 .Va debug.ddb.capture.maxbufsize
1214 may be used to query the compile-time limit on the capture buffer size.
1215 .Pp
1216 .Va debug.ddb.capture.bytes
1217 may be used to query the number of bytes of output currently in the capture
1218 buffer.
1219 .Pp
1220 .Va debug.ddb.capture.data
1221 returns the contents of the buffer as a string to an appropriately privileged
1222 process.
1223 .Pp
1224 This facility is particularly useful in concert with the scripting and
1225 .Xr textdump 4
1226 facilities, allowing scripted debugging output to be captured and
1227 committed to disk as part of a textdump for later analysis.
1228 The contents of the capture buffer may also be inspected in a kernel core dump
1229 using
1230 .Xr kgdb 1 .
1231 .Pp
1232 .It Ic run
1233 .It Ic script
1234 .It Ic scripts
1235 .It Ic unscript
1236 Run, define, list, and delete scripts.
1237 See the
1238 .Sx SCRIPTING
1239 section for more information on the scripting facility.
1240 .Pp
1241 .It Ic textdump dump
1242 .It Ic textdump set
1243 .It Ic textdump status
1244 .It Ic textdump unset
1245 Use the
1246 .Ic textdump dump
1247 command to immediately perform a textdump.
1248 More information may be found in
1249 .Xr textdump 4 .
1250 The
1251 .Ic textdump set
1252 command may be used to force the next kernel core dump to be a textdump
1253 rather than a traditional memory dump or minidump.
1254 .Ic textdump status
1255 reports whether a textdump has been scheduled.
1256 .Ic textdump unset
1257 cancels a request to perform a textdump as the next kernel core dump.
1258 .Pp
1259 .It Ic thread Ar addr | tid
1260 Switch the debugger to the thread with ID
1261 .Ar tid ,
1262 if the argument is a decimal number, or address
1263 .Ar addr ,
1264 otherwise.
1265 .El
1266 .Sh VARIABLES
1267 The debugger accesses registers and variables as
1268 .Li $ Ns Ar name .
1269 Register names are as in the
1270 .Dq Ic show Cm registers
1271 command.
1272 Some variables are suffixed with numbers, and may have some modifier
1273 following a colon immediately after the variable name.
1274 For example, register variables can have a
1275 .Cm u
1276 modifier to indicate user register (e.g.,
1277 .Dq Li $eax:u ) .
1278 .Pp
1279 Built-in variables currently supported are:
1280 .Pp
1281 .Bl -tag -width ".Va tabstops" -compact
1282 .It Va radix
1283 Input and output radix.
1284 .It Va maxoff
1285 Addresses are printed as
1286 .Dq Ar symbol Ns Li + Ns Ar offset
1287 unless
1288 .Ar offset
1289 is greater than
1290 .Va maxoff .
1291 .It Va maxwidth
1292 The width of the displayed line.
1293 .It Va lines
1294 The number of lines.
1295 It is used by the built-in pager.
1296 Setting it to 0 disables paging.
1297 .It Va tabstops
1298 Tab stop width.
1299 .It Va work Ns Ar xx
1300 Work variable;
1301 .Ar xx
1302 can take values from 0 to 31.
1303 .El
1304 .Sh EXPRESSIONS
1305 Most expression operators in C are supported except
1306 .Ql ~ ,
1307 .Ql ^ ,
1308 and unary
1309 .Ql & .
1310 Special rules in
1311 .Nm
1312 are:
1313 .Bl -tag -width ".No Identifiers"
1314 .It Identifiers
1315 The name of a symbol is translated to the value of the symbol, which
1316 is the address of the corresponding object.
1317 .Ql \&.
1318 and
1319 .Ql \&:
1320 can be used in the identifier.
1321 If supported by an object format dependent routine,
1322 .Sm off
1323 .Oo Ar filename : Oc Ar func : lineno ,
1324 .Sm on
1325 .Oo Ar filename : Oc Ns Ar variable ,
1326 and
1327 .Oo Ar filename : Oc Ns Ar lineno
1328 can be accepted as a symbol.
1329 .It Numbers
1330 Radix is determined by the first two letters:
1331 .Ql 0x :
1332 hex,
1333 .Ql 0o :
1334 octal,
1335 .Ql 0t :
1336 decimal; otherwise, follow current radix.
1337 .It Li \&.
1338 .Va dot
1339 .It Li +
1340 .Va next
1341 .It Li ..
1342 address of the start of the last line examined.
1343 Unlike
1344 .Va dot
1345 or
1346 .Va next ,
1347 this is only changed by
1348 .Ic examine
1349 or
1350 .Ic write
1351 command.
1352 .It Li '
1353 last address explicitly specified.
1354 .It Li $ Ns Ar variable
1355 Translated to the value of the specified variable.
1356 It may be followed by a
1357 .Ql \&:
1358 and modifiers as described above.
1359 .It Ar a Ns Li # Ns Ar b
1360 A binary operator which rounds up the left hand side to the next
1361 multiple of right hand side.
1362 .It Li * Ns Ar expr
1363 Indirection.
1364 It may be followed by a
1365 .Ql \&:
1366 and modifiers as described above.
1367 .El
1368 .Sh SCRIPTING
1369 .Nm
1370 supports a basic scripting facility to allow automating tasks or responses to
1371 specific events.
1372 Each script consists of a list of DDB commands to be executed sequentially,
1373 and is assigned a unique name.
1374 Certain script names have special meaning, and will be automatically run on
1375 various
1376 .Nm
1377 events if scripts by those names have been defined.
1378 .Pp
1379 The
1380 .Ic script
1381 command may be used to define a script by name.
1382 Scripts consist of a series of
1383 .Nm
1384 commands separated with the
1385 .Ql \&;
1386 character.
1387 For example:
1388 .Bd -literal -offset indent
1389 script kdb.enter.panic=bt; show pcpu
1390 script lockinfo=show alllocks; show lockedvnods
1391 .Ed
1392 .Pp
1393 The
1394 .Ic scripts
1395 command lists currently defined scripts.
1396 .Pp
1397 The
1398 .Ic run
1399 command execute a script by name.
1400 For example:
1401 .Bd -literal -offset indent
1402 run lockinfo
1403 .Ed
1404 .Pp
1405 The
1406 .Ic unscript
1407 command may be used to delete a script by name.
1408 For example:
1409 .Bd -literal -offset indent
1410 unscript kdb.enter.panic
1411 .Ed
1412 .Pp
1413 These functions may also be performed from userspace using the
1414 .Xr ddb 8
1415 command.
1416 .Pp
1417 Certain scripts are run automatically, if defined, for specific
1418 .Nm
1419 events.
1420 The follow scripts are run when various events occur:
1421 .Bl -tag -width kdb.enter.powerfail
1422 .It Va kdb.enter.acpi
1423 The kernel debugger was entered as a result of an
1424 .Xr acpi 4
1425 event.
1426 .It Va kdb.enter.bootflags
1427 The kernel debugger was entered at boot as a result of the debugger boot
1428 flag being set.
1429 .It Va kdb.enter.break
1430 The kernel debugger was entered as a result of a serial or console break.
1431 .It Va kdb.enter.cam
1432 The kernel debugger was entered as a result of a
1433 .Xr CAM 4
1434 event.
1435 .It Va kdb.enter.mac
1436 The kernel debugger was entered as a result of an assertion failure in the
1437 .Xr mac_test 4
1438 module of the
1439 TrustedBSD MAC Framework.
1440 .It Va kdb.enter.ndis
1441 The kernel debugger was entered as a result of an
1442 .Xr ndis 4
1443 breakpoint event.
1444 .It Va kdb.enter.netgraph
1445 The kernel debugger was entered as a result of a
1446 .Xr netgraph 4
1447 event.
1448 .It Va kdb.enter.panic
1449 .Xr panic 9
1450 was called.
1451 .It Va kdb.enter.powerfail
1452 The kernel debugger was entered as a result of a powerfail NMI on the sparc64
1453 platform.
1454 .It Va kdb.enter.powerpc
1455 The kernel debugger was entered as a result of an unimplemented interrupt
1456 type on the powerpc platform.
1457 .It Va kdb.enter.sysctl
1458 The kernel debugger was entered as a result of the
1459 .Va debug.kdb.enter
1460 sysctl being set.
1461 .It Va kdb.enter.trapsig
1462 The kernel debugger was entered as a result of a trapsig event on the sparc64
1463 platform.
1464 .It Va kdb.enter.unionfs
1465 The kernel debugger was entered as a result of an assertion failure in the
1466 union file system.
1467 .It Va kdb.enter.unknown
1468 The kernel debugger was entered, but no reason has been set.
1469 .It Va kdb.enter.vfslock
1470 The kernel debugger was entered as a result of a VFS lock violation.
1471 .It Va kdb.enter.watchdog
1472 The kernel debugger was entered as a result of a watchdog firing.
1473 .It Va kdb.enter.witness
1474 The kernel debugger was entered as a result of a
1475 .Xr witness 4
1476 violation.
1477 .El
1478 .Pp
1479 In the event that none of these scripts is found,
1480 .Nm
1481 will attempt to execute a default script:
1482 .Bl -tag -width kdb.enter.powerfail
1483 .It Va kdb.enter.default
1484 The kernel debugger was entered, but a script exactly matching the reason for
1485 entering was not defined.
1486 This can be used as a catch-all to handle cases not specifically of interest;
1487 for example,
1488 .Va kdb.enter.witness
1489 might be defined to have special handling, and
1490 .Va kdb.enter.default
1491 might be defined to simply panic and reboot.
1492 .El
1493 .Sh HINTS
1494 On machines with an ISA expansion bus, a simple NMI generation card can be
1495 constructed by connecting a push button between the A01 and B01 (CHCHK# and
1496 GND) card fingers.
1497 Momentarily shorting these two fingers together may cause the bridge chipset to
1498 generate an NMI, which causes the kernel to pass control to
1499 .Nm .
1500 Some bridge chipsets do not generate a NMI on CHCHK#, so your mileage may vary.
1501 The NMI allows one to break into the debugger on a wedged machine to
1502 diagnose problems.
1503 Other bus' bridge chipsets may be able to generate NMI using bus specific
1504 methods.
1505 There are many PCI and PCIe add-in cards which can generate NMI for
1506 debugging.
1507 Modern server systems typically use IPMI to generate signals to enter the
1508 debugger.
1509 The
1510 .Va devel/ipmitool
1511 port can be used to send the
1512 .Cd chassis power diag
1513 command which delivers an NMI to the processor.
1514 Embedded systems often use JTAG for debugging, but rarely use it in
1515 combination with
1516 .Nm .
1517 .Pp
1518 For serial consoles, you can enter the debugger by sending a BREAK
1519 condition on the serial line if
1520 .Cd options BREAK_TO_DEBUGGER
1521 is specified in the kernel.
1522 Most terminal emulation programs can send a break sequence with a
1523 special key sequence or via a menu item.
1524 However, in some setups, sending the break can be difficult to arrange
1525 or happens spuriously, so if the kernel contains
1526 .Cd options ALT_BREAK_TO_DEBUGGER
1527 then the sequence of CR TILDE CTRL-B enters the debugger;
1528 CR TILDE CTRL-P causes a panic instead of entering the
1529 debugger; and
1530 CR TILDE CTRL-R causes an immediate reboot.
1531 In all the above sequences, CR is a Carriage Return and is usually
1532 sent by hitting the Enter or Return key.
1533 TILDE is the ASCII tilde character (~).
1534 CTRL-x is Control x created by hitting the control key and then x
1535 and then releasing both.
1536 .Pp
1537 The break to enter the debugger behavior may be enabled at run-time
1538 by setting the
1539 .Xr sysctl 8
1540 .Va debug.kdb.break_to_debugger
1541 to 1.
1542 The alternate sequence to enter the debugger behavior may be enabled
1543 at run-time by setting the
1544 .Xr sysctl 8
1545 .Va debug.kdb.alt_break_to_debugger
1546 to 1.
1547 The debugger may be entered by setting the
1548 .Xr sysctl 8
1549 .Va debug.kdb.enter
1550 to 1.
1551 .Sh FILES
1552 Header files mentioned in this manual page can be found below
1553 .Pa /usr/include
1554 directory.
1555 .Pp
1556 .Bl -dash -compact
1557 .It
1558 .Pa sys/buf.h
1559 .It
1560 .Pa sys/domain.h
1561 .It
1562 .Pa netinet/in_pcb.h
1563 .It
1564 .Pa sys/socket.h
1565 .It
1566 .Pa sys/vnode.h
1567 .El
1568 .Sh SEE ALSO
1569 .Xr gdb 1 ,
1570 .Xr kgdb 1 ,
1571 .Xr acpi 4 ,
1572 .Xr CAM 4 ,
1573 .Xr mac_test 4 ,
1574 .Xr ndis 4 ,
1575 .Xr netgraph 4 ,
1576 .Xr textdump 4 ,
1577 .Xr witness 4 ,
1578 .Xr ddb 8 ,
1579 .Xr sysctl 8 ,
1580 .Xr panic 9
1581 .Sh HISTORY
1582 The
1583 .Nm
1584 debugger was developed for Mach, and ported to
1585 .Bx 386 0.1 .
1586 This manual page translated from
1587 .Xr man 7
1588 macros by
1589 .An Garrett Wollman .
1590 .Pp
1591 .An Robert N. M. Watson
1592 added support for
1593 .Nm
1594 output capture,
1595 .Xr textdump 4
1596 and scripting in
1597 .Fx 7.1 .