This is the mail archive of the libc-alpha@sources.redhat.com 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() on ix86?


On Mon, Jul 19, 2004 at 01:40:17PM +0200, Thorsten Kukuk wrote:
> 
> Hi,
> 
> It seems, that the backtrace() function on ix86 always misses the
> last function. A sample test case is included. bar() is never printed
> on ix86:

backtrace() on x86 ATM uses the chain of saved %ebp values
instead of dwarf2 unwind info (-fasynchronous-unwind-tables is not the
default on x86, unlike e.g. x86-64).
As such it has no knowledge about signal frames etc.
See http://sources.redhat.com/ml/libc-hacker/2003-12/msg00054.html
for i386 implementation of backtrace(3) using both .eh_frame
(as long as it is available) and with fallback to %ebp chains.
Your testcase would need to be compiled with -fasynchronous-unwind-tables
to work though.

	Jakub


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