From owner-freebsd-hackers Mon Oct 7 16:43:48 2002 Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 624F437B401 for ; Mon, 7 Oct 2002 16:43:47 -0700 (PDT) Received: from nic.upatras.gr (nic.upatras.gr [150.140.129.30]) by mx1.FreeBSD.org (Postfix) with SMTP id EB1E443E77 for ; Mon, 7 Oct 2002 16:43:45 -0700 (PDT) (envelope-from keramida@freebsd.org) Received: (qmail 16486 invoked from network); 7 Oct 2002 23:36:28 -0000 Received: from upnet-dialinpool-10.upatras.gr (HELO hades.hell.gr) (@150.140.128.244) by nic.upatras.gr with SMTP; 7 Oct 2002 23:36:28 -0000 Received: from hades.hell.gr (hades [127.0.0.1]) by hades.hell.gr (8.12.6/8.12.6) with ESMTP id g97Nga2I001591; Tue, 8 Oct 2002 02:42:37 +0300 (EEST) (envelope-from keramida@freebsd.org) Received: (from keramida@localhost) by hades.hell.gr (8.12.6/8.12.6/Submit) id g97NfkZY001581; Tue, 8 Oct 2002 02:41:46 +0300 (EEST) (envelope-from keramida@freebsd.org) Date: Tue, 8 Oct 2002 02:41:45 +0300 From: Giorgos Keramidas To: Ian Dowse Cc: hackers@freebsd.org Subject: Re: gdb support for kernel modules Message-ID: <20021007234145.GC1408@hades.hell.gr> References: <200210071709.aa25499@salmon.maths.tcd.ie> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200210071709.aa25499@salmon.maths.tcd.ie> X-PGP-Fingerprint: C1EB 0653 DB8B A557 3829 00F9 D60F 941A 3186 03B6 Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On 2002-10-07 17:09, Ian Dowse wrote: > > This is something I have been meaning to investigate for a while: [...] > Anyway, below is a proof-of-concept patch that does the basics, but > among other things, its logic for locating the kernel module files > needs a lot of work - currently it just assumes /boot/kernel/, > diff -N solib-fbsd-kld.c > --- /dev/null 1 Jan 1970 00:00:00 -0000 > +++ solib-fbsd-kld.c 7 Oct 2002 10:39:48 -0000 > + snprintf (new->so_name, SO_NAME_MAX_PATH_SIZE, "/boot/kernel/%s", > + new->so_original_name); I'm not really sure this would work for remote gdb sessions, but locally it's probably more correct to use sysctl and grab the value of kern.module_path or kern.bootfile instead of hardwiring `/boot/kernel/%s'. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message