kgdb
[Top] [All Lists]

Re: remote-debugging help

To: "Vinodkumar Parasmal" <vinodkumar.paras@xxxxxxxxx>
Subject: Re: remote-debugging help
From: sfoehner@xxxxxxxxxxxxxxxxxxx (Scott Foehner)
Date: Tue, 9 May 2000 13:55:46 -0700 (PDT)
Cc: kgdb@xxxxxxxxxxx
In-reply-to: "Vinodkumar Parasmal" <vinodkumar.paras@wipro.com> "remote-debugging help" (May 9, 2:19pm)
References: <3917D118.B775152C@wipro.com>
Sender: owner-kgdb@xxxxxxxxxxx
Vinod,

I can take a guess at what's going on.  Your .gdbinit file should
actually define a command to connect to the target machine.
Something like:

define rmt
set remotebaud 38400
target remote /dev/ttyd2
end

Once the kernel is up on the target machine, and it says that it is
waiting for a connection from gdb, type "rmt" at the gdb command
line.  This should connect to the target machine.  gdb and the
target kernel will then essentially be at a breakpoint.  Just type
"continue" at the gdb prompt, and the machine should continue booting.
You can also set breakpoints before continuing if you like.

Scott

On May 9,  2:19pm, Vinodkumar Parasmal wrote:
> Subject: remote-debugging help
> Hi ,
> I am facing a problem in remote debugging of Linux Kernel.(RH 6.1
> 2.2.12.-20)
> 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 the patch from oss.sgi.com ( 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".
> For creating a kernel Image I did "make bzImage"
> 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
>     label=kdebug
>     read-only
>     root=/dev/hda5
>     append="gdb gdbttyS=/dev/ttyS0 gdbbaud=38400
>
> 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 oss.sgi.com's help
>
> I created a file called .gdbinit in /usr/src/linux-2.2.12-20 directory
> where vmlinux.resides
>
> 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 u give me info about how to solve this problem.
>
> Thankx in advance.
> --
> Cheers
> Vinod
>
>
>
>-- End of excerpt from Vinodkumar Parasmal



-- 
Scott Foehner                   SGI
sfoehner@xxxxxxxxxxxx           Computer Systems Business Unit
650-933-3473                    Core OS

<Prev in Thread] Current Thread [Next in Thread>
  • Re: remote-debugging help, Scott Foehner <=