Re: Remote Debugging of Linux Kernel--Help

From: Amit S. Kale (
Date: Tue May 09 2000 - 05:39:23 EST


The patch at SGI's site is buggy.

I have started a kgdb project at
This page is still under development. But you can pick up a correct patch
from there.

> From: "Sivakumar Kuppusamy" <>
> Date: Tue, 09 May 2000 13:24:09 +0530
> Subject: Remote Debugging of Linux Kernel--Help
> Hi All,
> I am facing a problem in remote debugging of Linux Hernel.
> Let me explain the problem in detail.
> I have made some changes in the Linux Kernel's Tcpip Source
> code.(2.2.12-20 RedHat 6.1)
> I recompiled the Kernel and i had some problems.
> So I want to debug the Kernel from a remote Machine.
> For that I downloaded a patch from ( kgdb2.2.12-20)
> I applied the patch by using the command-- patch -p0 <
> /tmp/kgdb2.2.12-20
> After applying the patch I enabled the remote Debug option in xconfig by
> doing
> make xconfig.
> Next I did "make dep".
> Everything worked fine.
> For creating a kernel Image I did "make bzImage"
> A new Image was also created successfully.
> This I did in a development m/c.
> I copied the bzImage into a Target M/c to test it.
> I added the following lines in the lilo.conf of the target M/c
> image/usr/src/linux/arch/i386/boot/bzImage
> labelkdebug
> read-only
> root/dev/hda5
> append"gdb gdbttyS/dev/ttyS0 gdbbaud8400
> This new Image was added by issuing the command lilo.
> This is on the Target M/c
> On the Development M/c as per the instructions in the's help
> I created a file called .gdbinit in /usr/src/linux-2.2.12-20 directory.
> This contains the file vmlinux.
> Contents of .gdbinit
> set remotebreak 1
> target remote /dev/ttyS0
> After this on the command line I set the Baudrate to 38400 by
> setserial /dev/ttyS0 baud_base 38400
> I have also checked the serial connection by cu command .
> It works fine ie I am able to send and receive data via /dev/ttyS0
> between the Development and target m/cs.
> Target M/c is booted with the new Image.
> It says after some time "Waitng for connection from Remote gdb"
> On the Development M/c in /usr/src/linux-2.2.12-20 directory I issued
> the command:
> gdb vmlinux
> It does nothing.Both are waiting for a long time.
> I can't trace where the problem is.
> Is that gdb on the development m/c is not sending proper data to the
> Target m/c
> Or is there any problem on the target M/c.
> I am trying this for a long time.
> Can anybody Help me in solving this problem.
> Thankx in advance.
> - --
> Cheers
> Siva

Amit Kale
Veritas Software ( )

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to Please read the FAQ at

This archive was generated by hypermail 2b29 : Mon May 15 2000 - 21:00:13 EST