Line 0
Link Here
|
|
|
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: head/gnu/usr.bin/gdb/kgdb/kgdb.1 246958 2013-02-19 02:09:18Z adrian $ |
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 b Ar rate |
37 |
.Op Fl q | Fl quiet |
38 |
.Op Fl v |
39 |
.Op Fl w |
40 |
.Op Fl d Ar crashdir |
41 |
.Op Fl c Ar core | Fl n Ar dumpnr | Fl r Ar device |
42 |
.Op Ar kernel Op Ar core |
43 |
.Sh DESCRIPTION |
44 |
The |
45 |
.Nm |
46 |
utility is a debugger based on |
47 |
.Xr gdb 1 |
48 |
that allows debugging of kernel core files. |
49 |
.Pp |
50 |
The options are as follows: |
51 |
.Bl -tag -width ".Fl d Ar crashdir" |
52 |
.It Fl a |
53 |
Increase the annotation level. |
54 |
An annotation level of 1 features the historical |
55 |
.Fl fullname |
56 |
option of |
57 |
.Xr gdb 1 . |
58 |
This is useful when running |
59 |
.Nm |
60 |
in Emacs. |
61 |
The |
62 |
.Fl f |
63 |
or |
64 |
.Fl fullname |
65 |
options are supported for backward compatibility as well. |
66 |
.It Fl b Ar rate |
67 |
Set the baudrate to |
68 |
.Ar rate . |
69 |
.It Fl q |
70 |
Suppress printing of the banner when the debugger starts. |
71 |
The |
72 |
.Fl quiet |
73 |
form is supported for compatibility as well. |
74 |
.It Fl v |
75 |
Increase verbosity. |
76 |
.It Fl w |
77 |
Opens kmem-based targets in read-write mode. |
78 |
(This is identical to what |
79 |
.Fl -wcore |
80 |
used to do in previous |
81 |
gdb versions for |
82 |
.Fx . ) |
83 |
.It Fl d Ar crashdir |
84 |
Use |
85 |
.Ar crashdir |
86 |
instead of the default, |
87 |
.Pa /var/crash |
88 |
to locate kernel core dump files in. |
89 |
The name |
90 |
.Pa vmcore. |
91 |
plus the dump number will be appended to determine |
92 |
the actual dump file name. |
93 |
.It Fl c Ar core |
94 |
Explicitly use |
95 |
.Ar core |
96 |
as the core dump file. |
97 |
.It Fl n Ar dumpnr |
98 |
Use the kernel core dump file numbered |
99 |
.Ar dumpnr |
100 |
for debugging. |
101 |
.It Fl r Ar device |
102 |
Use |
103 |
.Ar device |
104 |
to connect |
105 |
.Nm |
106 |
to for a remote debugging session. |
107 |
.El |
108 |
.Pp |
109 |
The |
110 |
.Fl c , n , |
111 |
and |
112 |
.Fl r |
113 |
options are mutually exclusive. |
114 |
.Pp |
115 |
Optionally, the name of the kernel symbol file and |
116 |
the name of the core dump file can be supplied on the |
117 |
command-line as positional arguments. |
118 |
If no kernel symbol file name has been given, the |
119 |
symbol file of the currently running kernel will be |
120 |
used. |
121 |
If no core dump file has been specified through either |
122 |
of the options or the last command-line argument, |
123 |
.Pa /dev/mem |
124 |
will be opened to allow debugging the currently running |
125 |
kernel. |
126 |
.Sh FILES |
127 |
.Bl -tag -width ".Pa /var/crash" |
128 |
.It Pa /dev/mem |
129 |
Default memory image to open if no core dump file |
130 |
has been specified. |
131 |
.It Pa /var/crash |
132 |
Default directory to locate kernel core dump files. |
133 |
.El |
134 |
.Sh SEE ALSO |
135 |
.Xr gdb 1 |
136 |
.Sh HISTORY |
137 |
The |
138 |
.Nm |
139 |
utility first appeared in its current form in |
140 |
.Fx 5.3 . |