summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2015-03-25 06:44:09 -0700
committerMark Wielaard <mjw@redhat.com>2015-04-01 20:51:54 +0200
commitaa19e593d3a5ba53571064ca133597ca9f14f840 (patch)
treedf68f0031822a12d229a6a4093895ece7ed7787f /tests
parent8c78ff0d1f6ce1135d60d7224f26be92aedc2306 (diff)
downloadelfutils-aa19e593d3a5ba53571064ca133597ca9f14f840.tar.gz
tests: Add testfile-x32 to run-addrcfi.sh
Signed-off-by: H.J. Lu <hjl.tools@gmail.com>
Diffstat (limited to 'tests')
-rw-r--r--tests/ChangeLog6
-rw-r--r--tests/Makefile.am2
-rwxr-xr-xtests/run-addrcfi.sh76
-rwxr-xr-xtests/testfile-x32.bz2bin0 -> 3059 bytes
4 files changed, 83 insertions, 1 deletions
diff --git a/tests/ChangeLog b/tests/ChangeLog
index ca8cbdf7..4ead80fe 100644
--- a/tests/ChangeLog
+++ b/tests/ChangeLog
@@ -1,5 +1,11 @@
2015-04-01 H.J. Lu <hjl.tools@gmail.com>
+ * run-addrcfi.sh: Add a test for testfile-x32.
+ * testfile-x32.bz2: New file.
+ * Makefile.am (EXTRA_DIST): Add testfile-x32.bz2.
+
+2015-04-01 H.J. Lu <hjl.tools@gmail.com>
+
* run-allregs.sh: Add a test for testfile-x32-core.
2015-04-01 H.J. Lu <hjl.tools@gmail.com>
diff --git a/tests/Makefile.am b/tests/Makefile.am
index 83b10052..cc1d2540 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -287,7 +287,7 @@ EXTRA_DIST = run-arextract.sh run-arsymtest.sh \
run-readelf-A.sh testfileppc32attrs.o.bz2 \
testfile-debug-types.bz2 \
run-getsrc-die.sh run-strptr.sh \
- testfile-x32-core.bz2
+ testfile-x32-core.bz2 testfile-x32.bz2
if USE_VALGRIND
valgrind_cmd='valgrind -q --error-exitcode=1 --run-libc-freeres=no'
diff --git a/tests/run-addrcfi.sh b/tests/run-addrcfi.sh
index 2559c330..c864eeae 100755
--- a/tests/run-addrcfi.sh
+++ b/tests/run-addrcfi.sh
@@ -1,5 +1,6 @@
#! /bin/sh
# Copyright (C) 2013
+# Copyright (C) H.J. Lu <hjl.tools@gmail.com>, 2015.
# This file is part of elfutils.
#
# This file is free software; you can redistribute it and/or modify
@@ -3671,3 +3672,78 @@ dwarf_cfi_addrframe (.eh_frame): no matching address range
FP/SIMD reg94 (v30): undefined
FP/SIMD reg95 (v31): undefined
EOF
+
+# EM_X86_64/ELFCLASS32 (function bar 0x00400390)
+#
+# Note. Only in .eh_frame, there is no .debug_frame.
+# Same as PPC above but with -mx32.
+testfiles testfile-x32
+testrun_compare ${abs_builddir}/addrcfi -e testfile-x32 0x00400390 <<\EOF
+.eh_frame has 0x400390 => [0x400390, 0x40039c):
+ return address in reg16
+ CFA location expression: bregx(7,8)
+ integer reg0 (%rax): same_value
+ integer reg1 (%rdx): undefined
+ integer reg2 (%rcx): undefined
+ integer reg3 (%rbx): undefined
+ integer reg4 (%rsi): undefined
+ integer reg5 (%rdi): undefined
+ integer reg6 (%rbp): same_value
+ integer reg7 (%rsp): location expression: call_frame_cfa stack_value
+ integer reg8 (%r8): undefined
+ integer reg9 (%r9): undefined
+ integer reg10 (%r10): undefined
+ integer reg11 (%r11): undefined
+ integer reg12 (%r12): same_value
+ integer reg13 (%r13): same_value
+ integer reg14 (%r14): same_value
+ integer reg15 (%r15): same_value
+ integer reg16 (%rip): location expression: call_frame_cfa plus_uconst(-8)
+ SSE reg17 (%xmm0): undefined
+ SSE reg18 (%xmm1): undefined
+ SSE reg19 (%xmm2): undefined
+ SSE reg20 (%xmm3): undefined
+ SSE reg21 (%xmm4): undefined
+ SSE reg22 (%xmm5): undefined
+ SSE reg23 (%xmm6): undefined
+ SSE reg24 (%xmm7): undefined
+ SSE reg25 (%xmm8): undefined
+ SSE reg26 (%xmm9): undefined
+ SSE reg27 (%xmm10): undefined
+ SSE reg28 (%xmm11): undefined
+ SSE reg29 (%xmm12): undefined
+ SSE reg30 (%xmm13): undefined
+ SSE reg31 (%xmm14): undefined
+ SSE reg32 (%xmm15): undefined
+ x87 reg33 (%st0): undefined
+ x87 reg34 (%st1): undefined
+ x87 reg35 (%st2): undefined
+ x87 reg36 (%st3): undefined
+ x87 reg37 (%st4): undefined
+ x87 reg38 (%st5): undefined
+ x87 reg39 (%st6): undefined
+ x87 reg40 (%st7): undefined
+ MMX reg41 (%mm0): undefined
+ MMX reg42 (%mm1): undefined
+ MMX reg43 (%mm2): undefined
+ MMX reg44 (%mm3): undefined
+ MMX reg45 (%mm4): undefined
+ MMX reg46 (%mm5): undefined
+ MMX reg47 (%mm6): undefined
+ MMX reg48 (%mm7): undefined
+ integer reg49 (%rflags): undefined
+ segment reg50 (%es): undefined
+ segment reg51 (%cs): undefined
+ segment reg52 (%ss): undefined
+ segment reg53 (%ds): undefined
+ segment reg54 (%fs): undefined
+ segment reg55 (%gs): undefined
+ segment reg58 (%fs.base): undefined
+ segment reg59 (%gs.base): undefined
+ control reg62 (%tr): undefined
+ control reg63 (%ldtr): undefined
+ control reg64 (%mxcsr): undefined
+ control reg65 (%fcw): undefined
+ control reg66 (%fsw): undefined
+handle_cfi no CFI (.debug_frame): no error
+EOF
diff --git a/tests/testfile-x32.bz2 b/tests/testfile-x32.bz2
new file mode 100755
index 00000000..f6df180f
--- /dev/null
+++ b/tests/testfile-x32.bz2
Binary files differ