This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc 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: [x86-64] An unreliable backtrace().


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


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