Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 8 Oct 2002 02:41:45 +0300
From:      Giorgos Keramidas <keramida@freebsd.org>
To:        Ian Dowse <iedowse@maths.tcd.ie>
Cc:        hackers@freebsd.org
Subject:   Re: gdb support for kernel modules
Message-ID:  <20021007234145.GC1408@hades.hell.gr>
In-Reply-To: <200210071709.aa25499@salmon.maths.tcd.ie>
References:  <200210071709.aa25499@salmon.maths.tcd.ie>

next in thread | previous in thread | raw e-mail | index | archive | help
On 2002-10-07 17:09, Ian Dowse <iedowse@maths.tcd.ie> 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/<module>,

> 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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20021007234145.GC1408>