Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 01 May 2001 14:16:33 -0700
From:      Peter Wemm <peter@wemm.org>
To:        "Kenneth D. Merry" <ken@kdm.org>
Cc:        current@FreeBSD.ORG, jlemon@FreeBSD.ORG
Subject:   Re: panic in fxp driver 
Message-ID:  <20010501211633.2369E380C@overcee.netplex.com.au>
In-Reply-To: <20010501145752.B56581@panzer.kdm.org> 

next in thread | previous in thread | raw e-mail | index | archive | help
"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 - peter@FreeBSD.org; peter@yahoo-inc.com; peter@netplex.com.au
"All of this is for nothing if we don't go to the stars" - JMS/B5


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-current" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20010501211633.2369E380C>