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 _______________________________________________ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to "[EMAIL PROTECTED]"