aboutsummaryrefslogtreecommitdiff
path: root/gnu/usr.bin/gdb/kgdb/kgdb.1
blob: 1b7ffba6a6876a5d2afb64ff31fbbe9c8ee8df4c (plain) (blame)
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
.\" Copyright (c) 2004 Marcel Moolenaar
.\" All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
.\" are met:
.\" 1. Redistributions of source code must retain the above copyright
.\"    notice, this list of conditions and the following disclaimer.
.\" 2. Redistributions in binary form must reproduce the above copyright
.\"    notice, this list of conditions and the following disclaimer in the
.\"    documentation and/or other materials provided with the distribution.
.\"
.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
.\" IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
.\" BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
.\" AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
.\" OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
.\" $FreeBSD$
.Dd August 1, 2004
.Os
.Dt KGDB 1
.Sh NAME
.Nm kgdb
.Nd "kernel debugger"
.Sh SYNOPSIS
.Nm
.Op Fl a
.Op Fl v
.Op Fl d Ar crashdir
.Op Fl c Ar core | Fl n Ar dumpnr | Fl r Ar device
.Op Ar kernel Op Ar core
.Sh DESCRIPTION
The
.Nm
utility is a debugger based on
.Xr gdb 1
that allows debugging of kernel core files.
.Pp
The options are as follows:
.Bl -tag -width ".Fl d Ar crashdir"
.It Fl a
Increase the annotation level.
An annotation level of 1 features the historical
.Fl fullname
option of
.Xr gdb 1 .
This is useful when running
.Nm
in Emacs.
.It Fl v
Increase verbosity.
.It Fl d Ar crashdir
Use
.Ar crashdir
instead of the default,
.Pa /var/crash
to locate kernel core dump files in.
The name
.Pa vmcore.
plus the dump number will be appended to determine
the actual dump file name.
.It Fl c Ar core
Explicitly use
.Ar core
as the core dump file.
.It Fl n Ar dumpnr
Use the kernel core dump file numbered
.Ar dumpnr
for debugging.
.It Fl r Ar device
Use
.Ar device
to connect
.Nm
to for a remote debugging session.
.El
.Pp
The
.Fl c , n ,
and
.Fl r
options are mutually exclusive.
.Pp
Optionally, the name of the kernel symbol file and
the name of the core dump file can be supplied on the
command-line as positional arguments.
If no kernel symbol file name has been given, the
symbol file of the currently running kernel will be
used.
If no core dump file has been specified through either
of the options or the last command-line argument,
.Pa /dev/mem
will be opened to allow debugging the currenlty running
kernel.
.Sh FILES
.Bl -tag -width ".Pa /var/crash"
.It Pa /dev/mem
Default memory image to open if no core dump file
has been specified.
.It Pa /var/crash
Default directory to locate kernel core dump files.
.El
.Sh SEE ALSO
.Xr gdb 1
.Sh HISTORY
The
.Nm
utility first appeared in its current form in
.Fx 5.3 .