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: Add tests that backtrace and backtrace_symbols produce correctresults


On Sun, 20 Jan 2013, Andreas Schwab wrote:

> Chris Metcalf <cmetcalf@tilera.com> writes:
> 
> > Presumably the PC is in the __read function, with the link register
> > holding the return address to the caller, and that should give the
> > stack frame walker the innermost frame.
> 
> But that frame is not linked, instead the called frame is pointing to
> caller's caller frame.

"not linked" merely implies something about appropriate implementation 
strategies for the backtrace function, not anything wrong with the 
testcase.

I think it's a useful feature for backtrace to support backtracing through 
system calls interrupted by signals, showing the function being executed 
at the time of the signal.  This works, at least, on x86 and x86_64 (and 
was previously tested to work for SH, ARM, MIPS as well).  If there are 
actual failures of this case on some architectures (and I don't think any 
such architectures have actually been identified in this discussion), that 
indicates a failure to achieve feature parity on those architectures, for 
which the most natural fix would be architecture-specific (such as adding 
missing unwind info for system calls, or changing something about the 
backtrace implementation).  Only with a clear reason why such feature 
parity between architectures is hard to achieve in a particular case 
should this test then be relaxed, or disabled for particular 
architectures.

-- 
Joseph S. Myers
joseph@codesourcery.com


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