This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Symbol table lookup at the run time
- From: Pavel Roskin <proski at gnu dot org>
- To: gcc at gcc dot gnu dot org
- Date: Tue, 8 Jan 2002 18:28:07 -0500 (EST)
- Subject: 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