[Lldb-commits] [PATCH] D15046: Fix for TestNoreturnUnwind.py on i386

Jason Molenda via lldb-commits lldb-commits at lists.llvm.org
Tue Dec 1 22:16:14 PST 2015


Hi Ravitheja, thanks for the logging output.  It does look like the assembly profiling is failing for some reason, and with your patch we fall back to using the eh_frame instructions and it succeeds.  I'll look at the patch closely tomorrow (I meant to do it tonight but I'm running out of time before I need to head home) - but I'm just curious what lldb will report for

(lldb) image show-unwind -n __kernel_vsyscall

when you have the process running.  Looking at the assembly instructions, it seems like the assembly language profile inspection should have done the right thing here.  The rule "CFA=ebp+16 => ebp=[CFA-16] esp=CFA+0 eip=[CFA-4]" looks right to me at this point in the function.

Thanks!

Jason


> On Dec 1, 2015, at 2:06 AM, Ravitheja Addepally <ravitheja.addepally at intel.com> wrote:
> 
> ravitheja added a comment.
> 
> 
> Here is the log without my patch -
> 
> 
> th1/fr0 with pc value of 0xf7fd9d80, symbol name is '__kernel_vsyscall'
> (i386) [vdso](0x00000000f7fd9000): Reading EH frame info
> th1/fr0 0x00000000f7fd9d75: CFA=ebp+16 => ebp=[CFA-16] esp=CFA+0 eip=[CFA-4]
> 
> th1/fr0 Got an invalid CFA register value - reg ebp (6), value 0x0
> th1/fr0 could not read CFA register for this frame.
> th1 Unwind of this thread is complete.
> Process 99000 stopped
> 
> 
> 
> After the patch ->
> 
> 
> th1/fr0 with pc value of 0xf7fd9d80, symbol name is '__kernel_vsyscall'
> (i386) [vdso](0x00000000f7fd9000): Reading EH frame info
> th1/fr0 0x00000000f7fd9d75: CFA=ebp+16 => ebp=[CFA-16] esp=CFA+0 eip=[CFA-4]
> 
> th1/fr0 Got an invalid CFA register value - reg ebp (6), value 0x0
> th1/fr0 supplying caller's saved eip (8)'s location using assembly insn profiling UnwindPlan
> th1/fr0 supplying caller's register eip (8) from the stack, saved at CFA plus offset -4 [saved at 0xfffffffffffffffb]
> th1/fr0 CFA is 0xffffd2d4: Register esp (7) contents are 0xffffd2c4, offset is 16
> th1/fr0 requested caller's saved PC but this UnwindPlan uses a RA reg; getting eip (8) instead
> th1/fr0 supplying caller's saved eip (8)'s location using eh_frame CFI UnwindPlan
> th1/fr0 supplying caller's register eip (8) from the stack, saved at CFA plus offset -4 [saved at 0xffffd2d0]
> th1/fr0 trying to unwind from this function with the UnwindPlan 'eh_frame CFI' because UnwindPlan 'assembly insn profiling' failed.
> th1/fr0 initialized frame current pc is 0xf7fd9d80 cfa is 0xffffd2d4 using eh_frame CFI UnwindPlan
> th1/fr0 supplying caller's saved eip (8)'s location, cached
> th1/fr1 pc = 0xf7e40607
> th1/fr0 supplying caller's saved ebp (6)'s location using eh_frame CFI UnwindPlan
> th1/fr0 supplying caller's register ebp (6) from the stack, saved at CFA plus offset -16 [saved at 0xffffd2c4]
> th1/fr1 fp = 0x0
> th1/fr0 supplying caller's stack pointer esp (7) value, computed from CFA
> th1/fr1 sp = 0xffffd2d4
> th1/fr1 with pc value of 0xf7e40607, symbol name is 'gsignal'





More information about the lldb-commits mailing list