From owner-freebsd-hackers Tue Nov 9 13:46: 6 1999 Delivered-To: freebsd-hackers@freebsd.org Received: from yana.lemis.com (yana.lemis.com [192.109.197.140]) by hub.freebsd.org (Postfix) with ESMTP id B050414A1B for ; Tue, 9 Nov 1999 13:45:52 -0800 (PST) (envelope-from grog@mojave.sitaranetworks.com) Received: from mojave.sitaranetworks.com ([199.103.141.157]) by yana.lemis.com (8.8.8/8.8.8) with ESMTP id IAA11672; Wed, 10 Nov 1999 08:15:44 +1030 (CST) (envelope-from grog@mojave.sitaranetworks.com) Message-ID: <19991109164507.31840@mojave.sitaranetworks.com> Date: Tue, 9 Nov 1999 16:45:07 -0500 From: Greg Lehey To: Archie Cobbs , Zhihui Zhang Cc: freebsd-hackers@FreeBSD.ORG Subject: Re: How to use gdb to catch a panic Reply-To: Greg Lehey References: <199911092136.NAA35735@bubba.whistle.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii In-Reply-To: <199911092136.NAA35735@bubba.whistle.com>; from Archie Cobbs on Tue, Nov 09, 1999 at 01:36:56PM -0800 Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG 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