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]

Re: Symbol table lookup at the run time


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


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