brintos

brintos / llvm-project-archived public Read only

0
0
Text · 2.5 KiB · b926432 Raw
51 lines · plain
1# Test unwind info for functions which have been split into two or more parts.2# In particular, check we return the correct set of unwind plans when querying3# addresses which are in the middle of discontinuous functions.4 5# REQUIRES: lld, target-x86_646 7# RUN: llvm-mc -triple=x86_64-pc-linux -filetype=obj \8# RUN:   %S/Inputs/basic-block-sections-with-dwarf.s > %t.o9# RUN: ld.lld %t.o -o %t10## NB: This minidump exists only as a receptacle for the object file built11## above. This is a workaround for the fact that "image show-unwind" does not12## work without a Process object.13# RUN: yaml2obj %S/Inputs/linux-x86_64.yaml > %t.core14# RUN: %lldb -c %t.core %t -o "image load --file %t --slide 0" -s %s -o exit | \15# RUN:   FileCheck --implicit-check-not="UNWIND PLANS" %s16 17image show-unwind --cached true -n foo18# CHECK: UNWIND PLANS for {{.*}}`foo19#20# CHECK:      eh_frame UnwindPlan:21# CHECK-NEXT: This UnwindPlan originally sourced from eh_frame CFI22# CHECK-NEXT: This UnwindPlan is sourced from the compiler: yes.23# CHECK-NEXT: This UnwindPlan is valid at all instruction locations: no.24# CHECK-NEXT: This UnwindPlan is for a trap handler function: no.25# CHECK-NEXT: Address range of this UnwindPlan: [{{.*}}.text + 6-11)[{{.*}}.text + 12-27)[{{.*}}.text + 43-57)[{{.*}}.text + 58-69)26# CHECK-NEXT: row[0]:  -37: CFA=rsp+32 => rbx=[CFA-16] rip=[CFA-8]27# CHECK-NEXT: row[1]:  -33: CFA=rsp +8 => rbx=[CFA-16] rip=[CFA-8]28# CHECK-NEXT: row[2]:  -31: CFA=rsp+32 => rbx=[CFA-16] rip=[CFA-8]29# CHECK-NEXT: row[3]:  -27: CFA=rsp+48 => rbx=[CFA-16] rip=[CFA-8]30# CHECK-NEXT: row[4]:  -18: CFA=rsp+32 => rbx=[CFA-16] rip=[CFA-8]31# CHECK-NEXT: row[5]:    0: CFA=rsp +8 => rip=[CFA-8]32# CHECK-NEXT: row[6]:    1: CFA=rsp+16 => rbx=[CFA-16] rip=[CFA-8]33# CHECK-NEXT: row[7]:   12: CFA=rsp+32 => rbx=[CFA-16] rip=[CFA-8]34# CHECK-NEXT: row[8]:   15: CFA=rsp+16 => rbx=[CFA-16] rip=[CFA-8]35# CHECK-NEXT: row[9]:   19: CFA=rsp+32 => rbx=[CFA-16] rip=[CFA-8]36# CHECK-EMPTY:37 38image show-unwind --cached true -n bar39# CHECK: UNWIND PLANS for {{.*}}`bar40 41# CHECK:      eh_frame UnwindPlan:42# CHECK-NEXT: This UnwindPlan originally sourced from eh_frame CFI43# CHECK-NEXT: This UnwindPlan is sourced from the compiler: yes.44# CHECK-NEXT: This UnwindPlan is valid at all instruction locations: no.45# CHECK-NEXT: This UnwindPlan is for a trap handler function: no.46# CHECK-NEXT: Address range of this UnwindPlan: [{{.*}}.text + 27-43)47# CHECK-NEXT: row[0]:    0: CFA=rsp +8 => rip=[CFA-8]48# CHECK-NEXT: row[1]:    4: CFA=rsp+96 => rip=[CFA-8]49# CHECK-NEXT: row[2]:   15: CFA=rsp +8 => rip=[CFA-8]50# CHECK-EMPTY:51