mirror of
https://github.com/libunwind/libunwind.git
synced 2026-01-12 00:04:03 +08:00
tests: Add a DWARF specific backtrace test on ARM
This commit is contained in:
committed by
Stephen M. Webb
parent
26694a75e7
commit
d11545d79a
1
.gitignore
vendored
1
.gitignore
vendored
@@ -87,5 +87,6 @@ tests/x64-unwind-badjmp-signal-frame
|
||||
tests/[GL]arm64-test-sve-signal
|
||||
tests/aarch64-test-plt
|
||||
tests/aarch64-test-frame-record
|
||||
tests/[GL]arm-test-debug-frame-bt
|
||||
tests/*.log
|
||||
tests/*.trs
|
||||
|
||||
13
tests/Garm-test-debug-frame-bt.c
Normal file
13
tests/Garm-test-debug-frame-bt.c
Normal file
@@ -0,0 +1,13 @@
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
/*
|
||||
* Run the backtrace test using the ARM DWARF unwinder based on the
|
||||
* .debug_frame section.
|
||||
*/
|
||||
__attribute__((constructor))
|
||||
void set_dwarf(void) {
|
||||
setenv("UNW_ARM_UNWIND_METHOD", "1", 1);
|
||||
}
|
||||
|
||||
#include "Gtest-bt.c"
|
||||
5
tests/Larm-test-debug-frame-bt.c
Normal file
5
tests/Larm-test-debug-frame-bt.c
Normal file
@@ -0,0 +1,5 @@
|
||||
#define UNW_LOCAL_ONLY
|
||||
#include <libunwind.h>
|
||||
#if !defined(UNW_REMOTE_ONLY)
|
||||
#include "Garm-test-debug-frame-bt.c"
|
||||
#endif
|
||||
@@ -86,6 +86,10 @@ endif #ARCH X86_64
|
||||
endif #!ARCH_PPC64
|
||||
endif #!ARCH_IA64
|
||||
|
||||
if ARCH_ARM
|
||||
check_PROGRAMS_arch += Garm-test-debug-frame-bt Larm-test-debug-frame-bt
|
||||
endif
|
||||
|
||||
if ARCH_AARCH64
|
||||
check_PROGRAMS_arch += Garm64-test-sve-signal Larm64-test-sve-signal \
|
||||
aarch64-test-plt aarch64-test-frame-record
|
||||
@@ -249,6 +253,9 @@ Gx64_test_dwarf_expressions_SOURCES = Gx64-test-dwarf-expressions.c \
|
||||
Lx64_test_dwarf_expressions_SOURCES = Lx64-test-dwarf-expressions.c \
|
||||
x64-test-dwarf-expressions.S
|
||||
|
||||
Garm_test_debug_frame_bt_SOURCES = Garm-test-debug-frame-bt.c ident.c
|
||||
Larm_test_debug_frame_bt_SOURCES = Larm-test-debug-frame-bt.c ident.c
|
||||
|
||||
Garm64_test_sve_signal_SOURCES = Garm64-test-sve-signal.c
|
||||
Larm64_test_sve_signal_SOURCES = Larm64-test-sve-signal.c
|
||||
aarch64_test_plt_SOURCES = aarch64-test-plt.c
|
||||
@@ -364,6 +371,9 @@ ppc64_test_plt_LDADD = $(LIBUNWIND)
|
||||
Gx64_test_dwarf_expressions_LDADD = $(LIBUNWIND) $(LIBUNWIND_local)
|
||||
Lx64_test_dwarf_expressions_LDADD = $(LIBUNWIND_local)
|
||||
|
||||
Garm_test_debug_frame_bt_LDADD = $(LIBUNWIND) $(LIBUNWIND_local)
|
||||
Larm_test_debug_frame_bt_LDADD = $(LIBUNWIND_local)
|
||||
|
||||
Garm64_test_sve_signal_LDADD = $(LIBUNWIND) $(LIBUNWIND_local)
|
||||
Larm64_test_sve_signal_LDADD = $(LIBUNWIND_local)
|
||||
aarch64_test_plt_LDADD = $(LIBUNWIND)
|
||||
|
||||
Reference in New Issue
Block a user