Re: Unwinding through exception handlers when PC is NULL.

2011-05-07 Thread Andrew Haley
On 06/05/11 02:24, David Daney wrote: > This happens because the libgcc unwinder cannot find unwinding > information for the PC at the point of the SIGSEGV. > > However, we know that usually when we end up with a PC of zero, it is > because we called through a NULL function pointer. In this ca

Re: Unwinding through exception handlers when PC is NULL.

2011-05-06 Thread Ian Lance Taylor
Richard Guenther writes: > What happens if the indirect call is optimized to a jump via tailcall > optimization? We'd bogously skip one function then, no? But that always happens with backtraces through tailcalls. It's nothing new. Ian

Re: Unwinding through exception handlers when PC is NULL.

2011-05-06 Thread Richard Guenther
On Fri, May 6, 2011 at 3:24 AM, David Daney wrote: > Consider this program under GNU/Linux (x86_64): > > - np.c --- > #include > #include > #include > #include > > static void handler(int sig) > { >  printf("got signal %d\n", sig); >  throw 1; > } > > int (*my_vecto