From owner-cvs-all Tue Dec 22 21:33:47 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id VAA29372 for cvs-all-outgoing; Tue, 22 Dec 1998 21:33:47 -0800 (PST) (envelope-from owner-cvs-all@FreeBSD.ORG) Received: from spinner.netplex.com.au (spinner.netplex.com.au [202.12.86.3]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id VAA29364; Tue, 22 Dec 1998 21:33:43 -0800 (PST) (envelope-from peter@netplex.com.au) Received: from spinner.netplex.com.au (localhost [127.0.0.1]) by spinner.netplex.com.au (8.9.1/8.9.1/Netplex) with ESMTP id NAA39231; Wed, 23 Dec 1998 13:32:54 +0800 (WST) (envelope-from peter@spinner.netplex.com.au) Message-Id: <199812230532.NAA39231@spinner.netplex.com.au> X-Mailer: exmh version 2.0.2 2/24/98 To: Greg Lehey cc: Bruce Evans , jonny@jonny.eng.br, cvs-all@FreeBSD.ORG, cvs-committers@FreeBSD.ORG Subject: Re: Use of LKMs (was: cvs commit: src/share/mk bsd.kern.mk src/sys/alpha/conf Makefile.alpha) In-reply-to: Your message of "Sun, 20 Dec 1998 10:17:13 +1030." <19981220101713.O24125@freebie.lemis.com> Date: Wed, 23 Dec 1998 13:32:50 +0800 From: Peter Wemm Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk Greg Lehey wrote: > On Saturday, 19 December 1998 at 23:27:39 +1100, Bruce Evans wrote: > >> #define quoting(Bruce Evans) > >> // src/lkm -> src/sys/lkm (like src/sys/modules) > >> > >> Is there a reason to keep the lkm's, now that kld's are working ? > >> (Aren't they ?) > > > > They might still be being used. > > [Somehow I missed the original of this] > > What's the current situation for kld debugging? I'm using Vinum as an > lkm because I can debug it that way. It works just fine, with one exception.. With LKM's you use a fixed offset to skip the header - 0x20 from memory. With KLD's you have to get that from the header: # objdump --headers /modules/vinum.ko | more Idx Name Size VMA LMA File off Algn [..] 6 .text 0000915c 000051e4 000051e4 000051e4 2**2 CONTENTS, ALLOC, LOAD, READONLY, CODE In this case, it would be 0x51e4 as the symbol offset rather than 0x20. Scriptifying that could be fun though.. :-/ Cheers, -Peter To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message