summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lldb/lit/Unwind/Inputs/call-asm.c3
-rw-r--r--lldb/lit/Unwind/Inputs/eh-frame-dwarf-unwind.s18
-rw-r--r--lldb/lit/Unwind/eh-frame-dwarf-unwind.test6
3 files changed, 10 insertions, 17 deletions
diff --git a/lldb/lit/Unwind/Inputs/call-asm.c b/lldb/lit/Unwind/Inputs/call-asm.c
new file mode 100644
index 00000000000..b154c1ac138
--- /dev/null
+++ b/lldb/lit/Unwind/Inputs/call-asm.c
@@ -0,0 +1,3 @@
+int asm_main() asm("asm_main");
+
+int main() { return asm_main(); }
diff --git a/lldb/lit/Unwind/Inputs/eh-frame-dwarf-unwind.s b/lldb/lit/Unwind/Inputs/eh-frame-dwarf-unwind.s
index 99193d63a96..d83551483dd 100644
--- a/lldb/lit/Unwind/Inputs/eh-frame-dwarf-unwind.s
+++ b/lldb/lit/Unwind/Inputs/eh-frame-dwarf-unwind.s
@@ -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
diff --git a/lldb/lit/Unwind/eh-frame-dwarf-unwind.test b/lldb/lit/Unwind/eh-frame-dwarf-unwind.test
index 552949a0ad3..0efc0a9ddb7 100644
--- a/lldb/lit/Unwind/eh-frame-dwarf-unwind.test
+++ b/lldb/lit/Unwind/eh-frame-dwarf-unwind.test
@@ -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:
OpenPOWER on IntegriCloud