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]

Re: Call Stack (Reflection)


Hi Frank,

The glibc-2.1 source code has stack traceback functions built-in.  You
could use that code -- it is actually quite simple.

These will give you the addresses, and you can use one of the dl
functions (dladdr?) to give you the names.

For demangling you can use the bfd library, or (in a pinch) a pipe to
c++filt.

Peeter
--
Peeter Joot                                          peeterj@ca.ibm.com


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