This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Symbol table lookup at the run time


Hello!

I'm trying to debug some software using the -finstrument-functions option
in gcc.  I'm using gcc-2.96 as shipped with RedHat 7.2 but I'm ready to
upgrade if needed.

I want __cyg_profile_func_enter to print function names, not their
addresses.  I cannot find out how to access the symbol table from the
running program to look up the function names by their addresses.  The
symbol table should be somewhere in the executable, since the debugger
uses it.

I would prefer to avoid reopening the executable using libbfd or
generating another symbol table by hand and linking it into the
executable.

I'm just trying to use gcc facilities for debugging, and I'll rather use
something else (i.e. inserting function calls by a sed script) if those
facilities are inconvenient to use.

-- 
Regards,
Pavel Roskin


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]