remote gdb (serial) for kernel..

gnn at freebsd.org gnn at freebsd.org
Sun Mar 11 06:53:27 UTC 2007


At Tue, 06 Mar 2007 16:55:46 -0800,
julian wrote:
> 
> Anyone been doing this recently?
> 

Yes, on VMWare and Parallels only at the moment.

> should I use gdb or kgdb?

kgdb

> neither seems to work right..
> if you have had success in doing this recently, could you let me know
> what your settings have been?

In my kernel config file:

options         KDB                     # Enable kernel debugger support.
options         DDB                     # Support DDB.   
options         GDB                     # Support remote GDB.

In /boot/loader.conf:

hint.sio.1.flags=0x90
boot_gdb=1

This is on CURRENT.

devbox ? sudo kgdb -r /dev/cuad1 kernel
[GDB will not be able to debug user-mode threads: /usr/lib/libthread_db.so: Undefined symbol "ps_pglobal_lookup"]
GNU gdb 6.1.1 [FreeBSD]
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "i386-marcel-freebsd".
Switching to remote protocol

Not perfect all the time but "works for me."

Best,
George


More information about the freebsd-current mailing list