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