From owner-freebsd-current Tue Oct 13 18:56:20 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id SAA15123 for freebsd-current-outgoing; Tue, 13 Oct 1998 18:56:20 -0700 (PDT) (envelope-from owner-freebsd-current@FreeBSD.ORG) Received: from allegro.lemis.com (allegro.lemis.com [192.109.197.134]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id SAA15112 for ; Tue, 13 Oct 1998 18:56:16 -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 LAA25960; Wed, 14 Oct 1998 11:25:59 +0930 (CST) Received: (from grog@localhost) by freebie.lemis.com (8.9.1/8.9.0) id LAA28303; Wed, 14 Oct 1998 11:25:58 +0930 (CST) Message-ID: <19981014112557.B21983@freebie.lemis.com> Date: Wed, 14 Oct 1998 11:25:57 +0930 From: Greg Lehey To: John Polstra , peter@netplex.com.au Cc: current@FreeBSD.ORG Subject: Re: Make elf release References: <199810132359.HAA02821@spinner.netplex.com.au> <199810140056.RAA20027@austin.polstra.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 0.91.1i In-Reply-To: <199810140056.RAA20027@austin.polstra.com>; from John Polstra on Tue, Oct 13, 1998 at 05:56:09PM -0700 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-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Tuesday, 13 October 1998 at 17:56:09 -0700, John Polstra wrote: > In article <199810132359.HAA02821@spinner.netplex.com.au>, > Peter Wemm wrote: > >> It's GDB that is the problem - it can't see KLD modules. Mind you, it >> can't see LKM's either. > > Just to clarify -- GDB can see them if you tell it where they are. > For example, if I wanted to debug the star saver, I'd first run > modstat to find out where it's loaded: > > Type Id Off Loadaddr Size Info Rev Module Name > MISC 0 0 f2fe0000 0008 f2fe1000 1 star_saver_mod > > Then in GDB, I'd say: > > add-symbol-file /lkm/star_saver_mod.o 0xf2fe0020 > > Note, I had to add 0x20 to the load address to account for the size > of the a.out header. OK, you've shown yours, I'll show mine. Here's a gdb macro/function/whatever that accesses this same information internally: def tr if (lkmods[0].area != 0) printf " asf 0x%x\n", lkmods[0].area add-symbol-file /T/vinum/cybernet/vinum_mod.o lkmods[0].area + 0x20 end 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-current" in the body of the message