Date: Thu, 29 Apr 2004 19:32:13 +0200 From: "P. de Boer" <pieter@thelostparadise.com> To: John-Mark Gurney <gurney_j@efn.org> Cc: freebsd-hackers@freebsd.org Subject: Re: Extracting symbol info out of processes at runtime Message-ID: <1083259932.640.20.camel@edinburgh.thedarkside.tix> In-Reply-To: <20040429165916.GL567@funkthat.com> References: <1083167960.653.23.camel@edinburgh.thedarkside.tix> <20040429165916.GL567@funkthat.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, 2004-04-29 at 18:59, John-Mark Gurney wrote: > > For a little private project I'm working at, I need to find the address > > of a function which is inside a shared library of a running process, OR > > the base address the library is running at (in that case, I can simply > > do a base_address+known_offset_of_function). The executable nor > > libraries have their symbols stripped. > > Well, if you don't mind not doing all the code, you could use gcore + gdb > to extract the function and library... It may not be the most elegant > solution, but it will work.. I'm afraid I really need to do all the code, since I want to use it for a program which needs to set breakpoints at the functions I'm trying to get the addresses for. I looked at the gdb sources to see if I could get a sense of how gdb extracts the data, but couldn't get the hang of it. Another option would be to use /proc, but that's evil.. -- Pieter
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1083259932.640.20.camel>