This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [x86-64] An unreliable backtrace().
- From: Jakub Jelinek <jakub at redhat dot com>
- To: Pawel Sikora <pluto at agmk dot net>
- Cc: libc-alpha at sourceware dot org
- Date: Mon, 7 Aug 2006 12:16:16 +0200
- Subject: Re: [x86-64] An unreliable backtrace().
- References: <200608061935.43346.pluto@agmk.net>
- Reply-to: Jakub Jelinek <jakub at redhat dot com>
On Sun, Aug 06, 2006 at 07:35:43PM +0200, Pawe?? Sikora wrote:
> In glibc-2.4 the x86-64/ia64 backtrace_helper() uses _Unwind_GetIP() to fill
> the backtrace array. In fact _Unwind_GetIP retrieves the return address which
> isn't a caller address. A backtrace is a summary of how your program got where
> it is. Currently glibc-2.4 and gdb-6.5 (at least for x86-64) produces
> an unwind path instead of true backtrace.
>
> We can see that libc and gdb print bogus backtrace :(
Why do you call it bogus? That's what backtrace(3) has been doing on all
architectures forever and is the intended output.
>
> Yup, It looks better now.
For what definition of better? All you did was make an incompatible change
that programs that use backtrace(3) might be confused about.
Jakub