Subject: programatic kernel debug?
To: None <current-users@NetBSD.ORG>
From: Bill Studenmund <skippy@macro.stanford.edu>
List: current-users
Date: 10/14/1997 10:46:05
Howdy!

I am battling two independant bugs (one of which keeps me from getting the
other), and am wondering if the debugger can help.

Nasty bug #2 is from a recent SUP (saturday). I've got an i386 running
binaries from June or July. I'm trying to compile a new kernel. I have
config'd the kernel, and though I never did a make clean, all the files
have been re-built at one point or another since the sup.

The problem is it dies booting, somewhere in the isa config, before any
attached ISA device gets printed out. I found that the isa code is getting
into isasearch (the BROKEN_INDIRECT_CONFIG one) a number of times, and
then just sticking there. 

This routine calls a function from a passed pointer. I want to be able to
ask the debugger to resolve the address into a procedure name before
jumping. I'd rather not just put in a Debugger() statement as I don't want
to have to type something each time; I just want to know where it's going.

The primary bug, which might now be gone (I SUP'd in the middle of
debugging), involved reference counts on kernel memory structures. It
would have been nice to have the count decrimentor be able to fire off a
stack trace each time it's called. Basically the equivelant of a
Debugger() call, and the human typing t <enter> c <enter>. Could I have
done that automatically?

Suggestions appreciated!

Take care,

Bill