From owner-freebsd-hackers Thu Apr 8 19:59:16 1999 Delivered-To: freebsd-hackers@freebsd.org Received: from allegro.lemis.com (allegro.lemis.com [192.109.197.134]) by hub.freebsd.org (Postfix) with ESMTP id 6C87215A7F for ; Thu, 8 Apr 1999 19:59:04 -0700 (PDT) (envelope-from grog@freebie.lemis.com) Received: from freebie.lemis.com (freebie.lemis.com [192.109.197.137]) by allegro.lemis.com (8.9.1/8.9.0) with ESMTP id MAA23559; Fri, 9 Apr 1999 12:27:03 +0930 (CST) Received: (from grog@localhost) by freebie.lemis.com (8.9.3/8.9.0) id MAA24438; Fri, 9 Apr 1999 12:27:03 +0930 (CST) Message-ID: <19990409122703.J2142@lemis.com> Date: Fri, 9 Apr 1999 12:27:03 +0930 From: Greg Lehey To: "David E. Cross" , freebsd-hackers@FreeBSD.ORG Subject: Re: debugging a panic in a kld-ed kernel References: <199904090247.WAA05496@cs.rpi.edu> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 0.93.2i In-Reply-To: <199904090247.WAA05496@cs.rpi.edu>; from David E. Cross on Thu, Apr 08, 1999 at 10:47:24PM -0400 WWW-Home-Page: http://www.lemis.com/~grog Organization: LEMIS, PO Box 460, Echunga SA 5153, Australia Phone: +61-8-8388-8286 Fax: +61-8-8388-8725 Mobile: +61-41-739-7062 Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG 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