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)


On Sun, Jan 17, 1999 at 08:12:22PM +0100, Andreas Jaeger wrote:
>
> Have a look at glibc 2.1 (a test release called glibc-2.0.110 is
> available from ftp://alpha.gnu.org/gnu).  It provides output of the
> backtrace for different architectures.  The implementation can be
> found in the debug and sysdeps subdirs (backtrace* functions).
>

 Thanks for the pointer. I have managed to extract the source and to
compile the backtrace code by using dladdr() instead of _dl_addr().
However, all I see in the backtrace is addresses which do not get
resolved into symbolic names.
 Further testing shows that dladdr() succeeds, but returns an empty
file name and the "nearest" symbol name `_start'. Do I have to use
special compile-time or link-time options? At the moment, I use -g
-fno-omit-frame-pointer.

	Frank


-- 
 + Frank Pilhofer                        fp@informatik.uni-frankfurt.de  +
 |                                      http://www.uni-frankfurt.de/~fp/ |
 +---- Life would be a very great deal less weird without you.  - DA ----+


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