Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 20 Apr 2000 10:28:31 -0400 (EDT)
From:      Zhihui Zhang <zzhang@cs.binghamton.edu>
To:        "NandaKumar P.K." <p_k_nandan@yahoo.com>
Cc:        freebsd-hackers@FreeBSD.ORG
Subject:   Re: Remote kernel debugging
Message-ID:  <Pine.SOL.4.21.0004201020150.771-100000@sol.cs.binghamton.edu>
In-Reply-To: <20000420084459.11675.qmail@web1901.mail.yahoo.com>

next in thread | previous in thread | raw e-mail | index | archive | help

I have looked over your steps.  It seems that the steps are all correct. I
can suggest four things:

(1) Consider using "makeoptions    DEBUG=-g" in your configure file.
(2) If you are using FreeBSD 3.3-Release, the flag may be 0x50 instead of
0x80.
(3) Lower the baud rate if possible.  However, the default 9600 should be
OK.
(4) Type step in the target machine before running gdb at the debugging
machine.

Good Luck,

-Zhihui

On Thu, 20 Apr 2000, NandaKumar P.K. wrote:

> Hi,
> 
> We were trying to debug the SCSI CAM driver using
> remote gdb, but we were not able to establish the
> connection between the target machine and host
> machine.
> 
> The host and the target machine were connected using a
> null modem cable which was tested using Pcplus utility
> in DOS. In both the machines the cable is connected to
> the COM1 port.
> 
> The steps which we followed were as follows.
> In the host machine
> 1. Made a copy of the GENERIC kernel called MYKERNEL.
> 2. The follwing additions were made to MYKERNEL
>   options DDB
>   device sio0 at isa? port "IO_COM1" flags 0x080
> 3. Compiled using config -g and installed MYKERNEL .
> 4. Made a copy of the kernel , kernel.debug
> 5. Copied the kernel.debug to the target machine.
> 
> In the target machine
> 1. Strip -x kernel.debug & then reboot.
> 2. At the boot prompt ,loaded kernel.debug
> 3. Opened the debugger using boot -d
> 
> In the host machine
> 1. cd /usr/src/sys/compile/MYKERNEL
> 2. gdb -k kernel
> 3. (kgdb) target remote /dev/cuaa0
> 
> In the target
> 1.db>gdb
> 2. s
> 
> Now the following error message was displayed in the
> host
>  Ignoring packet error,continuing..
>  Ignoring packet error,continuing..
>  Ignoring packet error,continuing..
>  Could'nt establish connection to remote target
>  Malformed response to offset query,timeout
> 
> Using the same cable i was able to set the serial
> console on the machine and were able to find the
> printf messages coming on the other machine. I also
> found some characters sent by the host machine when
> the target
> remote /dev/cuaa0 command is given. I had the terminal
> emulation package pcplus on the other machine. But i
> couldn't find any character sent by the target machine
> when 's' is pressed there. So i have a doubt regarding
> my target machine's setting is not O.K. But i am not
> able to find the problem there. Any help will be
> deeply appreciated.
> 



To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.SOL.4.21.0004201020150.771-100000>