mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Amit S. Kale" <amitkale@emsyssoft.com>
To: KGDB bugreports <kgdb-bugreport@lists.sourceforge.net>,
	Linux Kernel <linux-kernel@vger.kernel.org>
Cc: Tom Rini <trini@kernel.crashing.org>, Pavel Machek <pavel@ucw.cz>,
	George Anzinger <george@mvista.com>
Subject: Added KGDB documentation
Date: Thu, 4 Mar 2004 14:56:43 +0530	[thread overview]
Message-ID: <200403041456.43267.amitkale@emsyssoft.com> (raw)

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.


                 reply	other threads:[~2004-03-04  9:26 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200403041456.43267.amitkale@emsyssoft.com \
    --to=amitkale@emsyssoft.com \
    --cc=george@mvista.com \
    --cc=kgdb-bugreport@lists.sourceforge.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pavel@ucw.cz \
    --cc=trini@kernel.crashing.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®