Re: KGDB connection failure - Please help, I'm desparate! (= or desperate)

2009-02-21 Thread Peter Craft

First off - Make that desperate.  Sorry.

Second, an update..

I've modified remote.c in gdb to print the data coming across the
serial line.  When I boot with -d and enter gdb followed by s, absolutely
nothing comes across the serial line - readchar times out every time.

If I then reboot without -d (with the same modified gdb running) and set 
console=comconsole
I see all of the expected console characters read by readchar.

So it appears that the gdb stub on the target isn't outputing any data to
the serial line whatsoever.  Again, I have KDB, DDB, and GDB set in the
configuration file and the sio flags set to 0x90 (I've tried 0xc0 as well)
in the loader.conf file.  Furthermore, when I boot with -d I see the
message:
GDB: Current port: sio

Can anyone think of a reason why the target isn't outputting debug packets to
the serial port?  Can anyone suggest a method to debug a debugger?

Thanks


  - Original Message - 
  From: Peter Craft 
  To: freebsd-questions@freebsd.org 
  Sent: Friday, February 20, 2009 3:28 PM
  Subject: KGDB connection failure - Please help, I'm desparate!



  I've been trying for three days to get KGDB to work.

  I've followed the instructions here:
  
http://www.freebsd.org/doc/en_US.ISO8859-1/books/developers-handbook/kerneldebug-online-gdb.html

  and here:
  http://www.lemis.com/grog/Papers/Debug-tutorial/tutorial.pdf

  without success.  Specifically, I've rebuilt my kernel with:
  makeoptions DEBUG=-g# Build kernel with gdb(1) debug 
symbols
  ..
  options KDB
  options DDB
  options GDB

  My boot.config file contains -P and my /boot/loader.conf file contains:
  hint.sio.0.flags=0x90

  When I issue the boot -d on the target, the system breaks in to the db 
prompt
  as expected, at which point I enter gdb followed by s.  All of which 
seems to
  work perfectly.

  On the debugger side I enter kgdb with kgdb -r /dev/cuad0 -v kernel.debug
  from the build directory and I get:

  Ignoring packet error, continuing...
  Ignoring packet error, continuing...
  Ignoring packet error, continuing...
  Couldn't establish connection to remote target
  Malformed response to offset query, timeout

  If I boot the remote system with set console=comconsole, I'm able to 
communicate
  across the serial line as a console, so I believe that the serial ports and 
cable are
  functioning properly.  I just can't get gdb to connect.

  Can anyone offer any suggestion on what to try next?  Or tips on how to go
  about debugging the problem?  This is with FreeBSD 7.1.

  Thanks in advance,

  Pete
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


KGDB connection failure - Please help, I'm desparate!

2009-02-20 Thread Peter Craft

I've been trying for three days to get KGDB to work.

I've followed the instructions here:
http://www.freebsd.org/doc/en_US.ISO8859-1/books/developers-handbook/kerneldebug-online-gdb.html

and here:
http://www.lemis.com/grog/Papers/Debug-tutorial/tutorial.pdf

without success.  Specifically, I've rebuilt my kernel with:
makeoptions DEBUG=-g# Build kernel with gdb(1) debug symbols
..
options KDB
options DDB
options GDB

My boot.config file contains -P and my /boot/loader.conf file contains:
hint.sio.0.flags=0x90

When I issue the boot -d on the target, the system breaks in to the db 
prompt
as expected, at which point I enter gdb followed by s.  All of which seems 
to
work perfectly.

On the debugger side I enter kgdb with  kgdb -r /dev/cuad0 -v kernel.debug
from the build directory and I get:

Ignoring packet error, continuing...
Ignoring packet error, continuing...
Ignoring packet error, continuing...
Couldn't establish connection to remote target
Malformed response to offset query, timeout

If I boot the remote system with set console=comconsole, I'm able to 
communicate
across the serial line as a console, so I believe that the serial ports and 
cable are
functioning properly.  I just can't get gdb to connect.

Can anyone offer any suggestion on what to try next?  Or tips on how to go
about debugging the problem?  This is with FreeBSD 7.1.

Thanks in advance,

Pete
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org