Re: Extracting symbol info out of processes at runtime

From: P. de Boer (pieter_at_thelostparadise.com)
Date: 04/29/04

  • Next message: Eric Jacobs: "Re: Extracting symbol info out of processes at runtime"
    To: John-Mark Gurney <gurney_j@efn.org>
    Date: Thu, 29 Apr 2004 19:32:13 +0200
    
    

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

  • Next message: Eric Jacobs: "Re: Extracting symbol info out of processes at runtime"

    Relevant Pages