]> CyberLeo.Net >> Repos - FreeBSD/releng/9.2.git/blob - gnu/usr.bin/gdb/kgdb/kgdb.1
- Copy stable/9 to releng/9.2 as part of the 9.2-RELEASE cycle.
[FreeBSD/releng/9.2.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$
26 .\"
27 .Dd October 11, 2006
28 .Dt KGDB 1
29 .Os
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 (This is identical to what
75 .Fl -wcore
76 used to do in previous
77 gdb versions for
78 .Fx . )
79 .It Fl d Ar crashdir
80 Use
81 .Ar crashdir
82 instead of the default,
83 .Pa /var/crash
84 to locate kernel core dump files in.
85 The name
86 .Pa vmcore.
87 plus the dump number will be appended to determine
88 the actual dump file name.
89 .It Fl c Ar core
90 Explicitly use
91 .Ar core
92 as the core dump file.
93 .It Fl n Ar dumpnr
94 Use the kernel core dump file numbered
95 .Ar dumpnr
96 for debugging.
97 .It Fl r Ar device
98 Use
99 .Ar device
100 to connect
101 .Nm
102 to for a remote debugging session.
103 .El
104 .Pp
105 The
106 .Fl c , n ,
107 and
108 .Fl r
109 options are mutually exclusive.
110 .Pp
111 Optionally, the name of the kernel symbol file and
112 the name of the core dump file can be supplied on the
113 command-line as positional arguments.
114 If no kernel symbol file name has been given, the
115 symbol file of the currently running kernel will be
116 used.
117 If no core dump file has been specified through either
118 of the options or the last command-line argument,
119 .Pa /dev/mem
120 will be opened to allow debugging the currently running
121 kernel.
122 .Sh FILES
123 .Bl -tag -width ".Pa /var/crash"
124 .It Pa /dev/mem
125 Default memory image to open if no core dump file
126 has been specified.
127 .It Pa /var/crash
128 Default directory to locate kernel core dump files.
129 .El
130 .Sh SEE ALSO
131 .Xr gdb 1
132 .Sh HISTORY
133 The
134 .Nm
135 utility first appeared in its current form in
136 .Fx 5.3 .