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

Ravitheja Addepally via lldb-commits lldb-commits at lists.llvm.org
Wed Dec 2 00:51:51 PST 2015


ravitheja added a comment.

The reason assembly unwind did not work is because if the ebp register is set to 0 at that time, so the CFA is not available. In the case of clang the frame pointer is not set by any function, which is why the formula does not work.

(lldb) image show-unwind -n __kernel_vsyscall
UNWIND PLANS for [vdso]`__kernel_vsyscall (start addr 0xf7fd9d70)

Asynchronous (not restricted to call-sites) UnwindPlan is 'assembly insn profiling'
Synchronous (restricted to call-sites) UnwindPlan is 'eh_frame CFI'

Assembly language inspection UnwindPlan:
This UnwindPlan originally sourced from assembly insn profiling
This UnwindPlan is sourced from the compiler: no.
This UnwindPlan is valid at all instruction locations: yes.
Address range of this UnwindPlan: [[vdso]..text + 1600-0x00000654)
row[0]:    0: CFA=esp +4 => esp=CFA+0 eip=[CFA-4] 
row[1]:    1: CFA=esp +8 => esp=CFA+0 eip=[CFA-4] 
row[2]:    2: CFA=esp+12 => esp=CFA+0 eip=[CFA-4] 
row[3]:    3: CFA=esp+16 => ebp=[CFA-16] esp=CFA+0 eip=[CFA-4] 
row[4]:    5: CFA=ebp+16 => ebp=[CFA-16] esp=CFA+0 eip=[CFA-4] 
row[5]:   17: CFA=esp+12 => esp=CFA+0 eip=[CFA-4] 
row[6]:   18: CFA=esp +8 => esp=CFA+0 eip=[CFA-4] 
row[7]:   19: CFA=esp +4 => esp=CFA+0 eip=[CFA-4]

eh_frame UnwindPlan:
This UnwindPlan originally sourced from eh_frame CFI
This UnwindPlan is sourced from the compiler: yes.
This UnwindPlan is valid at all instruction locations: no.
Address range of this UnwindPlan: [[vdso]..text + 1600-0x00000654)
row[0]:    0: CFA=esp +4 => eip=[CFA-4] 
row[1]:    1: CFA=esp +8 => eip=[CFA-4] 
row[2]:    2: CFA=esp+12 => eip=[CFA-4] 
row[3]:    3: CFA=esp+16 => ebp=[CFA-16] eip=[CFA-4] 
row[4]:   17: CFA=esp+12 => ebp=[CFA-16] eip=[CFA-4] 
row[5]:   18: CFA=esp +8 => ebp=[CFA-16] eip=[CFA-4] 
row[6]:   19: CFA=esp +4 => ebp=[CFA-16] eip=[CFA-4]

Arch default UnwindPlan:
This UnwindPlan originally sourced from i386 default unwind plan
This UnwindPlan is sourced from the compiler: no.
This UnwindPlan is valid at all instruction locations: no.
row[0]:    0: CFA=ebp +8 => esp=CFA+0 ebp=[CFA-8] eip=[CFA-4]

Arch default at entry point UnwindPlan:
This UnwindPlan originally sourced from i386 at-func-entry default
This UnwindPlan is sourced from the compiler: no.
This UnwindPlan is valid at all instruction locations: not specified.
row[0]:    0: CFA=esp +4 => esp=CFA+0 eip=[CFA-4]


http://reviews.llvm.org/D15046





More information about the lldb-commits mailing list