| Commit | Line | Data |
|---|---|---|
| 8b6a428f SS |
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 | .\" | |
| f17ea84b SS |
25 | .\" $FreeBSD: src/gnu/usr.bin/gdb/kgdb/kgdb.1,v 1.10 2006/10/21 17:39:35 ru Exp $ |
| 26 | .\" | |
| 4c0200b9 | 27 | .Dd May 15, 2012 |
| 8b6a428f SS |
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 | |
| 4c0200b9 | 37 | .Op Fl t | Fl tui-mode |
| 8b6a428f | 38 | .Op Fl v |
| f17ea84b | 39 | .Op Fl w |
| 8b6a428f SS |
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 q | |
| 67 | Suppress printing of the banner when the debugger starts. | |
| 68 | The | |
| 69 | .Fl quiet | |
| 70 | form is supported for compatibility as well. | |
| 4c0200b9 JM |
71 | .It Fl t |
| 72 | Activate the Text User Interface (TUI). The | |
| 73 | .Fl tui-mode | |
| 74 | shows the source file, assembly output, program registers and | |
| 75 | gdb commands in separate text windows. It implicitly sets the | |
| 76 | .Fl quiet | |
| 77 | option as well. | |
| 8b6a428f SS |
78 | .It Fl v |
| 79 | Increase verbosity. | |
| f17ea84b SS |
80 | .It Fl w |
| 81 | Opens kmem-based targets in read-write mode. | |
| 8b6a428f SS |
82 | .It Fl d Ar crashdir |
| 83 | Use | |
| 84 | .Ar crashdir | |
| 85 | instead of the default, | |
| 86 | .Pa /var/crash | |
| 87 | to locate kernel core dump files in. | |
| 88 | The name | |
| 89 | .Pa vmcore. | |
| 90 | plus the dump number will be appended to determine | |
| 91 | the actual dump file name. | |
| 92 | .It Fl c Ar core | |
| 93 | Explicitly use | |
| 94 | .Ar core | |
| 95 | as the core dump file. | |
| 96 | .It Fl n Ar dumpnr | |
| 97 | Use the kernel core dump file numbered | |
| 98 | .Ar dumpnr | |
| 99 | for debugging. | |
| 100 | .It Fl r Ar device | |
| 101 | Use | |
| 102 | .Ar device | |
| 103 | to connect | |
| 104 | .Nm | |
| 105 | to for a remote debugging session. | |
| 106 | .El | |
| 107 | .Pp | |
| 108 | The | |
| 109 | .Fl c , n , | |
| 110 | and | |
| 111 | .Fl r | |
| 112 | options are mutually exclusive. | |
| 113 | .Pp | |
| 114 | Optionally, the name of the kernel symbol file and | |
| 115 | the name of the core dump file can be supplied on the | |
| 116 | command-line as positional arguments. | |
| 117 | If no kernel symbol file name has been given, the | |
| 118 | symbol file of the currently running kernel will be | |
| 119 | used. | |
| 120 | If no core dump file has been specified through either | |
| 121 | of the options or the last command-line argument, | |
| 122 | .Pa /dev/mem | |
| 123 | will be opened to allow debugging the currently running | |
| 124 | kernel. | |
| 125 | .Sh FILES | |
| 126 | .Bl -tag -width ".Pa /var/crash" | |
| 127 | .It Pa /dev/mem | |
| 128 | Default memory image to open if no core dump file | |
| 129 | has been specified. | |
| 130 | .It Pa /var/crash | |
| 131 | Default directory to locate kernel core dump files. | |
| 132 | .El | |
| 133 | .Sh SEE ALSO | |
| 134 | .Xr gdb 1 | |
| 135 | .Sh HISTORY | |
| 136 | The | |
| 137 | .Nm | |
| 138 | utility first appeared in its current form in | |
| 139 | .Fx 5.3 | |
| 140 | and was later ported to | |
| 9feb902c | 141 | .Dx 1.5 . |