Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 5 Dec 1999 12:08:10 -0500
From:      Greg Lehey <grog@mojave.sitaranetworks.com>
To:        David Gilbert <dgilbert@velocet.ca>, freebsd-hackers@FreeBSD.ORG
Subject:   Re: Inverting a gdb -k mapping?
Message-ID:  <19991205120810.21867@mojave.sitaranetworks.com>
In-Reply-To: <14407.14812.812358.220983@trooper.velocet.net>; from David Gilbert on Thu, Dec 02, 1999 at 10:32:44PM -0500
References:  <14407.14812.812358.220983@trooper.velocet.net>

next in thread | previous in thread | raw e-mail | index | archive | help
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 <vmcore.9 | grep dgilbert_
>
> ... 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




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