summaryrefslogtreecommitdiff
path: root/static/netbsd/man4/ddb.4 4.html
blob: d5f3760b865126c53de7a30d462d2c1f8f9b398e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
<table class="head">
  <tr>
    <td class="head-ltitle">DDB(4)</td>
    <td class="head-vol">Device Drivers Manual</td>
    <td class="head-rtitle">DDB(4)</td>
  </tr>
</table>
<div class="manual-text">
<section class="Sh">
<h1 class="Sh" id="NAME"><a class="permalink" href="#NAME">NAME</a></h1>
<p class="Pp"><code class="Nm">ddb</code> &#x2014; <span class="Nd">in-kernel
    debugger</span></p>
</section>
<section class="Sh">
<h1 class="Sh" id="SYNOPSIS"><a class="permalink" href="#SYNOPSIS">SYNOPSIS</a></h1>
<p class="Pp"><code class="Cd">options DDB</code></p>
<p class="Pp">To enable history editing:
  <br/>
  <code class="Cd">options DDB_HISTORY_SIZE=integer</code></p>
<p class="Pp">To disable entering <code class="Ic">ddb</code> upon kernel panic:
  <br/>
  <code class="Cd">options DDB_ONPANIC=0</code></p>
<p class="Pp">To enable teeing all <code class="Ic">ddb</code> output to the
    kernel msgbuf:
  <br/>
  <code class="Cd">options DDB_TEE_MSGBUF=1</code></p>
<p class="Pp">To specify commands which will be executed on each entry to
    <code class="Ic">ddb</code>:
  <br/>
  <code class="Cd">options DDB_COMMANDONENTER=&quot;trace;show
    registers&quot;</code> In this case, &quot;trace&quot; and then &quot;show
    registers&quot; will be executed automatically.</p>
<p class="Pp">To enable extended online help:
  <br/>
  <code class="Cd">options DDB_VERBOSE_HELP</code>.</p>
</section>
<section class="Sh">
<h1 class="Sh" id="DESCRIPTION"><a class="permalink" href="#DESCRIPTION">DESCRIPTION</a></h1>
<p class="Pp"><code class="Nm">ddb</code> is the in-kernel debugger. It may be
    entered at any time via a special key sequence, and optionally may be
    invoked when the kernel panics.</p>
</section>
<section class="Sh">
<h1 class="Sh" id="ENTERING_THE_DEBUGGER"><a class="permalink" href="#ENTERING_THE_DEBUGGER">ENTERING
  THE DEBUGGER</a></h1>
<p class="Pp">Unless <code class="Dv">DDB_ONPANIC</code> is set to 0,
    <code class="Nm">ddb</code> will be activated whenever the kernel would
    otherwise panic.</p>
<p class="Pp"><code class="Nm">ddb</code> may also be activated from the
    console. In general, sending a break on a serial console will activate
    <code class="Nm">ddb</code>. There are also key sequences for each port that
    will activate <code class="Nm">ddb</code> from the keyboard:</p>
<div class="Bd-indent">
<dl class="Bl-tag Bl-compact">
  <dt>alpha</dt>
  <dd>&lt;Ctrl&gt;-&lt;Alt&gt;-&lt;Esc&gt; on PC style keyboards.</dd>
  <dt>amd64</dt>
  <dd>&lt;Ctrl&gt;-&lt;Alt&gt;-&lt;Esc&gt;</dd>
  <dt></dt>
  <dd>&lt;Break&gt; on serial console.</dd>
  <dt>amiga</dt>
  <dd>&lt;LAlt&gt;-&lt;LAmiga&gt;-&lt;F10&gt;</dd>
  <dt>atari</dt>
  <dd>&lt;Alt&gt;-&lt;LeftShift&gt;-&lt;F9&gt;</dd>
  <dt>evbarm</dt>
  <dd>&lt;Ctrl&gt;-&lt;Alt&gt;-&lt;Esc&gt; on PC style keyboards.</dd>
  <dt></dt>
  <dd>&lt;Break&gt; on serial console.</dd>
  <dt></dt>
  <dd>Some models: +++++ (five plus signs) on serial console.</dd>
  <dt>hp300</dt>
  <dd>&lt;Shift&gt;-&lt;Reset&gt;</dd>
  <dt>hpcarm</dt>
  <dd>&lt;Ctrl&gt;-&lt;Alt&gt;-&lt;Esc&gt;</dd>
  <dt>hpcmips</dt>
  <dd>&lt;Ctrl&gt;-&lt;Alt&gt;-&lt;Esc&gt;</dd>
  <dt>hpcsh</dt>
  <dd>&lt;Ctrl&gt;-&lt;Alt&gt;-&lt;Esc&gt;</dd>
  <dt>hppa</dt>
  <dd>&lt;Ctrl&gt;-&lt;Alt&gt;-&lt;Esc&gt; on PC style keyboards.</dd>
  <dt></dt>
  <dd>+++++ (five plus signs) on PDC console</dd>
  <dt></dt>
  <dd>&lt;Break&gt; on serial console.</dd>
  <dt>i386</dt>
  <dd>&lt;Ctrl&gt;-&lt;Alt&gt;-&lt;Esc&gt;</dd>
  <dt></dt>
  <dd>&lt;Break&gt; on serial console.</dd>
  <dt>mac68k</dt>
  <dd>&lt;Command&gt;-&lt;Power&gt;, or the Interrupt switch.</dd>
  <dt>macppc</dt>
  <dd>Some models: &lt;Command&gt;-&lt;Option&gt;-&lt;Power&gt;</dd>
  <dt>mvme68k</dt>
  <dd>Abort switch on CPU card.</dd>
  <dt>pmax</dt>
  <dd>&lt;Do&gt; on LK-201 rcons console.</dd>
  <dt></dt>
  <dd>&lt;Break&gt; on serial console.</dd>
  <dt>sandpoint</dt>
  <dd>&lt;Break&gt; on serial console.</dd>
  <dt>sparc</dt>
  <dd>&lt;L1&gt;-A, or &lt;Stop&gt;-A on a Sun keyboard.</dd>
  <dt></dt>
  <dd>&lt;Break&gt; on serial console.</dd>
  <dt>sparc64</dt>
  <dd>&lt;L1&gt;-A, or &lt;Stop&gt;-A on a Sun keyboard.</dd>
  <dt></dt>
  <dd>&lt;Break&gt; on serial console.</dd>
  <dt>sun3</dt>
  <dd>&lt;L1&gt;-A, or &lt;Stop&gt;-A on a Sun keyboard.</dd>
  <dt></dt>
  <dd>&lt;Break&gt; on serial console.</dd>
  <dt>vax</dt>
  <dd>&lt;Esc&gt; followed by &lt;Shift&gt;-D on serial console.</dd>
  <dt>x68k</dt>
  <dd>Interrupt switch on the body.</dd>
  <dt>xen dom0</dt>
  <dd>&lt;Ctrl&gt;-&lt;Alt&gt;-&lt;Esc&gt; on PC style keyboards.</dd>
  <dt></dt>
  <dd>+++++ (five plus signs) on serial console.</dd>
  <dt>xen domU</dt>
  <dd>+++++ (five plus signs) on serial console.</dd>
  <dt>zaurus</dt>
  <dd>&lt;Ctrl&gt;-&lt;Alt&gt;-&lt;Esc&gt;</dd>
</dl>
</div>
<p class="Pp">The key sequence to activate <code class="Nm">ddb</code> can be
    changed by modifying &#x201C;hw.cnmagic&#x201D; with
    <a class="Xr">sysctl(8)</a>. If the console is not dedicated to
    <code class="Nm">ddb</code> the sequence should not be easily typed by
    accident. In addition, <code class="Nm">ddb</code> may be explicitly
    activated by the debugging code in the kernel if <code class="Cm">DDB</code>
    is configured.</p>
<p class="Pp">Commands can be automatically run when <code class="Nm">ddb</code>
    is entered by using <code class="Cd">options DDB_COMMANDONENTER</code> or by
    setting <var class="Ar">ddb.commandonenter</var> with
    <a class="Xr">sysctl(8)</a>. Multiple commands can be separated by a
    semi-colon.</p>
</section>
<section class="Sh">
<h1 class="Sh" id="COMMAND_SYNTAX"><a class="permalink" href="#COMMAND_SYNTAX">COMMAND
  SYNTAX</a></h1>
<p class="Pp">The general command syntax is:</p>
<div class="Bd Pp
  Bd-indent"><var class="Ar">command</var>[<code class="Cm">/</code><var class="Ar">modifiers</var>]
  <var class="Ar">address</var>[<code class="Cm">,</code><var class="Ar">count</var>]</div>
<p class="Pp">The current memory location being edited is referred to as
    <var class="Ar">dot</var>, and the next location is
    <var class="Ar">next</var>. They are displayed as hexadecimal numbers.</p>
<p class="Pp">Commands that examine and/or modify memory update
    <var class="Ar">dot</var> to the address of the last line examined or the
    last location modified, and set <var class="Ar">next</var> to the next
    location to be examined or modified. Other commands don't change
    <var class="Ar">dot</var>, and set <var class="Ar">next</var> to be the same
    as <var class="Ar">dot</var>.</p>
<p class="Pp">A blank line repeats the previous command from the address
    <var class="Ar">next</var> with the previous <code class="Cm">count</code>
    and no modifiers. Specifying <code class="Cm">address</code> sets
    <i class="Em">dot</i> to the address. If <code class="Cm">address</code> is
    omitted, <i class="Em">dot</i> is used. A missing
    <code class="Cm">count</code> is taken to be 1 for printing commands, and
    infinity for stack traces.</p>
<p class="Pp">The syntax:</p>
<div class="Bd Pp
  Bd-indent"><code class="Cm">,</code><var class="Ar">count</var></div>
<p class="Pp">repeats the previous command, just as a blank line does, but with
    the specified <code class="Cm">count</code>.</p>
<p class="Pp"><code class="Nm">ddb</code> has a <a class="Xr">more(1)</a>-like
    functionality; if a number of lines in a command's output exceeds the number
    defined in the <var class="Va">lines</var> variable, then
    <code class="Nm">ddb</code> displays &#x201C;--db more--&#x201D; and waits
    for a response, which may be one of:</p>
<div class="Bd-indent">
<dl class="Bl-tag">
  <dt>&#x27E8;return&#x27E9;</dt>
  <dd>one more line.</dd>
  <dt>&#x27E8;space&#x27E9;</dt>
  <dd>one more page.</dd>
  <dt id="q"><a class="permalink" href="#q"><code class="Ic">q</code></a></dt>
  <dd>abort the current command, and return to the command input mode.</dd>
</dl>
</div>
<p class="Pp">You can set <var class="Va">lines</var> variable to zero to
    disable this feature.</p>
<p class="Pp">If <code class="Nm">ddb</code> history editing is enabled (by
    defining the</p>
<div class="Bd Bd-indent"><code class="Cd">options
  DDB_HISTORY_SIZE=num</code></div>
kernel option), then a history of the last <code class="Cm">num</code> commands
  is kept. The history can be manipulated with the following key sequences:
<div class="Bd-indent">
<dl class="Bl-tag">
  <dt>&lt;Ctrl&gt;-P</dt>
  <dd>retrieve previous command in history (if any).</dd>
  <dt>&lt;Ctrl&gt;-N</dt>
  <dd>retrieve next command in history (if any).</dd>
</dl>
</div>
</section>
<section class="Sh">
<h1 class="Sh" id="COMMANDS"><a class="permalink" href="#COMMANDS">COMMANDS</a></h1>
<p class="Pp"><code class="Nm">ddb</code> supports the following commands:</p>
<dl class="Bl-tag">
  <dt id="!"><a class="permalink" href="#!"><code class="Ic">!</code></a><var class="Ar">address</var>[(<var class="Ar">expression</var>[<code class="Cm">,</code><var class="Ar">...</var>])]</dt>
  <dd>A synonym for <code class="Ic">call</code>.</dd>
  <dt id="break"><a class="permalink" href="#break"><code class="Ic">break</code></a>[<code class="Cm">/u</code>]
    <var class="Ar">address</var>[<code class="Cm">,</code><var class="Ar">count</var>]</dt>
  <dd>Set a breakpoint at <var class="Ar">address</var>. If
      <var class="Ar">count</var> is supplied, continues
      (<var class="Ar">count</var>-1) times before stopping at the breakpoint.
      If the breakpoint is set, a breakpoint number is printed with
      &#x2018;#&#x2019;. This number can be used to
      <code class="Ic">delete</code> the breakpoint, or to add conditions to it.
    <p class="Pp">If <code class="Cm">/u</code> is specified, set a breakpoint
        at a user-space address. Without <code class="Cm">/u</code>,
        <var class="Ar">address</var> is considered to be in the kernel-space,
        and an address in the wrong space will be rejected, and an error message
        will be emitted. This modifier may only be used if it is supported by
        machine dependent routines.</p>
    <p class="Pp">Warning: if a user text is shadowed by a normal user-space
        debugger, user-space breakpoints may not work correctly. Setting a
        breakpoint at the low-level code paths may also cause strange
      behavior.</p>
  </dd>
  <dt id="bt"><a class="permalink" href="#bt"><code class="Ic">bt</code></a>[<code class="Cm">/ul</code>]
    [<var class="Ar">frame-address</var>][<code class="Cm">,</code><var class="Ar">count</var>]</dt>
  <dd>A synonym for <code class="Ic">trace</code>.</dd>
  <dt id="bt/t"><a class="permalink" href="#bt/t"><code class="Ic">bt/t</code></a>[<code class="Cm">/ul</code>]
    [<var class="Ar">pid</var>][<code class="Cm"></code>,<var class="Ar">count</var>]</dt>
  <dd>A synonym for <code class="Ic">trace/t</code>.</dd>
  <dt id="bt/a"><a class="permalink" href="#bt/a"><code class="Ic">bt/a</code></a>[<code class="Cm">/ul</code>]
    [<var class="Ar">lwpaddr</var>][<code class="Cm">,</code><var class="Ar">count</var>]</dt>
  <dd>A synonym for <code class="Ic">trace/a</code>.</dd>
  <dt id="call"><a class="permalink" href="#call"><code class="Ic">call</code></a>
    <var class="Ar">address</var>[(<var class="Ar">expression</var>[<code class="Cm">,</code><var class="Ar">...</var>])]</dt>
  <dd>Call the function specified by <var class="Ar">address</var> with the
      argument(s) listed in parentheses. Parentheses may be omitted if the
      function takes no arguments. The number of arguments is currently limited
      to 10.</dd>
  <dt id="continue"><a class="permalink" href="#continue"><code class="Ic">continue</code></a>[<code class="Cm">/c</code>]</dt>
  <dd>Continue execution until a breakpoint or watchpoint. If
      <code class="Cm">/c</code> is specified, count instructions while
      executing. Some machines (e.g., pmax) also count loads and stores.
    <p class="Pp">Warning: when counting, the debugger is really silently
        single-stepping. This means that single-stepping on low-level may cause
        strange behavior.</p>
  </dd>
  <dt id="delete"><a class="permalink" href="#delete"><code class="Ic">delete</code></a>
    <var class="Ar">address</var> |
    <a class="permalink" href="#_"><code class="Cm" id="_">#</code></a><var class="Ar">number</var></dt>
  <dd>Delete a breakpoint. The target breakpoint may be specified by
      <var class="Ar">address</var>, as per <code class="Ic">break</code>, or by
      the breakpoint number returned by <code class="Ic">break</code> if it's
      prefixed with &#x2018;<code class="Li">#</code>&#x2019;.</dd>
  <dt id="dmesg"><a class="permalink" href="#dmesg"><code class="Ic">dmesg</code></a>
    [<var class="Ar">count</var>]</dt>
  <dd>Prints the contents of the kernel message buffer. The optional
      <var class="Ar">count</var> argument will limit printing to at most the
      last <var class="Ar">count</var> bytes of the message buffer.</dd>
  <dt id="dwatch"><a class="permalink" href="#dwatch"><code class="Ic">dwatch</code></a>
    <var class="Ar">address</var></dt>
  <dd>Delete the watchpoint at <var class="Ar">address</var> that was previously
      set with <code class="Ic">watch</code> command.</dd>
  <dt id="examine"><a class="permalink" href="#examine"><code class="Ic">examine</code></a>[<code class="Cm">/</code><var class="Ar">modifier</var>]
    <var class="Ar">address</var>[<code class="Cm">,</code><var class="Ar">count</var>]</dt>
  <dd>Display the address locations according to the format in
      <var class="Ar">modifier</var>. Multiple modifier formats display multiple
      locations. If <var class="Ar">modifier</var> isn't specified, the modifier
      from the last use of <code class="Ic">examine</code> is used.
    <p class="Pp">The valid format characters for <var class="Ar">modifier</var>
        are:</p>
    <div class="Bd-indent">
    <dl class="Bl-tag Bl-compact">
      <dt id="b"><a class="permalink" href="#b"><code class="Cm">b</code></a></dt>
      <dd>examine bytes (8 bits).</dd>
      <dt id="h"><a class="permalink" href="#h"><code class="Cm">h</code></a></dt>
      <dd>examine half-words (16 bits).</dd>
      <dt id="l"><a class="permalink" href="#l"><code class="Cm">l</code></a></dt>
      <dd>examine words (legacy &#x201C;long&#x201D;, 32 bits).</dd>
      <dt id="q~2"><a class="permalink" href="#q~2"><code class="Cm">q</code></a></dt>
      <dd>examine quad-words (64 bits).</dd>
      <dt id="L"><a class="permalink" href="#L"><code class="Cm">L</code></a></dt>
      <dd>examine long words (implementation dependent)</dd>
      <dt id="a"><a class="permalink" href="#a"><code class="Cm">a</code></a></dt>
      <dd>print the location being examined.</dd>
      <dt id="A"><a class="permalink" href="#A"><code class="Cm">A</code></a></dt>
      <dd>print the location with a line number if possible.</dd>
      <dt id="x"><a class="permalink" href="#x"><code class="Cm">x</code></a></dt>
      <dd>display in unsigned hex.</dd>
      <dt id="z"><a class="permalink" href="#z"><code class="Cm">z</code></a></dt>
      <dd>display in signed hex.</dd>
      <dt id="o"><a class="permalink" href="#o"><code class="Cm">o</code></a></dt>
      <dd>display in unsigned octal.</dd>
      <dt id="d"><a class="permalink" href="#d"><code class="Cm">d</code></a></dt>
      <dd>display in signed decimal.</dd>
      <dt id="u"><a class="permalink" href="#u"><code class="Cm">u</code></a></dt>
      <dd>display in unsigned decimal.</dd>
      <dt id="r"><a class="permalink" href="#r"><code class="Cm">r</code></a></dt>
      <dd>display in current radix, signed.</dd>
      <dt id="c"><a class="permalink" href="#c"><code class="Cm">c</code></a></dt>
      <dd>display low 8 bits as a character. Non-printing characters as
          displayed as an octal escape code (e.g., &#x2018;\000&#x2019;).</dd>
      <dt id="s"><a class="permalink" href="#s"><code class="Cm">s</code></a></dt>
      <dd>display the NUL terminated string at the location. Non-printing
          characters are displayed as octal escapes.</dd>
      <dt id="m"><a class="permalink" href="#m"><code class="Cm">m</code></a></dt>
      <dd>display in unsigned hex with a character dump at the end of each line.
          The location is displayed as hex at the beginning of each line.</dd>
      <dt id="p"><a class="permalink" href="#p"><code class="Cm">p</code></a></dt>
      <dd>display as a pointer and it's symbol if possible.</dd>
      <dt id="i"><a class="permalink" href="#i"><code class="Cm">i</code></a></dt>
      <dd>display as a machine instruction.</dd>
      <dt id="I"><a class="permalink" href="#I"><code class="Cm">I</code></a></dt>
      <dd>display as a machine instruction, with possible alternative formats
          depending upon the machine:
        <div class="Bd-indent">
        <dl class="Bl-tag Bl-compact">
          <dt>m68k</dt>
          <dd>use Motorola syntax</dd>
          <dt>vax</dt>
          <dd>don't assume that each external label is a procedure entry
            mask</dd>
        </dl>
        </div>
      </dd>
    </dl>
    </div>
  </dd>
  <dt id="kill"><a class="permalink" href="#kill"><code class="Ic">kill</code></a>
    <var class="Ar">pid</var>[<code class="Cm">,</code><var class="Ar">signal_number</var>]</dt>
  <dd>Send a signal to the process specified by the <var class="Ar">pid</var>.
      Note that <var class="Ar">pid</var> is interpreted using the current radix
      (see <code class="Cm">trace/t</code> command for details). If
      <var class="Ar">signal_number</var> isn't specified, the SIGTERM signal is
      sent.</dd>
  <dt id="match"><a class="permalink" href="#match"><code class="Ic">match</code></a>[<code class="Cm">/p</code>]</dt>
  <dd>A synonym for <code class="Ic">next</code>.</dd>
  <dt id="next"><a class="permalink" href="#next"><code class="Ic">next</code></a>[<code class="Cm">/p</code>]</dt>
  <dd>Stop at the matching return instruction. If <code class="Cm">/p</code> is
      specified, print the call nesting depth and the cumulative instruction
      count at each call or return. Otherwise, only print when the matching
      return is hit.</dd>
  <dt id="print"><a class="permalink" href="#print"><code class="Ic">print</code></a>[<code class="Cm">/axzodurc</code>]
    <var class="Ar">address</var> [<var class="Ar">address ...</var>]</dt>
  <dd>Print addresses <var class="Ar">address</var> according to the modifier
      character, as per <code class="Ic">examine</code>. Valid modifiers are:
      <code class="Cm">/a</code>, <code class="Cm">/x</code>,
      <code class="Cm">/z</code>, <code class="Cm">/o</code>,
      <code class="Cm">/d</code>, <code class="Cm">/u</code>,
      <code class="Cm">/r</code>, and <code class="Cm">/c</code> (as per
      <code class="Ic">examine</code>). If no modifier is specified, the most
      recent one specified is used. <var class="Ar">address</var> may be a
      string, and is printed &#x201C;as-is&#x201D;. For example:
    <div class="Bd Pp Bd-indent Li">
    <pre>print/x &quot;eax = &quot; $eax &quot;\necx = &quot; $ecx &quot;\n&quot;</pre>
    </div>
    <p class="Pp">will produce:</p>
    <div class="Bd Pp Bd-indent Li">
    <pre>eax = xxxxxx
ecx = yyyyyy</pre>
    </div>
  </dd>
  <dt id="ps"><a class="permalink" href="#ps"><code class="Ic">ps</code></a>[<code class="Cm">/a</code>][<code class="Cm">/n</code>][<code class="Cm">/w</code>][<code class="Cm">/l</code>][<code class="Cm">/L</code>]</dt>
  <dd>A synonym for <code class="Ic">show all procs</code>.</dd>
  <dt id="reboot"><a class="permalink" href="#reboot"><code class="Ic">reboot</code></a>
    [<var class="Ar">flags</var>]</dt>
  <dd>Reboot, using the optionally supplied boot <var class="Ar">flags</var>,
      which is a bitmask supporting the same values as for
      <a class="Xr">reboot(2)</a>. Some of the more useful flags:
    <table class="Bl-column">
      <tr id="Value">
        <td><a class="permalink" href="#Value"><b class="Sy">Value</b></a></td>
        <td><a class="permalink" href="#Name"><b class="Sy" id="Name">Name</b></a></td>
        <td><a class="permalink" href="#Description"><b class="Sy" id="Description">Description</b></a></td>
      </tr>
      <tr>
        <td>0x1</td>
        <td>RB_ASKNAME</td>
        <td>Ask for file name to reboot from</td>
      </tr>
      <tr>
        <td>0x2</td>
        <td>RB_SINGLE</td>
        <td>Reboot to single user mode</td>
      </tr>
      <tr>
        <td>0x4</td>
        <td>RB_NOSYNC</td>
        <td>Don't sync before reboot</td>
      </tr>
      <tr>
        <td>0x8</td>
        <td>RB_HALT</td>
        <td>Halt instead of reboot</td>
      </tr>
      <tr>
        <td>0x40</td>
        <td>RB_KDB</td>
        <td>Boot into kernel debugger</td>
      </tr>
      <tr>
        <td>0x100</td>
        <td>RB_DUMP</td>
        <td>Dump unconditionally before reboot</td>
      </tr>
      <tr>
        <td>0x808</td>
        <td>RB_POWERDOWN</td>
        <td>Power off (or at least halt)</td>
      </tr>
    </table>
    <p class="Pp">Note: Limitations of the command line interface preclude
        specification of a boot string.</p>
  </dd>
  <dt id="search"><a class="permalink" href="#search"><code class="Ic">search</code></a>[<code class="Cm">/bhl</code>]
    <var class="Ar">address</var> <var class="Ar">value</var>
    [<var class="Ar">mask</var>]
    [<code class="Cm"></code>,<var class="Ar">count</var>]</dt>
  <dd>Search memory from <var class="Ar">address</var> for
      <var class="Ar">value</var>. The unit size is specified with a modifier
      character, as per <code class="Ic">examine</code>. Valid modifiers are:
      <code class="Cm">/b</code>, <code class="Cm">/h</code>, and
      <code class="Cm">/l</code>. If no modifier is specified,
      <code class="Cm">/l</code> is used.
    <p class="Pp">This command might fail in interesting ways if it doesn't find
        <var class="Ar">value</var>. This is because <code class="Nm">ddb</code>
        doesn't always recover from touching bad memory. The optional
        <var class="Ar">count</var> limits the search.</p>
  </dd>
  <dt id="set"><a class="permalink" href="#set"><code class="Ic">set</code></a>
    <code class="Cm">$</code><var class="Ar">variable</var>
    [<code class="Cm">=</code>] <var class="Ar">expression</var></dt>
  <dd>Set the named variable or register to the value of
      <var class="Ar">expression</var>. Valid variable names are described in
      <a class="Sx" href="#VARIABLES">VARIABLES</a>.</dd>
  <dt id="show"><a class="permalink" href="#show"><code class="Ic">show all
    callout</code></a></dt>
  <dd>Display information about callouts in the system. See
      <a class="Xr">callout(9)</a> for more information on callouts.</dd>
  <dt id="show~2"><a class="permalink" href="#show~2"><code class="Ic">show all
    locks</code></a>[<code class="Cm">/t</code>]</dt>
  <dd>Display details information about all active locks. If
      <code class="Cm">/t</code> is specified, stack traces of LWPs holding
      locks are also printed. This command is only useful if a kernel is
      compiled with <code class="Cd">options LOCKDEBUG</code>.</dd>
  <dt id="show~3"><a class="permalink" href="#show~3"><code class="Ic">show all
    mount</code></a>[<code class="Cm">/f</code>]</dt>
  <dd>Display all mount points. If <code class="Cm">/f</code> is specified, the
      complete vnode list is printed.</dd>
  <dt id="show~4"><a class="permalink" href="#show~4"><code class="Ic">show all
    pages</code></a></dt>
  <dd>Display basic information about all physical pages managed by the VM
      system. For more detailed information about a single page, use
      <code class="Ic">show page</code>.</dd>
  <dt id="show~5"><a class="permalink" href="#show~5"><code class="Ic">show all
    pools</code></a>[<code class="Cm">/clpsS</code>]</dt>
  <dd>Display all pool information. Modifiers are the same as
      <code class="Ic">show pool</code>.</dd>
  <dt id="show~6"><a class="permalink" href="#show~6"><code class="Ic">show all
    procs</code></a>[<code class="Cm">/a</code>][<code class="Cm">/n</code>][<code class="Cm">/w</code>][<code class="Cm">/l</code>][<code class="Cm">/L</code>]</dt>
  <dd>Display all process information. Valid modifiers:
    <dl class="Bl-tag">
      <dt id="/n"><a class="permalink" href="#/n"><code class="Cm">/n</code></a></dt>
      <dd>show process information in a <a class="Xr">ps(1)</a> style format.
          Information printed includes: process ID, parent process ID, process
          group, UID, process status, process flags, number of LWPs, command
          name, and process wait channel message.</dd>
      <dt id="/a"><a class="permalink" href="#/a"><code class="Cm">/a</code></a></dt>
      <dd>show each process ID, command name, kernel virtual addresses of each
          process' proc structure, u-area, and vmspace structure. The vmspace
          address is also the address of the process' vm_map structure, and can
          be used in the <code class="Ic">show map</code> command.</dd>
      <dt id="/w"><a class="permalink" href="#/w"><code class="Cm">/w</code></a></dt>
      <dd>show each LWP ID, process ID, command name, system call emulation,
          priority, wait channel message and wait channel address. LWPs
          currently running on a CPU are marked with the '&gt;' sign.</dd>
      <dt id="/l"><a class="permalink" href="#/l"><code class="Cm">/l</code></a></dt>
      <dd>show each LWP ID, process ID, process status, CPU ID the LWP runs on,
          process flags, kernel virtual address of LWP structure, LWP name and
          wait channel message. LWPs currently running on a CPU are marked with
          the '&gt;' sign. This is the default.</dd>
      <dt id="/L"><a class="permalink" href="#/L"><code class="Cm">/L</code></a></dt>
      <dd>In addition to what <code class="Cm">/l</code> shows, print the stack
          trace of each LWPs.</dd>
    </dl>
  </dd>
  <dt id="show~7"><a class="permalink" href="#show~7"><code class="Ic">show all
    tstiles</code></a>[<code class="Cm">/t</code>]</dt>
  <dd>Display all lwps that are currently waiting in turnstiles to acquire
      locks, which locks they are waiting for, and who currently holds them.
      Valid modifiers:
    <dl class="Bl-tag">
      <dt id="/t"><a class="permalink" href="#/t"><code class="Cm">/t</code></a></dt>
      <dd>show a stack trace of the lwp that currently holds each lock</dd>
    </dl>
  </dd>
  <dt id="show~8"><a class="permalink" href="#show~8"><code class="Ic">show
    routes</code></a></dt>
  <dd>Dump the entire <code class="Dv">AF_INET</code> routing table. This
      command is available only on systems which support inet.</dd>
  <dt id="show~9"><a class="permalink" href="#show~9"><code class="Ic">show
    breaks</code></a></dt>
  <dd>Display all breakpoints.</dd>
  <dt id="show~10"><a class="permalink" href="#show~10"><code class="Ic">show
    buf</code></a>[<code class="Cm">/f</code>]
    <var class="Ar">address</var></dt>
  <dd>Print the struct buf at <var class="Ar">address</var>. The
      <code class="Cm">/f</code> does nothing at this time.</dd>
  <dt id="show~11"><a class="permalink" href="#show~11"><code class="Ic">show
    event</code></a>[<code class="Cm">/f</code>][<code class="Cm">/i</code>][<code class="Cm">/m</code>][<code class="Cm">/t</code>]</dt>
  <dd>Print all the non-zero <a class="Xr">evcnt(9)</a> event counters. Valid
      modifiers:
    <dl class="Bl-tag">
      <dt id="/f"><a class="permalink" href="#/f"><code class="Cm">/f</code></a></dt>
      <dd>event counters with a count of zero are printed as well.</dd>
      <dt id="/i"><a class="permalink" href="#/i"><code class="Cm">/i</code></a></dt>
      <dd>interrupted counters will be displayed.</dd>
      <dt id="/m"><a class="permalink" href="#/m"><code class="Cm">/m</code></a></dt>
      <dd>misc counters will be displayed.</dd>
      <dt id="/t~2"><a class="permalink" href="#/t~2"><code class="Cm">/t</code></a></dt>
      <dd>trap counters will be displayed.</dd>
    </dl>
    <p class="Pp">If none of <code class="Cm">/i</code>,
        <code class="Cm">/m</code>, or <code class="Cm">/t</code> are specified,
        all are shown. You can combine any of these. For example, the modifier
        <code class="Cm">/itf</code> will select both interrupt and trap events,
        including those that are non-zero.</p>
  </dd>
  <dt id="show~12"><a class="permalink" href="#show~12"><code class="Ic">show
    files</code></a> <var class="Ar">address</var></dt>
  <dd>Display information about the vnodes of the files that are currently open
      by the process associated with the proc structure at
      <var class="Ar">address</var>. This address can be found using the
      <code class="Ic">show all procs /a</code> command. If the kernel is
      compiled with <code class="Cd">options LOCKDEBUG</code> then details about
      the locking of the underlying uvm object will also be displayed.</dd>
  <dt id="show~13"><a class="permalink" href="#show~13"><code class="Ic">show
    lock</code></a> <var class="Ar">address</var></dt>
  <dd>Display information about a lock at <var class="Ar">address</var>. This
      command is only useful if a kernel is compiled with
      <code class="Cd">options LOCKDEBUG</code>.</dd>
  <dt id="show~14"><a class="permalink" href="#show~14"><code class="Ic">show
    lockstats</code></a></dt>
  <dd>Display information about lock statistics. This command is only useful if
      a kernel is compiled with <code class="Cd">options LOCKDEBUG</code>.</dd>
  <dt id="show~15"><a class="permalink" href="#show~15"><code class="Ic">show
    map</code></a>[<code class="Cm">/f</code>]
    <var class="Ar">address</var></dt>
  <dd>Print the vm_map at <var class="Ar">address</var>. If
      <code class="Cm">/f</code> is specified, the complete map is printed.</dd>
  <dt id="show~16"><a class="permalink" href="#show~16"><code class="Ic">show
    mount</code></a>[<code class="Cm">/f</code>]
    <var class="Ar">address</var></dt>
  <dd>Print the mount structure at <var class="Ar">address</var>. If
      <code class="Cm">/f</code> is specified, the complete vnode list is
      printed.</dd>
  <dt id="show~17"><a class="permalink" href="#show~17"><code class="Ic">show
    mbuf</code></a>[<code class="Cm">/cdv</code>]
    <var class="Ar">address</var></dt>
  <dd>Print the mbuf structure at <var class="Ar">address</var>. Valid
      modifiers:
    <dl class="Bl-tag Bl-compact">
      <dt id="/c"><a class="permalink" href="#/c"><code class="Cm">/c</code></a></dt>
      <dd>The mbufs in the chain are NOT followed.</dd>
      <dt id="/d"><a class="permalink" href="#/d"><code class="Cm">/d</code></a></dt>
      <dd>The data is dumped.</dd>
      <dt id="/v"><a class="permalink" href="#/v"><code class="Cm">/v</code></a></dt>
      <dd>Decode the mbuf chain as a packet. It currently supports Ethernet,
          PPP, PPPoE, ARP, IPv4, ICMP, IPv6, ICMP6, TCP and UDP.</dd>
    </dl>
  </dd>
  <dt id="show~18"><a class="permalink" href="#show~18"><code class="Ic">show
    ncache</code></a> <var class="Ar">address</var></dt>
  <dd>Dump the namecache list associated with vnode at
      <var class="Ar">address</var>.</dd>
  <dt id="show~19"><a class="permalink" href="#show~19"><code class="Ic">show
    object</code></a>[<code class="Cm">/f</code>]
    <var class="Ar">address</var></dt>
  <dd>Print the vm_object at <var class="Ar">address</var>. If
      <code class="Cm">/f</code> is specified, the complete object is
    printed.</dd>
  <dt id="show~20"><a class="permalink" href="#show~20"><code class="Ic">show
    page</code></a>[<code class="Cm">/f</code>]
    <var class="Ar">address</var></dt>
  <dd>Print the vm_page at <var class="Ar">address</var>. If
      <code class="Cm">/f</code> is specified, the complete page is
    printed.</dd>
  <dt id="show~21"><a class="permalink" href="#show~21"><code class="Ic">show
    panic</code></a></dt>
  <dd>Print the current &quot;panic&quot; string.</dd>
  <dt id="show~22"><a class="permalink" href="#show~22"><code class="Ic">show
    pool</code></a>[<code class="Cm">/clpsS</code>]
    <var class="Ar">address</var></dt>
  <dd>Print the pool at <var class="Ar">address</var>. Valid modifiers:
    <dl class="Bl-tag Bl-compact">
      <dt id="/c~2"><a class="permalink" href="#/c~2"><code class="Cm">/c</code></a></dt>
      <dd>Print the cachelist and its statistics for this pool.</dd>
      <dt id="/l~2"><a class="permalink" href="#/l~2"><code class="Cm">/l</code></a></dt>
      <dd>Print the log entries for this pool.</dd>
      <dt id="/p"><a class="permalink" href="#/p"><code class="Cm">/p</code></a></dt>
      <dd>Print the pagelist for this pool.</dd>
      <dt id="/s"><a class="permalink" href="#/s"><code class="Cm">/s</code></a></dt>
      <dd>Print a short (one line) list per pool, showing the wait channel, pool
          address, allocation size, alignment, allocated pages, allocated items,
          consumed items, allocation requests, allocation frees, pages
          allocated, pages freed, and currently idle pages, respectively.</dd>
      <dt id="/S"><a class="permalink" href="#/S"><code class="Cm">/S</code></a></dt>
      <dd>Skip pools with zero allocations.</dd>
    </dl>
  </dd>
  <dt id="show~23"><a class="permalink" href="#show~23"><code class="Ic">show
    proc</code></a>[<code class="Cm">/ap</code>] <var class="Ar">address</var> |
    <var class="Ar">pid</var></dt>
  <dd>Show information about a process and its LWPs. LWPs currently running on a
      CPU are marked with the '&gt;' sign.
    <dl class="Bl-tag Bl-compact">
      <dt id="/a~2"><a class="permalink" href="#/a~2"><code class="Cm">/a</code></a></dt>
      <dd>The argument passed is the kernel virtual address of LWP
        structure.</dd>
      <dt id="/p~2"><a class="permalink" href="#/p~2"><code class="Cm">/p</code></a></dt>
      <dd>The argument passed is a PID. Note that <var class="Ar">pid</var> is
          interpreted using the current radix (see
          <code class="Cm">trace/t</code> command for details). This is the
          default.</dd>
    </dl>
  </dd>
  <dt id="show~24"><a class="permalink" href="#show~24"><code class="Ic">show
    registers</code></a>[<code class="Cm">/u</code>]</dt>
  <dd>Display the register set. If <code class="Cm">/u</code> is specified,
      display user registers instead of kernel registers or the currently save
      one.
    <p class="Pp">Warning: support for <code class="Cm">/u</code> is machine
        dependent. If not supported, incorrect information will be
      displayed.</p>
  </dd>
  <dt id="show~25"><a class="permalink" href="#show~25"><code class="Ic">show
    sched_qs</code></a></dt>
  <dd>Print the state of the scheduler's run queues. For each run queue that has
      an LWP, the run queue index and the list of LWPs will be shown. If the run
      queue has LWPs, but the sched_whichqs bit is not set for that queue, the
      queue index will be prefixed with a &#x2018;!&#x2019;.</dd>
  <dt id="show~26"><a class="permalink" href="#show~26"><code class="Ic">show
    socket</code></a>[<code class="Cm">/ampv</code>]</dt>
  <dd>Print usage of system's socket buffers. By default, empty sockets aren't
      printed.
    <dl class="Bl-tag Bl-compact">
      <dt id="/a~3"><a class="permalink" href="#/a~3"><code class="Cm">/a</code></a></dt>
      <dd>Print all processes which use the socket.</dd>
      <dt id="/m~2"><a class="permalink" href="#/m~2"><code class="Cm">/m</code></a></dt>
      <dd>Print mbuf chain in the socket buffer.</dd>
      <dt id="/p~3"><a class="permalink" href="#/p~3"><code class="Cm">/p</code></a></dt>
      <dd>By default, a process which uses the socket is printed (only one
          socket). If <code class="Cm">/p</code> is specified, the process isn't
          printed.</dd>
      <dt id="/v~2"><a class="permalink" href="#/v~2"><code class="Cm">/v</code></a></dt>
      <dd>Verbose mode. If <code class="Cm">/v</code> is specified, all sockets
          are printed.</dd>
    </dl>
  </dd>
  <dt id="show~27"><a class="permalink" href="#show~27"><code class="Ic">show
    uvmexp</code></a></dt>
  <dd>Print a selection of UVM counters and statistics.</dd>
  <dt id="show~28"><a class="permalink" href="#show~28"><code class="Ic">show
    kernhist</code></a>[<code class="Cm">/i</code>]
    [<var class="Ar">address</var>[<code class="Cm">,</code><var class="Ar">count</var>]]</dt>
  <dd>Dumps all the kernel histories if no address is specified, or the history
      at the address. If <code class="Cm">/i</code> is specified, display
      information about the named history or all histories, instead of history
      entries. If <var class="Ar">count</var> is specified, only the last
      <var class="Ar">count</var> entries will be displayed. Currently the
      <var class="Ar">count</var> handling is only performed if a single history
      is requested. This command is available only if a kernel is compiled with
      one or more of the kernel history options
      <code class="Cd">KERNHIST</code>, <code class="Cd">SYSCALL_DEBUG</code>,
      <code class="Cd">USB_DEBUG</code>, <code class="Cd">BIOHIST</code>, or
      <code class="Cd">UVMHIST</code>.</dd>
  <dt id="show~29"><a class="permalink" href="#show~29"><code class="Ic">show
    vmem</code></a> <var class="Ar">address</var></dt>
  <dd>Print the vmem at <var class="Ar">address</var>.</dd>
  <dt id="show~30"><a class="permalink" href="#show~30"><code class="Ic">show
    vmems</code></a></dt>
  <dd>Display all vmems.</dd>
  <dt id="show~31"><a class="permalink" href="#show~31"><code class="Ic">show
    vnode</code></a>[<code class="Cm">/f</code>]
    <var class="Ar">address</var></dt>
  <dd>Print the vnode at <var class="Ar">address</var>. If
      <code class="Cm">/f</code> is specified, the complete vnode is
    printed.</dd>
  <dt id="show~32"><a class="permalink" href="#show~32"><code class="Ic">show
    vnode_lock</code></a>[<code class="Cm">/f</code>]
    <var class="Ar">address</var></dt>
  <dd>Print the vnode which has its lock at <var class="Ar">address</var>. If
      <code class="Cm">/f</code> is specified, the complete vnode is
    printed.</dd>
  <dt id="show~33"><a class="permalink" href="#show~33"><code class="Ic">show
    watches</code></a></dt>
  <dd>Display all watchpoints.</dd>
  <dt id="sifting"><a class="permalink" href="#sifting"><code class="Ic">sifting</code></a>[<code class="Cm">/F</code>]
    <var class="Ar">string</var></dt>
  <dd>Search the symbol tables for all symbols of which
      <var class="Ar">string</var> is a substring, and display them. If
      <code class="Cm">/F</code> is specified, a character is displayed
      immediately after each symbol name indicating the type of symbol.
    <p class="Pp" id="&amp;">Object symbols display <b class="Sy">+</b>,
        function symbols display <b class="Sy">*</b>, section symbols display
        <a class="permalink" href="#&amp;"><b class="Sy">&amp;</b></a>, and file
        symbols display
        <a class="permalink" href="#/"><b class="Sy" id="/">/</b></a>.</p>
    <p class="Pp">To sift for a string beginning with a number, escape the first
        character with a backslash as:</p>
    <div class="Bd Pp Bd-indent Li">
    <pre>sifting \386</pre>
    </div>
  </dd>
  <dt id="step"><a class="permalink" href="#step"><code class="Ic">step</code></a>[<code class="Cm">/p</code>]
    [<code class="Cm">,</code><var class="Ar">count</var>]</dt>
  <dd>Single-step <var class="Ar">count</var> times. If
      <code class="Cm">/p</code> is specified, print each instruction at each
      step. Otherwise, only print the last instruction.
    <p class="Pp">Warning: depending on the machine type, it may not be possible
        to single-step through some low-level code paths or user-space code. On
        machines with software-emulated single-stepping (e.g., pmax), stepping
        through code executed by interrupt handlers will probably do the wrong
        thing.</p>
  </dd>
  <dt id="sync"><a class="permalink" href="#sync"><code class="Ic">sync</code></a></dt>
  <dd>Sync the disks, force a crash dump, and then reboot.</dd>
  <dt id="trace"><a class="permalink" href="#trace"><code class="Ic">trace</code></a>[<code class="Cm">/u</code>[<code class="Cm">l</code>]]
    [<var class="Ar">frame-address</var>][<code class="Cm">,</code><var class="Ar">count</var>]</dt>
  <dd>Stack trace from <var class="Ar">frame-address</var>. If
      <code class="Cm">/u</code> is specified, trace user-space, otherwise trace
      kernel-space. <var class="Ar">count</var> is the number of frames to be
      traced. If <var class="Ar">count</var> is omitted, all frames are printed.
      If <code class="Cm">/l</code> is specified, the trace is printed and also
      stored in the kernel message buffer.
    <p class="Pp">Warning: user-space stack trace is valid only if the machine
        dependent code supports it.</p>
  </dd>
  <dt id="trace/t"><a class="permalink" href="#trace/t"><code class="Ic">trace/t</code></a>[<code class="Cm">l</code>]
    [<var class="Ar">pid</var>][<code class="Cm">,</code><var class="Ar">count</var>]</dt>
  <dd>Stack trace by &#x201C;thread&#x201D; (process, on
      <span class="Ux">NetBSD</span>) rather than by stack frame address. Note
      that <var class="Ar">pid</var> is interpreted using the current radix,
      whilst <code class="Ic">ps</code> displays pids in decimal; prefix
      <var class="Ar">pid</var> with &#x2018;0t&#x2019; to force it to be
      interpreted as decimal (see <a class="Sx" href="#VARIABLES">VARIABLES</a>
      section for radix). If <code class="Cm">/l</code> is specified, the trace
      is printed and also stored in the kernel message buffer.
    <p class="Pp">Warning: trace by pid is valid only if the machine dependent
        code supports it.</p>
  </dd>
  <dt id="trace/a"><a class="permalink" href="#trace/a"><code class="Ic">trace/a</code></a>[<code class="Cm">l</code>]
    [<var class="Ar">lwpaddr</var>][<code class="Cm">,</code><var class="Ar">count</var>]</dt>
  <dd>Stack trace by light weight process (LWP) address rather than by stack
      frame address. If <code class="Cm">/l</code> is specified, the trace is
      printed and also stored in the kernel message buffer.
    <p class="Pp">Warning: trace by LWP address is valid only if the machine
        dependent code supports it.</p>
  </dd>
  <dt id="until"><a class="permalink" href="#until"><code class="Ic">until</code></a>[<code class="Cm">/p</code>]</dt>
  <dd>Stop at the next call or return instruction. If <code class="Cm">/p</code>
      is specified, print the call nesting depth and the cumulative instruction
      count at each call or return. Otherwise, only print when the matching
      return is hit.</dd>
  <dt id="watch"><a class="permalink" href="#watch"><code class="Ic">watch</code></a>
    <var class="Ar">address</var>[<code class="Cm">,</code><var class="Ar">size</var>]</dt>
  <dd>Set a watchpoint for a region. Execution stops when an attempt to modify
      the region occurs. <var class="Ar">size</var> defaults to 4.
    <p class="Pp">If you specify a wrong space address, the request is rejected
        with an error message.</p>
    <p class="Pp">Warning: attempts to watch wired kernel memory may cause an
        unrecoverable error in some systems such as i386. Watchpoints on user
        addresses work the best.</p>
  </dd>
  <dt id="whatis"><a class="permalink" href="#whatis"><code class="Ic">whatis</code></a>
    <var class="Ar">address</var></dt>
  <dd>Describe what an address is.</dd>
  <dt id="write"><a class="permalink" href="#write"><code class="Ic">write</code></a>[<code class="Cm">/bhlqBHLQ</code>]
    <var class="Ar">address</var> <var class="Ar">expression</var>
    [<var class="Ar">expression ...</var>]</dt>
  <dd>Write the <var class="Ar">expression</var>s at succeeding locations. The
      unit size is specified with a modifier character, as per
      <code class="Ic">examine</code>. Valid modifiers are:
      <code class="Cm">/b</code>, <code class="Cm">/h</code>,
      <code class="Cm">/l</code>, and <code class="Cm">/q</code>. If no modifier
      is specified, <code class="Cm">/l</code> is used.
    <p class="Pp">Specifying the modifiers in upper case,
        <code class="Cm">/B</code>, <code class="Cm">/H</code>,
        <code class="Cm">/L</code>, <code class="Cm">/Q</code>, will prevent
        <code class="Nm">ddb</code> from reading the memory location first,
        which is useful for avoiding side effects when writing to I/O memory
        regions.</p>
    <p class="Pp">Warning: since there is no delimiter between
        <var class="Ar">expression</var>s, strange things may occur. It's best
        to enclose each <var class="Ar">expression</var> in parentheses.</p>
  </dd>
  <dt id="x~2"><a class="permalink" href="#x~2"><code class="Ic">x</code></a>[<code class="Cm">/</code><var class="Ar">modifier</var>]
    <var class="Ar">address</var>[<code class="Cm">,</code><var class="Ar">count</var>]</dt>
  <dd>A synonym for <code class="Ic">examine</code>.</dd>
</dl>
</section>
<section class="Sh">
<h1 class="Sh" id="MACHINE-SPECIFIC_COMMANDS"><a class="permalink" href="#MACHINE-SPECIFIC_COMMANDS">MACHINE-SPECIFIC
  COMMANDS</a></h1>
<p class="Pp">The &quot;glue&quot; code that hooks <code class="Nm">ddb</code>
    into the <span class="Ux">NetBSD</span> kernel for any given port can also
    add machine specific commands to the <code class="Nm">ddb</code> command
    parser. All of these commands are preceded by the command word
    <a class="permalink" href="#machine"><i class="Em" id="machine">machine</i></a>
    to indicate that they are part of the machine-specific command set (e.g.
    <code class="Ic">machine reboot</code>). Some of these commands are:</p>
<section class="Ss">
<h2 class="Ss" id="AARCH64"><a class="permalink" href="#AARCH64">AARCH64</a></h2>
<dl class="Bl-tag Bl-compact">
  <dt id="break~2"><a class="permalink" href="#break~2"><code class="Ic">break</code></a></dt>
  <dd>Set or clear a hardware breakpoint.</dd>
  <dt id="cpu"><a class="permalink" href="#cpu"><code class="Ic">cpu</code></a></dt>
  <dd>Switch to another CPU.</dd>
  <dt id="cpuinfo"><a class="permalink" href="#cpuinfo"><code class="Ic">cpuinfo</code></a></dt>
  <dd>Print CPU information about the ``struct cpuinfo''.</dd>
  <dt id="frame"><a class="permalink" href="#frame"><code class="Ic">frame</code></a></dt>
  <dd>Given a trap frame address, print out the trap frame.</dd>
  <dt id="lwp"><a class="permalink" href="#lwp"><code class="Ic">lwp</code></a></dt>
  <dd>Print lwp information about the ``struct lwp''.</dd>
  <dt id="pte"><a class="permalink" href="#pte"><code class="Ic">pte</code></a></dt>
  <dd>Print PTE information.</dd>
  <dt id="reset"><a class="permalink" href="#reset"><code class="Ic">reset</code></a></dt>
  <dd>Reset the system.</dd>
  <dt id="sysreg"><a class="permalink" href="#sysreg"><code class="Ic">sysreg</code></a></dt>
  <dd>Print system registers.</dd>
  <dt id="watch~2"><a class="permalink" href="#watch~2"><code class="Ic">watch</code></a></dt>
  <dd>Set or clear a hardware watchpoint. Pass the address to be watched, or
      watchpoint number to clear the watchpoint. Optional modifiers are
      &#x201C;r&#x201D; for read access, &#x201C;w&#x201D; for write access
      (default: trap on read or write access), &#x201C;b&#x201D; for 8 bit
      width, &#x201C;h&#x201D; for 16 bit, &#x201C;l&#x201D; for 32 bit or,
      &#x201C;q&#x201D; for 64 bit (default: 32 bit).</dd>
</dl>
</section>
<section class="Ss">
<h2 class="Ss" id="ALPHA"><a class="permalink" href="#ALPHA">ALPHA</a></h2>
<dl class="Bl-tag Bl-compact">
  <dt id="cpu~2"><a class="permalink" href="#cpu~2"><code class="Ic">cpu</code></a></dt>
  <dd>Switch to another CPU.</dd>
</dl>
</section>
<section class="Ss">
<h2 class="Ss" id="AMD64"><a class="permalink" href="#AMD64">AMD64</a></h2>
<dl class="Bl-tag Bl-compact">
  <dt id="cpu~3"><a class="permalink" href="#cpu~3"><code class="Ic">cpu</code></a></dt>
  <dd>Switch to another CPU.</dd>
</dl>
</section>
<section class="Ss">
<h2 class="Ss" id="ARM32"><a class="permalink" href="#ARM32">ARM32</a></h2>
<dl class="Bl-tag Bl-compact">
  <dt id="frame~2"><a class="permalink" href="#frame~2"><code class="Ic">frame</code></a></dt>
  <dd>Given a trap frame address, print out the trap frame.</dd>
  <dt id="reset~2"><a class="permalink" href="#reset~2"><code class="Ic">reset</code></a></dt>
  <dd>Reset the system.</dd>
</dl>
</section>
<section class="Ss">
<h2 class="Ss" id="HPPA"><a class="permalink" href="#HPPA">HPPA</a></h2>
<dl class="Bl-tag Bl-compact">
  <dt id="frame~3"><a class="permalink" href="#frame~3"><code class="Ic">frame</code></a></dt>
  <dd>Without an address the default trap frame is printed. Otherwise, the trap
      frame address can be given, or, when the &#x201C;l&#x201D; modifier is
      used, an LWP address.</dd>
</dl>
</section>
<section class="Ss">
<h2 class="Ss" id="I386"><a class="permalink" href="#I386">I386</a></h2>
<dl class="Bl-tag Bl-compact">
  <dt id="cpu~4"><a class="permalink" href="#cpu~4"><code class="Ic">cpu</code></a></dt>
  <dd>Switch to another CPU.</dd>
</dl>
</section>
<section class="Ss">
<h2 class="Ss" id="IA64"><a class="permalink" href="#IA64">IA64</a></h2>
<dl class="Bl-tag Bl-compact">
  <dt id="vector"><a class="permalink" href="#vector"><code class="Ic">vector</code></a></dt>
  <dd>Without a vector, information about all 256 vectors is shown. Otherwise,
      the given vector is shown.</dd>
</dl>
</section>
<section class="Ss">
<h2 class="Ss" id="MIPS"><a class="permalink" href="#MIPS">MIPS</a></h2>
<dl class="Bl-tag Bl-compact">
  <dt id="cp0"><a class="permalink" href="#cp0"><code class="Ic">cp0</code></a></dt>
  <dd>Dump CP0 (coprocessor 0) register values.</dd>
  <dt id="cpu~5"><a class="permalink" href="#cpu~5"><code class="Ic">cpu</code></a></dt>
  <dd>Switch to another CPU.</dd>
  <dt id="kvtop"><a class="permalink" href="#kvtop"><code class="Ic">kvtop</code></a></dt>
  <dd>Print the physical address for a given kernel virtual address.</dd>
  <dt id="nmi"><a class="permalink" href="#nmi"><code class="Ic">nmi</code></a></dt>
  <dd>Send an NMI to a different CPU. This DDB command is currently only
      implemented for Cavium Octeon CPUs.</dd>
  <dt id="reset~3"><a class="permalink" href="#reset~3"><code class="Ic">reset</code></a></dt>
  <dd>Reset the system. Not implemented for many CPUs and/or systems.</dd>
  <dt id="tlb"><a class="permalink" href="#tlb"><code class="Ic">tlb</code></a></dt>
  <dd>Print out the Translation Lookaside Buffer (TLB). Use the
      <code class="Cm">/v</code> modifier to show only valid TLB entries.</dd>
  <dt id="watch~3"><a class="permalink" href="#watch~3"><code class="Ic">watch</code></a></dt>
  <dd>Set a hardware watchpoint on an address or a TLB ASID. Pass the address to
      be watched. If no address is specified, show a list of active watchpoints.
      The modifiers are <code class="Cm">/m</code> i for trap on an instruction
      fetch, <code class="Cm">/r</code> for trap on a read,
      <code class="Cm">/w</code> for trap on a write, <code class="Cm">/m</code>
      for a mask on the address to match, <code class="Cm">/a</code> for trap on
      a TLB ASID match. The <code class="Cm">/m</code> and
      <code class="Cm">/a</code> modifiers require an extra argument for the
      mask and ASID respectively.</dd>
  <dt id="unwatch"><a class="permalink" href="#unwatch"><code class="Ic">unwatch</code></a></dt>
  <dd>Clear a hardware watchpoint. If an address is specified, clear watchpoints
      that match that address. If no address is specified, clear all
      watchpoints.</dd>
</dl>
</section>
<section class="Ss">
<h2 class="Ss" id="POWERPC_4xx"><a class="permalink" href="#POWERPC_4xx">POWERPC
  4xx</a></h2>
<dl class="Bl-tag Bl-compact">
  <dt id="ctx"><a class="permalink" href="#ctx"><code class="Ic">ctx</code></a></dt>
  <dd>Print process MMU context information.</dd>
  <dt id="pv"><a class="permalink" href="#pv"><code class="Ic">pv</code></a></dt>
  <dd>Print PA-&gt;VA mapping information.</dd>
  <dt id="reset~4"><a class="permalink" href="#reset~4"><code class="Ic">reset</code></a></dt>
  <dd>Reset the system.</dd>
  <dt id="tf"><a class="permalink" href="#tf"><code class="Ic">tf</code></a></dt>
  <dd>Display the contents of the trapframe.</dd>
  <dt id="tlb~2"><a class="permalink" href="#tlb~2"><code class="Ic">tlb</code></a></dt>
  <dd>Display instruction translation storage buffer information.</dd>
  <dt id="dcr"><a class="permalink" href="#dcr"><code class="Ic">dcr</code></a></dt>
  <dd>Set the DCR register. Must be between 0x00 and 0x3ff.</dd>
  <dt id="user"><a class="permalink" href="#user"><code class="Ic">user</code></a></dt>
  <dd>Display user memory. Use the &#x201C;i&#x201D; modifier to get instruction
      decoding.</dd>
</dl>
</section>
<section class="Ss">
<h2 class="Ss" id="POWERPC_OEA"><a class="permalink" href="#POWERPC_OEA">POWERPC
  OEA</a></h2>
<dl class="Bl-tag Bl-compact">
  <dt id="bat"><a class="permalink" href="#bat"><code class="Ic">bat</code></a></dt>
  <dd>Print BAT registers and translations.</dd>
  <dt id="mmu"><a class="permalink" href="#mmu"><code class="Ic">mmu</code></a></dt>
  <dd>Print MMU registers.</dd>
</dl>
</section>
<section class="Ss">
<h2 class="Ss" id="SH3"><a class="permalink" href="#SH3">SH3</a></h2>
<dl class="Bl-tag Bl-compact">
  <dt id="tlb~3"><a class="permalink" href="#tlb~3"><code class="Ic">tlb</code></a></dt>
  <dd>Print TLB entries.</dd>
  <dt id="cache"><a class="permalink" href="#cache"><code class="Ic">cache</code></a></dt>
  <dd>Print cache entries.</dd>
  <dt id="frame~4"><a class="permalink" href="#frame~4"><code class="Ic">frame</code></a></dt>
  <dd>Print switch frame and trap frames.</dd>
  <dt id="stack"><a class="permalink" href="#stack"><code class="Ic">stack</code></a></dt>
  <dd>Print kernel stack usage. Only works in <span class="Ux">NetBSD</span>
      kernels compiled with the <code class="Dv">KSTACK_DEBUG</code>
    option.</dd>
</dl>
</section>
<section class="Ss">
<h2 class="Ss" id="SPARC"><a class="permalink" href="#SPARC">SPARC</a></h2>
<dl class="Bl-tag Bl-compact">
  <dt id="cpu~6"><a class="permalink" href="#cpu~6"><code class="Ic">cpu</code></a></dt>
  <dd>Switch to another CPU.</dd>
  <dt id="prom"><a class="permalink" href="#prom"><code class="Ic">prom</code></a></dt>
  <dd>Enter the Sun PROM monitor.</dd>
  <dt id="proc"><a class="permalink" href="#proc"><code class="Ic">proc</code></a></dt>
  <dd>Display some information about the LWP pointed to, or curlwp.</dd>
  <dt id="pcb"><a class="permalink" href="#pcb"><code class="Ic">pcb</code></a></dt>
  <dd>Display information about the &#x201C;struct pcb&#x201D; listed.</dd>
  <dt id="page"><a class="permalink" href="#page"><code class="Ic">page</code></a></dt>
  <dd>Display the pointer to the &#x201C;struct vm_page&#x201D; for this
      physical address.</dd>
</dl>
</section>
<section class="Ss">
<h2 class="Ss" id="SPARC64"><a class="permalink" href="#SPARC64">SPARC64</a></h2>
<dl class="Bl-tag Bl-compact">
  <dt id="ctx~2"><a class="permalink" href="#ctx~2"><code class="Ic">ctx</code></a></dt>
  <dd>Print process context information.</dd>
  <dt id="cpu~7"><a class="permalink" href="#cpu~7"><code class="Ic">cpu</code></a></dt>
  <dd>Switch to another CPU.</dd>
  <dt id="dtlb"><a class="permalink" href="#dtlb"><code class="Ic">dtlb</code></a></dt>
  <dd>Print data translation look-aside buffer context information.</dd>
  <dt id="dtsb"><a class="permalink" href="#dtsb"><code class="Ic">dtsb</code></a></dt>
  <dd>Display data translation storage buffer information.</dd>
  <dt id="kmap"><a class="permalink" href="#kmap"><code class="Ic">kmap</code></a></dt>
  <dd>Display information about the listed mapping in the kernel pmap. Use the
      &#x201C;f&#x201D; modifier to get a full listing.</dd>
  <dt id="extract"><a class="permalink" href="#extract"><code class="Ic">extract</code></a></dt>
  <dd>Extract the physical address for a given virtual address from the kernel
      pmap.</dd>
  <dt id="fpstate"><a class="permalink" href="#fpstate"><code class="Ic">fpstate</code></a></dt>
  <dd>Dump the FPU state.</dd>
  <dt id="itlb"><a class="permalink" href="#itlb"><code class="Ic">itlb</code></a></dt>
  <dd>Print instruction translation look-aside buffer context information.</dd>
  <dt id="itsb"><a class="permalink" href="#itsb"><code class="Ic">itsb</code></a></dt>
  <dd>Display instruction translation storage buffer information.</dd>
  <dt id="lwp~2"><a class="permalink" href="#lwp~2"><code class="Ic">lwp</code></a></dt>
  <dd>Display a struct lwp</dd>
  <dt id="pcb~2"><a class="permalink" href="#pcb~2"><code class="Ic">pcb</code></a></dt>
  <dd>Display information about the &#x201C;struct pcb&#x201D; listed.</dd>
  <dt id="pctx"><a class="permalink" href="#pctx"><code class="Ic">pctx</code></a></dt>
  <dd>Attempt to change process context.</dd>
  <dt id="page~2"><a class="permalink" href="#page~2"><code class="Ic">page</code></a></dt>
  <dd>Display the pointer to the &#x201C;struct vm_page&#x201D; for this
      physical address.</dd>
  <dt id="phys"><a class="permalink" href="#phys"><code class="Ic">phys</code></a></dt>
  <dd>Display physical memory.</dd>
  <dt id="pmap"><a class="permalink" href="#pmap"><code class="Ic">pmap</code></a></dt>
  <dd>Display the pmap. Use the &#x201C;f&#x201D; modifier to get a fuller
      listing.</dd>
  <dt id="proc~2"><a class="permalink" href="#proc~2"><code class="Ic">proc</code></a></dt>
  <dd>Display some information about the process pointed to, or curproc.</dd>
  <dt id="prom~2"><a class="permalink" href="#prom~2"><code class="Ic">prom</code></a></dt>
  <dd>Enter the OFW PROM.</dd>
  <dt id="pv~2"><a class="permalink" href="#pv~2"><code class="Ic">pv</code></a></dt>
  <dd>Display the &#x201C;struct pv_entry&#x201D; pointed to.</dd>
  <dt id="sir"><a class="permalink" href="#sir"><code class="Ic">sir</code></a></dt>
  <dd>Reset the machine and enter prom (do a Software Initiated Reset).</dd>
  <dt id="stack~2"><a class="permalink" href="#stack~2"><code class="Ic">stack</code></a></dt>
  <dd>Dump the window stack. Use the &#x201C;u&#x201D; modifier to get userland
      information.</dd>
  <dt id="tf~2"><a class="permalink" href="#tf~2"><code class="Ic">tf</code></a></dt>
  <dd>Display full trap frame state. This is most useful for inclusion with bug
      reports.</dd>
  <dt id="ts"><a class="permalink" href="#ts"><code class="Ic">ts</code></a></dt>
  <dd>Display trap state.</dd>
  <dt id="traptrace"><a class="permalink" href="#traptrace"><code class="Ic">traptrace</code></a></dt>
  <dd>Display or set trap trace information. Use the &#x201C;r&#x201D; and
      &#x201C;f&#x201D; modifiers to get reversed and full information,
      respectively.</dd>
  <dt id="watch~4"><a class="permalink" href="#watch~4"><code class="Ic">watch</code></a></dt>
  <dd>Set or clear a physical or virtual hardware watchpoint. Pass the address
      to be watched, or &#x201C;0&#x201D; (or omit the address) to clear the
      watchpoint. Optional modifiers are &#x201C;p&#x201D; for physical address,
      &#x201C;r&#x201D; for trap on read access (default: trap on write access
      only), &#x201C;b&#x201D; for 8 bit width, &#x201C;h&#x201D; for 16 bit,
      &#x201C;l&#x201D; for 32 bit or &#x201C;L&#x201D; for 64 bit.</dd>
  <dt id="window"><a class="permalink" href="#window"><code class="Ic">window</code></a></dt>
  <dd>Print register window information. Argument is a stack frame number (0 is
      top of stack, which is used when no index is given).</dd>
</dl>
</section>
<section class="Ss">
<h2 class="Ss" id="SUN2,_SUN3_and_SUN3X"><a class="permalink" href="#SUN2,_SUN3_and_SUN3X">SUN2,
  SUN3 and SUN3X</a></h2>
<dl class="Bl-tag Bl-compact">
  <dt id="abort"><a class="permalink" href="#abort"><code class="Ic">abort</code></a></dt>
  <dd>Drop into monitor via abort (allows continue).</dd>
  <dt id="halt"><a class="permalink" href="#halt"><code class="Ic">halt</code></a></dt>
  <dd>Exit to Sun PROM monitor as in <a class="Xr">halt(8)</a>.</dd>
  <dt id="reboot~2"><a class="permalink" href="#reboot~2"><code class="Ic">reboot</code></a></dt>
  <dd>Reboot the machine as in <a class="Xr">reboot(8)</a>.</dd>
  <dt id="pgmap"><a class="permalink" href="#pgmap"><code class="Ic">pgmap</code></a></dt>
  <dd>Given an address, print the address, segment map, page map, and Page Table
      Entry (PTE).</dd>
</dl>
</section>
<section class="Ss">
<h2 class="Ss" id="VAX"><a class="permalink" href="#VAX">VAX</a></h2>
<dl class="Bl-tag Bl-compact">
  <dt id="cpu~8"><a class="permalink" href="#cpu~8"><code class="Ic">cpu</code></a></dt>
  <dd>Switch to another CPU.</dd>
</dl>
</section>
</section>
<section class="Sh">
<h1 class="Sh" id="VARIABLES"><a class="permalink" href="#VARIABLES">VARIABLES</a></h1>
<p class="Pp"><code class="Nm">ddb</code> accesses registers and variables as
    <code class="Cm">$</code><var class="Ar">name</var>. Register names are as
    per the <code class="Ic">show registers</code> command. Some variables are
    suffixed with numbers, and may have a modifier following a colon immediately
    after the variable name. For example, register variables may have a
    &#x2018;u&#x2019; modifier to indicate user register (e.g.,
    <code class="Li">$eax:u</code>).</p>
<p class="Pp">Built-in variables currently supported are:</p>
<div class="Bd-indent">
<dl class="Bl-tag Bl-compact">
  <dt id="dumpstack"><var class="Va">dumpstack</var></dt>
  <dd>If non-zero (the default), causes a stack trace to be printed when
      <code class="Nm">ddb</code> is entered on panic.</dd>
  <dt id="fromconsole"><var class="Va">fromconsole</var></dt>
  <dd>If non-zero (the default), the kernel allows to enter
      <code class="Nm">ddb</code> from the console (by break signal or special
      key sequence). If the kernel configuration option
    <div class="Bd Bd-indent"><code class="Cd">options
      DDB_FROMCONSOLE=0</code></div>
    is used, <var class="Va">fromconsole</var> will be initialized to off.</dd>
  <dt id="lines"><var class="Va">lines</var></dt>
  <dd>The number of lines. This is used by the <code class="Ic">more</code>
      feature. When this variable is set to zero the
      <code class="Ic">more</code> feature is disabled.</dd>
  <dt id="maxoff"><var class="Va">maxoff</var></dt>
  <dd>Addresses are printed as <code class="Li">'symbol'+offset</code> unless
      <code class="Li">offset</code> is greater than
      <var class="Va">maxoff</var>.</dd>
  <dt id="maxwidth"><var class="Va">maxwidth</var></dt>
  <dd>The width of the displayed line. <code class="Nm">ddb</code> wraps the
      current line by printing new line when <var class="Va">maxwidth</var>
      column is reached. When this variable is set to zero
      <code class="Nm">ddb</code> doesn't perform any wrapping.</dd>
  <dt id="onpanic"><var class="Va">onpanic</var></dt>
  <dd>If greater than zero (the default is 1), <code class="Nm">ddb</code> will
      be invoked when the kernel panics. If the kernel configuration option
    <div class="Bd Bd-indent"><code class="Cd">options
      DDB_ONPANIC=0</code></div>
    is used, <var class="Va">onpanic</var> will be initialized to off, causing a
      stack trace to be printed and the system to be rebooted instead of
      <code class="Nm">ddb</code> being entered. Setting
      <var class="Va">onpanic</var> to -1 suppresses the stack trace before
      reboot.</dd>
  <dt id="radix"><var class="Va">radix</var></dt>
  <dd>Input and output radix.</dd>
  <dt id="tabstops"><var class="Va">tabstops</var></dt>
  <dd>Tab stop width.</dd>
  <dt id="tee_msgbuf"><var class="Va">tee_msgbuf</var></dt>
  <dd>If explicitly set to non zero (zero is the default) all
      <code class="Nm">ddb</code> output will not only be displayed on screen
      but also be fed to the msgbuf. The default of the variable can be set
      using the kernel configuration option
    <div class="Bd Bd-indent"><code class="Cd">options
      DDB_TEE_MSGBUF=1</code></div>
    which will initialize <var class="Va">tee_msgbuf</var> to be 1. This option
      is especially handy for poor souls who don't have a serial console but
      want to recall <code class="Nm">ddb</code> output from a crash
      investigation. This option is more generic than the /l command modifier
      possible for selected commands as discussed above to log the output.
      Mixing both /l and this setting can give double loggings.</dd>
  <dt id="panicstackframes"><var class="Va">panicstackframes</var></dt>
  <dd>Number of stack frames to display on panic. Useful to avoid scrolling away
      the interesting frames on a glass tty. Default value is
      <code class="Dv">65535</code> (all frames), useful value around
      <code class="Dv">10</code>.</dd>
</dl>
</div>
<p class="Pp">All built-in variables are accessible via
    <a class="Xr">sysctl(3)</a>.</p>
</section>
<section class="Sh">
<h1 class="Sh" id="EXPRESSIONS"><a class="permalink" href="#EXPRESSIONS">EXPRESSIONS</a></h1>
<p class="Pp">Almost all expression operators in C are supported, except
    &#x2018;~&#x2019;, &#x2018;^&#x2019;, and unary &#x2018;&amp;&#x2019;.
    Special rules in <code class="Nm">ddb</code> are:</p>
<div class="Bd-indent">
<dl class="Bl-tag">
  <dt><var class="Ar">identifier</var></dt>
  <dd>name of a symbol. It is translated to the address (or value) of it.
      &#x2018;.&#x2019; and &#x2018;:&#x2019; can be used in the identifier. If
      supported by an object format dependent routine,
      [<var class="Ar">filename</var>:]<var class="Ar">function</var>[:<var class="Ar">line&#x00A0;number</var>],
      [<var class="Ar">filename</var>:]<var class="Ar">variable</var>, and
      <var class="Ar">filename</var>[:<var class="Ar">line number</var>], can be
      accepted as a symbol. The symbol may be prefixed with
      <var class="Ar">symbol_table_name</var>:: (e.g.,
      <code class="Li">emulator::mach_msg_trap</code>) to specify other than
      kernel symbols.</dd>
  <dt><var class="Ar">number</var></dt>
  <dd>number. Radix is determined by the first two characters:
      &#x2018;0x&#x2019; - hex, &#x2018;0o&#x2019; - octal, &#x2018;0t&#x2019; -
      decimal, otherwise follow current radix.</dd>
  <dt id="."><a class="permalink" href="#."><code class="Cm">.</code></a></dt>
  <dd><var class="Ar">dot</var></dd>
  <dt id="+"><a class="permalink" href="#+"><code class="Cm">+</code></a></dt>
  <dd><var class="Ar">next</var></dd>
  <dt id=".."><a class="permalink" href="#.."><code class="Cm">..</code></a></dt>
  <dd>address of the start of the last line examined. Unlike
      <var class="Ar">dot</var> or <var class="Ar">next</var>, this is only
      changed by the <code class="Ic">examine</code> or
      <code class="Ic">write</code> commands.</dd>
  <dt id="_~2"><a class="permalink" href="#_~2"><code class="Cm">&quot;</code></a></dt>
  <dd>last address explicitly specified.</dd>
  <dt id="$"><a class="permalink" href="#$"><code class="Cm">$</code></a><var class="Ar">name</var></dt>
  <dd>register name or variable. It is translated to the value of it. It may be
      followed by a &#x2018;:&#x2019; and modifiers as described above.</dd>
  <dt id="_~3"><a class="permalink" href="#_~3"><code class="Cm">#</code></a></dt>
  <dd>a binary operator which rounds up the left hand side to the next multiple
      of right hand side.</dd>
  <dt id="*"><a class="permalink" href="#*"><code class="Cm">*</code></a><var class="Ar">expr</var></dt>
  <dd>expression indirection. It may be followed by a &#x2018;:&#x2019; and
      modifiers as described above.</dd>
</dl>
</div>
</section>
<section class="Sh">
<h1 class="Sh" id="SEE_ALSO"><a class="permalink" href="#SEE_ALSO">SEE
  ALSO</a></h1>
<p class="Pp"><a class="Xr">reboot(2)</a>, <a class="Xr">options(4)</a>,
    <a class="Xr">crash(8)</a>, <a class="Xr">reboot(8)</a>,
    <a class="Xr">sysctl(8)</a>, <a class="Xr">cnmagic(9)</a>,
    <a class="Xr">ddb(9)</a></p>
</section>
<section class="Sh">
<h1 class="Sh" id="HISTORY"><a class="permalink" href="#HISTORY">HISTORY</a></h1>
<p class="Pp">The <code class="Nm">ddb</code> kernel debugger was written as
    part of the MACH project at Carnegie-Mellon University.</p>
</section>
</div>
<table class="foot">
  <tr>
    <td class="foot-date">March 15, 2026</td>
    <td class="foot-os">NetBSD 10.1</td>
  </tr>
</table>