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