forked from OSchip/llvm-project
Make eh-frame-dwarf-unwind.test run on non-linux platforms
This was meant to be a part of r360158, but I forgot to squash the commits before pushing. llvm-svn: 360168
This commit is contained in:
parent
51497fb8b3
commit
fe71b92e0a
|
@ -0,0 +1,3 @@
|
||||||
|
int asm_main() asm("asm_main");
|
||||||
|
|
||||||
|
int main() { return asm_main(); }
|
|
@ -1,18 +1,13 @@
|
||||||
.text
|
.text
|
||||||
.globl bar
|
.globl bar
|
||||||
.type bar, @function
|
|
||||||
bar:
|
bar:
|
||||||
.LFB0:
|
|
||||||
.cfi_startproc
|
.cfi_startproc
|
||||||
leal (%edi, %edi), %eax
|
leal (%edi, %edi), %eax
|
||||||
ret
|
ret
|
||||||
.cfi_endproc
|
.cfi_endproc
|
||||||
.LFE0:
|
|
||||||
.size bar, .-bar
|
|
||||||
.globl foo
|
.globl foo
|
||||||
.type foo, @function
|
|
||||||
foo:
|
foo:
|
||||||
.LFB1:
|
|
||||||
.cfi_startproc
|
.cfi_startproc
|
||||||
.cfi_escape 0x16, 0x10, 0x06, 0x38, 0x1c, 0x06, 0x08, 0x47, 0x1c
|
.cfi_escape 0x16, 0x10, 0x06, 0x38, 0x1c, 0x06, 0x08, 0x47, 0x1c
|
||||||
call bar
|
call bar
|
||||||
|
@ -21,12 +16,9 @@ foo:
|
||||||
subq $0x47, %rdi
|
subq $0x47, %rdi
|
||||||
jmp *%rdi # Return
|
jmp *%rdi # Return
|
||||||
.cfi_endproc
|
.cfi_endproc
|
||||||
.LFE1:
|
|
||||||
.size foo, .-foo
|
.globl asm_main
|
||||||
.globl main
|
asm_main:
|
||||||
.type main, @function
|
|
||||||
main:
|
|
||||||
.LFB2:
|
|
||||||
.cfi_startproc
|
.cfi_startproc
|
||||||
pushq %rbp
|
pushq %rbp
|
||||||
.cfi_def_cfa_offset 16
|
.cfi_def_cfa_offset 16
|
||||||
|
@ -45,5 +37,3 @@ main:
|
||||||
.cfi_def_cfa 7, 8
|
.cfi_def_cfa 7, 8
|
||||||
ret
|
ret
|
||||||
.cfi_endproc
|
.cfi_endproc
|
||||||
.LFE2:
|
|
||||||
.size main, .-main
|
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
# Test handing of dwarf expressions specifying the location of registers, if
|
# Test handing of dwarf expressions specifying the location of registers, if
|
||||||
# those expressions refer to the frame's CFA value.
|
# those expressions refer to the frame's CFA value.
|
||||||
|
|
||||||
# REQUIRES: target-x86_64, system-linux, native
|
# REQUIRES: target-x86_64, native
|
||||||
|
|
||||||
# RUN: %clang %p/Inputs/eh-frame-dwarf-unwind.s -o %t
|
# RUN: %clang %p/Inputs/call-asm.c %p/Inputs/eh-frame-dwarf-unwind.s -o %t
|
||||||
# RUN: %lldb %t -s %s -o exit | FileCheck %s
|
# RUN: %lldb %t -s %s -o exit | FileCheck %s
|
||||||
|
|
||||||
breakpoint set -n bar
|
breakpoint set -n bar
|
||||||
|
@ -15,7 +15,7 @@ process launch
|
||||||
thread backtrace
|
thread backtrace
|
||||||
# CHECK: frame #0: {{.*}}`bar
|
# CHECK: frame #0: {{.*}}`bar
|
||||||
# CHECK: frame #1: {{.*}}`foo + 5
|
# CHECK: frame #1: {{.*}}`foo + 5
|
||||||
# CHECK: frame #2: {{.*}}`main + 19
|
# CHECK: frame #2: {{.*}}`asm_main + 22
|
||||||
|
|
||||||
target modules show-unwind -n foo
|
target modules show-unwind -n foo
|
||||||
# CHECK: eh_frame UnwindPlan:
|
# CHECK: eh_frame UnwindPlan:
|
||||||
|
|
Loading…
Reference in New Issue