lkml.org 
[lkml]   [2004]   [Mar]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectAdded KGDB documentation
Date
Hi,

I have added some documentation to core-lite.patch. It's as follows.
Comments/feedback?
Thanks.
--
Amit Kale
EmSysSoft (http://www.emsyssoft.com)
KGDB: Linux Kernel Source Level Debugger (http://kgdb.sourceforge.net)

Documentation/kgdb.txt
==================
KGDB Linux kernel source level debugger

Amit S. Kale <amitkale@emsyssoft.com>
Last updated March 2004.

Introduction:
kgdb is a source level debugger for linux kernel. It is used along with gdb to
debug a linux kernel. Kernel developers can debug a kernel similar to
application programs with use of kgdb. It makes it possible to place
breakpoints in kernel code, step through the code and observe variables.

Two machines are required for using kgdb. One of these machines is a
development machine and the other is a test machine. The machines are
connected through a serial line, a null-modem cable which connects their
serial ports. The kernel to be debugged runs on the test machine. gdb runs on
the development machine. The serial line is used by gdb to communicate to the
kernel being debugged.

This version of kgdb is a lite version. It is available on i386 platform uses
a serial line for communicating to gdb. Full kgdb containing more features and
support more architecture is available along with plenty of documentation at
http://kgdb.sourceforge.net/

Compiling a kernel:
Enable Kernel hacking -> Kernel Debugging -> KGDB: kernel debugging with
remote gdb

Only generic serial port (8250) is supported in the lite version. Configure
8250 options.

Booting the kernel:
Kernel command line option "kgdbwait" makes kgdb wait for gdb connection
during booting of a kernel. If you have configured simple serial port, the
port number and speed can be overriden on command line by using option
"kgdb8250=portnumber,speed", where port numbers are 0-3 for COM1 to COM4
respectively and supported speeds are 9600, 19200, 38400, 57600, 115200.
Example: kgdbwait kgdb8250=0,115200

Connecting gdb:
If you have used "kgdbwait", kgdb prints a message "Waiting for connection
from remote gdb..." on the console and waits for connection from gdb. At this
point you connect gdb to kgdb.
Example:
% gdb ./vmlinux
(gdb) set remotebaud 115200
(gdb) target remote /dev/ttyS0

Once connected, you can debug a kernel the way you would debug an application
program.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 14:01    [W:0.030 / U:0.968 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site