Date: Mon, 30 Aug 1999 12:03:36 -0700 (PDT) From: Julian Elischer <julian@whistle.com> To: Zhihui Zhang <zzhang@cs.binghamton.edu> Cc: freebsd-hackers@FreeBSD.ORG Subject: Re: Help with remote debugging (gdb -k) Message-ID: <Pine.BSF.3.95.990830115433.339B-100000@current1.whistle.com> In-Reply-To: <Pine.GSO.3.96.990830142223.10304D-100000@sol.cs.binghamton.edu>
next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, 30 Aug 1999, Zhihui Zhang wrote:
>
> After reading the handbook and some postings in the mailing list archive.
> I still can not make remote debugging work. I basically did the following
> on FreeBSD-current 4.0 (A is debugging machine, B is the target):
>
> (1) Build a debug kernel (options DDB and BREAK_TO_DEBUGGER) on box A.
> The sio flag I used is 0x90 (I also tried 0x80). Ftp the file /kernel to
> box B and renamed as /kernel.A
this is correct
>
> (2) Boot the kernel /kernel.A on box B with -d option:
Be warned that BDE reported that -d is partly broken in -current.
(stack trace will fail)
>
> >>FreeBSD/i386 boot
> Default: 0:wd(0,a)/boot/loader
> boot: /kernel.A -d
> Debugger("Boot flags requested debugger")
> Stopped at 0xc0252c27: movl $0, 0xc031ed98
> db> gdb
> Next trap will enter GDB remote protocol mode
> db> s
>
> (3) On machine A, go to the compile directory:
>
> #gdb -g kernel.debug
-g?
I have a .gdbinti file in that dirtectory
Here are the contents...
file kernel.debug
set remotebaud 9600
target remote /dev/cuaa0
>
> (kgdb) target remote /dev/cuaa0
>
> Remote debugging using /dev/cuaa0
> Ignoring packet error, continuing...
> Ignoring packet error, continuing...
> Couldn't establish connection to remote target
> Malformed response to offset query, timeout
>
> The serial cable is null-modem and has been tested with kermit. It is
> connected to /dev/ttyd0 (com 1) of machine B and com 2 of machine A.
>
> I did not do "strip -x" because I assume this is done by FreeBSD 4.0
> automatically and the file debug.kernel is the one with symbols.
yes
>
> Any help is appreciated.
I think you are right...
>
> --------------------------------------------------
> Zhihui Zhang. Please visit http://www.freebsd.org
> --------------------------------------------------
>
>
>
>
> To Unsubscribe: send mail to majordomo@FreeBSD.org
> with "unsubscribe freebsd-hackers" in the body of the message
>
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.BSF.3.95.990830115433.339B-100000>
