KGDB(1)

NAME
kgdb - kernel debugging wrapper for gdb

SYNOPSIS
kgdb [-m modpath ] [-v vmlinux ] [-t trapfile ] [-p pid ]

DESCRIPTION
Kgdb uses the remote debugging interface of gdb to allow limited symbolic debugging of a running kernel. Gdb behaves as if it is passing commands to a remote machine, while in fact, these commands are being executed in the current kernel context.

Kernel data structures can be read and modified using ordinary gdb commands for manipulating program variables. Kernel functions can be invoked with the call command, and can be used in expressions. The debugger state can also be initialized from a kernel trap report, or set to the current state of any process currently running in kernel mode.

NEW GDB COMMANDS

set-task
    Load the debugger state with the current state of a process specified by the $pid debugger variable.

OPTIONS

-m modpath
    Specifies a directory to be searched for kernel modules, instead of /lib/modules/`uname -r`.

-v vmlinux
    Specifies the location of the uncompressed kernel image, instead of /usr/src/linux/vmlinux.

-t trapfile
    Specifies that the debugger state should be initialized with the contents of a kernel trap report in the specified file. Kgdb will search the specified file for the first recognizable trap report, ignoring leading and trailing garbage, so /usr/adm/messages can be specified as the trap file.

-p pid
    Specifies that the debugger state should be initialized to the current state of a process.

FILES
/lib/modules/`uname -r`
    Default search path for kernel modules.
/usr/src/linux/vmlinux
    Default location of uncompressed kernel image.

AUTHOR
David Hinds - dhinds@allegro.stanford.edu

SEE ALSO
gdb(1).