"Kenneth D. Merry" wrote:

> It looks like the mbuf pointer is bogus:
> 
> (kgdb) print m
> $2 = (struct mbuf *) 0xf0006b00
> (kgdb) print *m
> Cannot access memory at address 0xf0006b00.
> 
> Although in the next frame up the stack, the mbuf pointer looks okay:
> 
> (kgdb) up
> #1  0xc018ef76 in fxp_intr (xsc=0xc1372800) at ../../dev/fxp/if_fxp.c:993
> (kgdb) print txp->mb_head

This is a well known problem, and a real gotcha.  kgdb does not know how
and when variables are stored in registers.  It *always* reads the stack
values, not the registers.  You can disassemble the code and find out what
register is currently holding 'm' and either look at the current registers
or the trap frame if there is one.

I suspect we are missing some magic in our kernel interface code for gdb
and it is not running in 'gcc generated .stabs' mode.  On the other hand,
you might try using dwarf2 debugging, that is pretty complete.

Cheers,
-Peter
--
Peter Wemm - [EMAIL PROTECTED]; [EMAIL PROTECTED]; [EMAIL PROTECTED]
"All of this is for nothing if we don't go to the stars" - JMS/B5


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message

Reply via email to