Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 9 Nov 1999 16:45:07 -0500
From:      Greg Lehey <grog@mojave.sitaranetworks.com>
To:        Archie Cobbs <archie@whistle.com>, Zhihui Zhang <zzhang@cs.binghamton.edu>
Cc:        freebsd-hackers@FreeBSD.ORG
Subject:   Re: How to use gdb to catch a panic
Message-ID:  <19991109164507.31840@mojave.sitaranetworks.com>
In-Reply-To: <199911092136.NAA35735@bubba.whistle.com>; from Archie Cobbs on Tue, Nov 09, 1999 at 01:36:56PM -0800
References:  <Pine.GSO.3.96.991109093952.10214A-100000@sol.cs.binghamton.edu> <199911092136.NAA35735@bubba.whistle.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Tuesday,  9 November 1999 at 13:36:56 -0800, Archie Cobbs wrote:
> Zhihui Zhang writes:
>> Thanks for your reply.  What confuses me is that when I use commands "gdb"
>> (enter remote protocol mode) and "step" on the target machine, the
>> debugging machine takes control (it executes "target remote /dev/cuaa1").
>> In this case, how can I run anything on the target machine to trigger a
>> panic?
>
> I'm not sure if this answers your question, but the command
>
> 	sysctl -w debug.cebugger=1
>
> will cause the kernel to stop and return your gdb prompt.
> Then you could call the function panic() directly if you wanted.

Take a look at /usr/src/sys/modules/vinum/.gdbinit.kernel.  There's
some almost undocumented stuff in there, including a macro called
ddb.  Call it from gdb and it'll switch back to ddb.

Greg
--
Finger grog@lemis.com for PGP public key
See complete headers for address and phone numbers


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?19991109164507.31840>