On Wed, Oct 12, 2005 at 03:58:02PM -0400, Andrew Gallatin wrote:
> 
> Frank Hofmann - Solaris Sustaining writes:
>  > 
>  > In kernel debugging, you usually pull an address out of thin air.
> 
> 
> In (gdb/dbx) I typically pull an address off the stack in the form of
> local variables or function arguments.  In gdb parlance, a typical
> debugging session for me will be something like:
> 
> backtrace
> frame 4
> print *local_variable
> print *function_arg0
> <...>

The problem is that in kernel debugging, you don't have all of the debugging
information a typical user-land program compiled with '-g' has;  we only
have the type definitions (and C function argument/return types).  There
isn't enough information available for the debugger to figure it all out a
priori.

If kmem debugging is on (kmem_flags is 0xf), you have a stack trace from
every allocation, which makes figuring out the type fairly easy, given
the source code.  Without kmem debugging, ::typegraph does a very good job.

Cheers,
- jonathan

-- 
Jonathan Adams, Solaris Kernel Development

Reply via email to