backtrace semantics
Carlos O'Donell
carlos@systemhalted.org
Sat Jan 19 13:20:00 GMT 2013
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.
Cheers,
Carlos.
More information about the Libc-alpha
mailing list