Switch to building a libgdb and both gdb and kgdb.
[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.8 2005/07/28 15:59:52 keramida Exp $
26 .\" $DragonFly: src/gnu/usr.bin/gdb/kgdb/kgdb.1,v 1.1 2006/03/07 15:48:11 corecode Exp $
27 .Dd March 2, 2005
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 d Ar crashdir
39 .Op Fl c Ar core | Fl n Ar dumpnr | Fl r Ar device
40 .Op Ar kernel Op Ar core
41 .Sh DESCRIPTION
42 The
43 .Nm
44 utility is a debugger based on
45 .Xr gdb 1
46 that allows debugging of kernel core files.
47 .Pp
48 The options are as follows:
49 .Bl -tag -width ".Fl d Ar crashdir"
50 .It Fl a
51 Increase the annotation level.
52 An annotation level of 1 features the historical
53 .Fl fullname
54 option of
55 .Xr gdb 1 .
56 This is useful when running
57 .Nm
58 in Emacs.
59 The
60 .Fl f
61 or
62 .Fl fullname
63 options are supported for backward compatibility as well.
64 .It Fl q
65 Suppress printing of the banner when the debugger starts.
66 The
67 .Fl quiet
68 form is supported for compatibility as well.
69 .It Fl v
70 Increase verbosity.
71 .It Fl d Ar crashdir
72 Use
73 .Ar crashdir
74 instead of the default,
75 .Pa /var/crash
76 to locate kernel core dump files in.
77 The name
78 .Pa vmcore.
79 plus the dump number will be appended to determine
80 the actual dump file name.
81 .It Fl c Ar core
82 Explicitly use
83 .Ar core
84 as the core dump file.
85 .It Fl n Ar dumpnr
86 Use the kernel core dump file numbered
87 .Ar dumpnr
88 for debugging.
89 .It Fl r Ar device
90 Use
91 .Ar device
92 to connect
93 .Nm
94 to for a remote debugging session.
95 .El
96 .Pp
97 The
98 .Fl c , n ,
99 and
100 .Fl r
101 options are mutually exclusive.
102 .Pp
103 Optionally, the name of the kernel symbol file and
104 the name of the core dump file can be supplied on the
105 command-line as positional arguments.
106 If no kernel symbol file name has been given, the
107 symbol file of the currently running kernel will be
108 used.
109 If no core dump file has been specified through either
110 of the options or the last command-line argument,
111 .Pa /dev/mem
112 will be opened to allow debugging the currently running
113 kernel.
114 .Sh FILES
115 .Bl -tag -width ".Pa /var/crash"
116 .It Pa /dev/mem
117 Default memory image to open if no core dump file
118 has been specified.
119 .It Pa /var/crash
120 Default directory to locate kernel core dump files.
121 .El
122 .Sh SEE ALSO
123 .Xr gdb 1
124 .Sh HISTORY
125 The
126 .Nm
127 utility first appeared in its current form in
128 .Fx 5.3
129 and was later ported to
130 .Dx 1.5.0 .