Subject: Re: Getting into the debugger
To: None <tech-kern@netbsd.org>
From: Dr. Bill Studenmund <wrstuden@loki.stanford.edu>
List: tech-kern
Date: 01/15/1999 17:07:43
On Fri, 15 Jan 1999, Dr. Bill Studenmund wrote:

> I'm starting to try to debug the fs locking problems. One of the things
> I'd love to have is a stack trace in a static string (so I can have a
> stack trace both of the code which ran into a lock & panic'd and also the
> code which generated the lock).

[snip]

> Now all I need is a way to get into the debugger to start the stack trace.
> Does anyone know how to do this? Basically I need to be able to latch onto
> the current stack frame so trace can go look at it, and to set up whatever
> else db_trace_cmd will want.
> 
> Is there a db expert around?

Doh! Valentin pointed out I want a ddb expert.

What I want to do is make a routine which I can call which will make a
stack trace, and stuff it in a buffer, and then let the kernel keep going.

If I hit a break point (or call Debugger, etc), I can run the 't' command.
But I'm looking for a non-interactive trace.

I have most of the pieces, just not the clue on how to get into the
debugger via a subroutine call. At present, it looks like it expects to be
entered via a trap. I don't want to have to add another kernel trap for
this functionality. :-(

Take care,

Bill