From owner-freebsd-hackers Sun Dec 5 10:24:18 1999 Delivered-To: freebsd-hackers@freebsd.org Received: from mojave.sitaranetworks.com (mojave.sitaranetworks.com [199.103.141.157]) by hub.freebsd.org (Postfix) with ESMTP id BC15815411 for ; Sun, 5 Dec 1999 10:24:15 -0800 (PST) (envelope-from grog@mojave.sitaranetworks.com) Message-ID: <19991205120810.21867@mojave.sitaranetworks.com> Date: Sun, 5 Dec 1999 12:08:10 -0500 From: Greg Lehey To: David Gilbert , freebsd-hackers@FreeBSD.ORG Subject: Re: Inverting a gdb -k mapping? Reply-To: Greg Lehey References: <14407.14812.812358.220983@trooper.velocet.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii In-Reply-To: <14407.14812.812358.220983@trooper.velocet.net>; from David Gilbert on Thu, Dec 02, 1999 at 10:32:44PM -0500 Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Thursday, 2 December 1999 at 22:32:44 -0500, David Gilbert wrote: > I can grep through the vmcore.x file and find the offset of the string > I put on the stack by > > strings -t x > ... but how do I associate that back with an address inside gdb -k? With utmost difficult. > My problem is that vinum (or something related to it) is trashing > the stack and trying to return to 0x0 is panic'ing the kernel (of > course). > > ... now... bt in gdb -k on this shows the series of trap calls and > ends with frame 5 as: > > #5 0x0 in ?? () I think I probably should take a look at this. I don't know what I'll find, but there are a number of possibilities. I don't think that mapping the physical memory image to the virtual memory address is one of them. What might help is searching the area round frame 5 for a likely looking ebp value which would point further back down the stack. You can also help it, of course, by setting a static variable, say "dgilbert_last_stack" to the ebp value every time you enter a function. You don't need any other information; the backtrace will take you straight back. Use the 'btr' command (in /usr/src/sys/modules/vinum/.gdbinit.kernel). You'll get faster response from me if you copy me on messages like this; I read them eventually (usually), but I read messages sent directly to me sooner. Greg -- Finger grog@lemis.com for PGP public key See complete headers for address and phone numbers To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message