Re: Setting up a running FreeBSD/PCBSD system to enter kgdb on panic

From: Julian Elischer <julian_at_freebsd.org>
Date: Mon, 04 Apr 2011 17:26:15 -0700
On 4/4/11 4:35 PM, David Somayajulu wrote:
> Hi All,
> Is there some way I can setup a running FreeBSD - (I use PCBSD7.2) - to break into kgdb when the system panics. I am trying to get a stack trace when "Fatal trap 12: page fault while in kernel mode" happens.
> thanks
> david S.

sure but firstly have you already got everything set up so you can get 
into kgdb normally?
(serial cable? (or firewire?) ports all set up right? second machine?

here are som bits of the puzzle for my machine:

from /boot/device.hints:

hint.uart.1.at="isa"
hint.uart.1.port="0x2F8"
hint.uart.1.flags="0x80"
hint.uart.1.irq="3"
hint.uart.1.baud="115200"

in /etc/sysctl.conf:

debug.kdb.current=gdb

but usually I find it better to go to ddb first and do a ps and 
backtrace as
ps is a pain on gdb and needs  macros etc.


and of course kgdb needs to be set up correctly

the handbook says a lot about that.




> ________________________________
> This message and any attached documents contain information from QLogic Corporation or its wholly-owned subsidiaries that may be confidential. If you are not the intended recipient, you may not read, copy, distribute, or use this information. If you have received this transmission in error, please notify the sender immediately by reply e-mail and then delete this message.
> _______________________________________________
> freebsd-current_at_freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-current
> To unsubscribe, send any mail to "freebsd-current-unsubscribe_at_freebsd.org"
>
>
Received on Mon Apr 04 2011 - 22:25:48 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:40:13 UTC