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: backtrace semantics


From: Carlos O'Donell <carlos@systemhalted.org>
Date: Sat, 19 Jan 2013 08:19:49 -0500

> On 01/18/2013 05:14 PM, David Miller wrote:
>> 
>> First, thanks for adding all the new backtrace() test cases.
>> 
>> There seems to be an inconsistency about how to handle the top-most
>> frame in the backtrace.
>> 
>> x86 for example, includes the caller of backtrace(), and this matches
>> the expectation of the new testcases.
>> 
>> Whereas s390 and sparc, for example, elide the backtrace() caller's
>> frame from the backtrace, and starts reporting at the frame
>> immediately afterwards.
>> 
>> Which one is correct?
>  
> I'd say you should always list the caller of backtrace() in the frame.
> 
> In gdb when you issue `bt' you always get the caller in the backtrace.

Fair enough, I'll fix sparc to match.

I hope other port maintainers are paying attention :-)


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