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:
Pavel Labath 2019-05-07 16:13:05 +00:00
parent 51497fb8b3
commit fe71b92e0a
3 changed files with 10 additions and 17 deletions

View File

@ -0,0 +1,3 @@
int asm_main() asm("asm_main");
int main() { return asm_main(); }

View File

@ -1,18 +1,13 @@
.text
.globl bar
.type bar, @function
bar:
.LFB0:
.cfi_startproc
leal (%edi, %edi), %eax
ret
.cfi_endproc
.LFE0:
.size bar, .-bar
.globl foo
.type foo, @function
foo:
.LFB1:
.cfi_startproc
.cfi_escape 0x16, 0x10, 0x06, 0x38, 0x1c, 0x06, 0x08, 0x47, 0x1c
call bar
@ -21,12 +16,9 @@ foo:
subq $0x47, %rdi
jmp *%rdi # Return
.cfi_endproc
.LFE1:
.size foo, .-foo
.globl main
.type main, @function
main:
.LFB2:
.globl asm_main
asm_main:
.cfi_startproc
pushq %rbp
.cfi_def_cfa_offset 16
@ -45,5 +37,3 @@ main:
.cfi_def_cfa 7, 8
ret
.cfi_endproc
.LFE2:
.size main, .-main

View File

@ -1,9 +1,9 @@
# Test handing of dwarf expressions specifying the location of registers, if
# 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
breakpoint set -n bar
@ -15,7 +15,7 @@ process launch
thread backtrace
# CHECK: frame #0: {{.*}}`bar
# CHECK: frame #1: {{.*}}`foo + 5
# CHECK: frame #2: {{.*}}`main + 19
# CHECK: frame #2: {{.*}}`asm_main + 22
target modules show-unwind -n foo
# CHECK: eh_frame UnwindPlan: