libunwind-devel
[Top][All Lists]
Advanced

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

RE: [libunwind] libunwind issue on x86


From: Nemura Blake-BNEMURA1
Subject: RE: [libunwind] libunwind issue on x86
Date: Thu, 1 Sep 2005 11:29:11 -0500

I tried a function call sequence main()->funca()->funcb()->funcc()->funcd()->funce(). The last function funce() causes exception and causes the exception handler to run which does the unwind. The problem here is the last function funce()'s frame is missing. Here after funcd() there is the frame for __libc_sigaction().
 
#03 [0x009daec0] __libc_sigaction() +0x110 in /lib/tls/libc.so.6 (+27ec0)
#04 [0x08049195] funcd(int) +0x11 in ./Exception.out (+1195)
#05 [0x080491a9] funcc(int) +0x11 in ./Exception.out (+11a9)
#06 [0x080491bd] funcb(int) +0x11 in ./Exception.out (+11bd)
#07 [0x080491d1] funca(int) +0x11 in ./Exception.out (+11d1)
#08 [0x080491fb] main() +0x27 in ./Exception.out (+11fb) 
 
It looks like __libc_sigaction (signal frame?) is replacing the actual user context that caused the exception signal. That happens on powerpc too.
Might be able to workaround by using EIP from uc_mcontext instead of unw_get_regs() when unw_is_signal_frame() is true. That's basically what we do on powerpc with backtrace(). Although then you can't use unw_get_proc_name() :(
 
Still, would be nice if there were some way to have the signal frame /not/ replace the user context.
Any ideas on options for that? Not sure if its a libc or kernel thing.
 
-Blake
 

reply via email to

[Prev in Thread] Current Thread [Next in Thread]