This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[testsuite patch] Fix gdb.btrace/tailcall-only.exp errors on x86_64-m32


Hi,

$ runtest 'CC_FOR_TARGET=gcc -m32' gdb.btrace/tailcall-only.exp
Running ./gdb.btrace/tailcall-only.exp ...
gdb compile failed, tailcall-only.c: Assembler messages:
tailcall-only.c:142: Error: cannot represent relocation type BFD_RELOC_64
[...]
tailcall-only.c:425: Error: cannot represent relocation type BFD_RELOC_64

It works for the other x86 arch combinations:

--- 20160406clean63-fedora-rawhide//fedora-rawhide-x86_64/out/gdb-x86_64-redhat-linux-gnu-m32.sum       2016-04-06 17:44:45.262849875 +0200
+++ 20160408clean67-fedora-rawhide//fedora-rawhide-x86_64/out/gdb-x86_64-redhat-linux-gnu-m32.sum       2016-04-08 17:40:49.739742759 +0200
#gdb.btrace/tailcall-only.exp
+Running gdb/testsuite/gdb.btrace/tailcall-only.exp ...
+gdb compile failed, tailcall-only.c: Assembler messages:
+tailcall-only.c:142: Error: cannot represent relocation type BFD_RELOC_64
[...]
+tailcall-only.c:425: Error: cannot represent relocation type BFD_RELOC_64
+UNTESTED: gdb.btrace/tailcall-only.exp: tailcall-only.exp
--- 20160406clean63-fedora-rawhide//fedora-rawhide-x86_64/out/gdb-x86_64-redhat-linux-gnu-m64.sum       2016-04-06 17:44:45.555852344 +0200
+++ 20160408clean67-fedora-rawhide//fedora-rawhide-x86_64/out/gdb-x86_64-redhat-linux-gnu-m64.sum       2016-04-08 17:40:50.021744759 +0200
#gdb.btrace/tailcall-only.exp
+Running gdb/testsuite/gdb.btrace/tailcall-only.exp ...
+PASS: gdb.btrace/tailcall-only.exp: set record function-call-history-size 0
[...]
+PASS: gdb.btrace/tailcall-only.exp: info frame
--- 20160406clean63-fedora-rawhide//fedora-rawhide-i386/out/gdb-i686-redhat-linux-gnu-m32.sum   2016-04-06 17:43:44.152334900 +0200
+++ 20160408clean67-fedora-rawhide//fedora-rawhide-i386/out/gdb-i686-redhat-linux-gnu-m32.sum   2016-04-08 17:40:04.451421514 +0200
#gdb.btrace/tailcall-only.exp
+Running gdb/testsuite/gdb.btrace/tailcall-only.exp ...
+PASS: gdb.btrace/tailcall-only.exp: set record function-call-history-size 0
[...]
+PASS: gdb.btrace/tailcall-only.exp: info frame

OK for check-in?


Jan
gdb/testsuite/ChangeLog
2016-04-08  Jan Kratochvil  <jan.kratochvil@redhat.com>

	* gdb.btrace/tailcall-only.exp: Use is_lp64_target check.

diff --git a/gdb/testsuite/gdb.btrace/tailcall-only.exp b/gdb/testsuite/gdb.btrace/tailcall-only.exp
index 44501f5..50837bf 100644
--- a/gdb/testsuite/gdb.btrace/tailcall-only.exp
+++ b/gdb/testsuite/gdb.btrace/tailcall-only.exp
@@ -35,9 +35,9 @@ if [info exists COMPILE] {
     # make check RUNTESTFLAGS="gdb.btrace/tailcall-only.exp COMPILE=1"
     standard_testfile tailcall-only.c
     lappend opts debug optimize=-O2
-} elseif {[istarget "x86_64-*-*"]} {
+} elseif {[istarget "x86_64-*-*"] && [is_lp64_target]} {
 	standard_testfile x86_64-tailcall-only.S
-} elseif {[istarget "i?86-*-*"]} {
+} elseif {[istarget "i?86-*-*"] || [istarget "x86_64-*-*"]} {
 	standard_testfile i686-tailcall-only.S
 } else {
     verbose "Skipping ${testfile}."

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]