From owner-freebsd-current Tue May 1 14:16:35 2001 Delivered-To: freebsd-current@freebsd.org Received: from peter3.wemm.org (c1315225-a.plstn1.sfba.home.com [65.0.135.147]) by hub.freebsd.org (Postfix) with ESMTP id 5608837B422; Tue, 1 May 2001 14:16:33 -0700 (PDT) (envelope-from peter@wemm.org) Received: from overcee.netplex.com.au (overcee.wemm.org [10.0.0.3]) by peter3.wemm.org (8.11.0/8.11.0) with ESMTP id f41LGXM91453; Tue, 1 May 2001 14:16:33 -0700 (PDT) (envelope-from peter@wemm.org) Received: from wemm.org (localhost [127.0.0.1]) by overcee.netplex.com.au (Postfix) with ESMTP id 2369E380C; Tue, 1 May 2001 14:16:33 -0700 (PDT) (envelope-from peter@wemm.org) X-Mailer: exmh version 2.3.1 01/18/2001 with nmh-1.0.4 To: "Kenneth D. Merry" Cc: current@FreeBSD.ORG, jlemon@FreeBSD.ORG Subject: Re: panic in fxp driver In-Reply-To: <20010501145752.B56581@panzer.kdm.org> Content-Transfer-Encoding: 8bit Date: Tue, 01 May 2001 14:16:33 -0700 From: Peter Wemm Message-Id: <20010501211633.2369E380C@overcee.netplex.com.au> Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG "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