Merge branch 'vendor/ZLIB'
[dragonfly.git] / gnu / usr.bin / gdb / kgdb / kgdb.1
1 .\" Copyright (c) 2004 Marcel Moolenaar
2 .\" All rights reserved.
3 .\"
4 .\" Redistribution and use in source and binary forms, with or without
5 .\" modification, are permitted provided that the following conditions
6 .\" are met:
7 .\" 1. Redistributions of source code must retain the above copyright
8 .\"    notice, this list of conditions and the following disclaimer.
9 .\" 2. Redistributions in binary form must reproduce the above copyright
10 .\"    notice, this list of conditions and the following disclaimer in the
11 .\"    documentation and/or other materials provided with the distribution.
12 .\"
13 .\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
14 .\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
15 .\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
16 .\" IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
17 .\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
18 .\" BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
19 .\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
20 .\" AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
21 .\" OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
22 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
23 .\" SUCH DAMAGE.
24 .\"
25 .\" $FreeBSD: src/gnu/usr.bin/gdb/kgdb/kgdb.1,v 1.10 2006/10/21 17:39:35 ru Exp $
26 .\"
27 .Dd October 11, 2006
28 .Os
29 .Dt KGDB 1
30 .Sh NAME
31 .Nm kgdb
32 .Nd "kernel debugger"
33 .Sh SYNOPSIS
34 .Nm
35 .Op Fl a | Fl f | Fl fullname
36 .Op Fl q | Fl quiet
37 .Op Fl v
38 .Op Fl w
39 .Op Fl d Ar crashdir
40 .Op Fl c Ar core | Fl n Ar dumpnr | Fl r Ar device
41 .Op Ar kernel Op Ar core
42 .Sh DESCRIPTION
43 The
44 .Nm
45 utility is a debugger based on
46 .Xr gdb 1
47 that allows debugging of kernel core files.
48 .Pp
49 The options are as follows:
50 .Bl -tag -width ".Fl d Ar crashdir"
51 .It Fl a
52 Increase the annotation level.
53 An annotation level of 1 features the historical
54 .Fl fullname
55 option of
56 .Xr gdb 1 .
57 This is useful when running
58 .Nm
59 in Emacs.
60 The
61 .Fl f
62 or
63 .Fl fullname
64 options are supported for backward compatibility as well.
65 .It Fl q
66 Suppress printing of the banner when the debugger starts.
67 The
68 .Fl quiet
69 form is supported for compatibility as well.
70 .It Fl v
71 Increase verbosity.
72 .It Fl w
73 Opens kmem-based targets in read-write mode.
74 .It Fl d Ar crashdir
75 Use
76 .Ar crashdir
77 instead of the default,
78 .Pa /var/crash
79 to locate kernel core dump files in.
80 The name
81 .Pa vmcore.
82 plus the dump number will be appended to determine
83 the actual dump file name.
84 .It Fl c Ar core
85 Explicitly use
86 .Ar core
87 as the core dump file.
88 .It Fl n Ar dumpnr
89 Use the kernel core dump file numbered
90 .Ar dumpnr
91 for debugging.
92 .It Fl r Ar device
93 Use
94 .Ar device
95 to connect
96 .Nm
97 to for a remote debugging session.
98 .El
99 .Pp
100 The
101 .Fl c , n ,
102 and
103 .Fl r
104 options are mutually exclusive.
105 .Pp
106 Optionally, the name of the kernel symbol file and
107 the name of the core dump file can be supplied on the
108 command-line as positional arguments.
109 If no kernel symbol file name has been given, the
110 symbol file of the currently running kernel will be
111 used.
112 If no core dump file has been specified through either
113 of the options or the last command-line argument,
114 .Pa /dev/mem
115 will be opened to allow debugging the currently running
116 kernel.
117 .Sh FILES
118 .Bl -tag -width ".Pa /var/crash"
119 .It Pa /dev/mem
120 Default memory image to open if no core dump file
121 has been specified.
122 .It Pa /var/crash
123 Default directory to locate kernel core dump files.
124 .El
125 .Sh SEE ALSO
126 .Xr gdb 1
127 .Sh HISTORY
128 The
129 .Nm
130 utility first appeared in its current form in
131 .Fx 5.3
132 and was later ported to
133 .Dx 1.5 .