Symbol table lookup at the run time
Zack Weinberg
zack@codesourcery.com
Tue Jan 8 16:49:00 GMT 2002
On Tue, Jan 08, 2002 at 06:28:07PM -0500, Pavel Roskin wrote:
>
> 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.
Debugging information is not loaded into memory at runtime. The
debugger does exactly what you say you don't want to do: open up the
executable using libbfd.
Your best bet is to use addr2line.
zw
More information about the Gcc
mailing list