NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: toolchain/46490: libexecinfo only wokrs on amd64



The following reply was made to PR toolchain/46490; it has been noted by GNATS.

From: Martin Husemann <martin%duskware.de@localhost>
To: gnats-bugs%NetBSD.org@localhost
Cc: 
Subject: Re: toolchain/46490: libexecinfo only wokrs on amd64
Date: Tue, 29 May 2012 10:11:03 +0200

 Setting USE_UNWIND=no does not help. The struct frameinfo chain is
 one call deep:
 
 Breakpoint 2, backtrace (trace=0xc, len=1086333120) at builtin.c:56
 56      {
 (gdb) n
 58              void *stack = &stack;
 (gdb) 
 56      {
 (gdb) 
 60              for (size_t i = 0; i < len; i++) {
 (gdb) 
 57              const struct frameinfo *frame = __builtin_frame_address(0);
 (gdb) 
 61                      if ((const void *)frame BELOW stack)
 (gdb) print stack
 $5 = (void *) 0xffffffffffffb488
 (gdb) print frame
 $6 = (const struct frameinfo *) 0xffffffffffffb490
 (gdb) print *frame
 $7 = {next = 0xffffffffffffb550, return_address = 0x0}
 (gdb) print *frame->next
 $8 = {next = 0x0, return_address = 0x0}
 
 Info gcc says:
 
      On some machines it may be impossible to determine the frame
      address of any function other than the current one; in such cases,
      or when the top of the stack has been reached, this function will
      return `0' if the first frame pointer is properly initialized by
      the startup code.
 
 So this does not seem like the way forward either, though it probably will
 help i386.
 
 
 Martin
 


Home | Main Index | Thread Index | Old Index