Date: Wed, 14 Oct 1998 11:25:57 +0930 From: Greg Lehey <grog@lemis.com> To: John Polstra <jdp@polstra.com>, peter@netplex.com.au Cc: current@FreeBSD.ORG Subject: Re: Make elf release Message-ID: <19981014112557.B21983@freebie.lemis.com> In-Reply-To: <199810140056.RAA20027@austin.polstra.com>; from John Polstra on Tue, Oct 13, 1998 at 05:56:09PM -0700 References: <199810132359.HAA02821@spinner.netplex.com.au> <199810140056.RAA20027@austin.polstra.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Tuesday, 13 October 1998 at 17:56:09 -0700, John Polstra wrote: > In article <199810132359.HAA02821@spinner.netplex.com.au>, > Peter Wemm <peter@netplex.com.au> 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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?19981014112557.B21983>