Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 9 Nov 1999 09:49:43 -0500 (EST)
From:      Zhihui Zhang <zzhang@cs.binghamton.edu>
To:        Greg Lehey <grog@lemis.com>
Cc:        freebsd-hackers@FreeBSD.ORG
Subject:   Re: How to use gdb to catch a panic
Message-ID:  <Pine.GSO.3.96.991109093952.10214A-100000@sol.cs.binghamton.edu>
In-Reply-To: <19991109103938.63558@mojave.sitaranetworks.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, 9 Nov 1999, Greg Lehey wrote:

> On Tuesday,  9 November 1999 at  8:52:58 -0500, Zhihui Zhang wrote:
> >
> > I have set up an environment of remote serial debugging on FreeBSD
> > 3.3-Release.  I have a program that whenever it runs the kernel panics.
> > Is there any way I can use remote serial debugging to trace this panic
> > process instead of examining a dead kernel (i.e., coredump)?
> 
> Yes.
> 
> > Or, is there any way I can use to drop the debugged kernel to debugger
> > mode whenever it runs a certain piece of code?
> 
> Yes.  That's what breakpoints are for.  If you set a breakpoint on
> panic, you'll go into the debugger.  But you don't need that, since
> you go into the debugger on panic anyway.
> 
> If you're expecting a breakpoint or panic, and you want to do it in
> gdb as opposed to ddb, set gdb mode ahead of time.  This is also
> useful for debugging ddb :-)
> 

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? 

How to set gdb mode ahead of time?

-Zhihui




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?Pine.GSO.3.96.991109093952.10214A-100000>