Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 9 Apr 1999 12:27:03 +0930
From:      Greg Lehey <grog@lemis.com>
To:        "David E. Cross" <crossd@cs.rpi.edu>, freebsd-hackers@FreeBSD.ORG
Subject:   Re: debugging a panic in a kld-ed kernel
Message-ID:  <19990409122703.J2142@lemis.com>
In-Reply-To: <199904090247.WAA05496@cs.rpi.edu>; from David E. Cross on Thu, Apr 08, 1999 at 10:47:24PM -0400
References:  <199904090247.WAA05496@cs.rpi.edu>

next in thread | previous in thread | raw e-mail | index | archive | help
On Thursday,  8 April 1999 at 22:47:24 -0400, David E. Cross wrote:
> Somoone posted awhile back about how to get the kgdb to show symbols,
> debug information from a crash dump.  Could someone repost that, or
> point me to it, I cannot seem to find it.

I've posted a number of messages.  If you're tracking -CURRENT, take a
look at the .gdbinit* files in /usr/src/sys/modules/vinum.  The
Vinum-specific stuff won't help you much, but in .gdbinit.vinum.paths
there's this example:

define asf
   set $file = files.tqh_first
   set $found = 0
   while ($found == 0)
	p *$file
     if (*$file->filename == 'v')
	set $found = 1
     else
       set $file = $file->link.tqe_next
     end
   end
   shell /usr/bin/objdump --section-headers /modules/vinum/vinum.ko | grep ' .text' | awk '{print "add-symbol-file /modules/vinum/vinum.ko \$file->address+0x" $4}' > .asf
   source .asf
end

This kludge walks down the list of klds until it finds one with the
correct initial letter 'v' (see what I mean about kludge?) and creates
a file which it then sources in the last two lines.  With a little
modification it should work for any one kld.  Possibly you could fix
it to DTRT and make a command file for all klds.

Greg
--
See complete headers for address, home page and phone numbers
finger grog@lemis.com for PGP public key


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?19990409122703.J2142>