aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarkus Metzger <markus.t.metzger@intel.com>2018-09-26 15:28:28 +0200
committerMarkus Metzger <markus.t.metzger@intel.com>2018-10-01 10:06:56 +0200
commit224d30d393654ff0689429505a3e725cdad1cca5 (patch)
treeba23faaa0826623a60a10d6ac4ccff97b14c47d8
parent15ec67475f486077ccb45d80c46416bf4949e053 (diff)
downloadgdb-224d30d393654ff0689429505a3e725cdad1cca5.zip
gdb-224d30d393654ff0689429505a3e725cdad1cca5.tar.gz
gdb-224d30d393654ff0689429505a3e725cdad1cca5.tar.bz2
testsuite: fix is_amd64_regs_target
Commit c221b2f Testsuite: Add gdb_can_simple_compile changed the source file name extension of the test program from .s to .c resulting in compile fails. This, in turn, causes is_amd64_regs_target checks to fail. In gdb.btrace/tailcall.exp and others, this causes the wrong source file to be picked and the test to fail on 64-bit targets. Change the test source from an assembly program to a C program using inline assembly. testsuite/ * lib/gdb.exp (is_amd64_regs_target): Change assembly to C inline assembly.
-rw-r--r--gdb/testsuite/ChangeLog5
-rw-r--r--gdb/testsuite/lib/gdb.exp13
2 files changed, 12 insertions, 6 deletions
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog
index f2fb6de..7f278ef 100644
--- a/gdb/testsuite/ChangeLog
+++ b/gdb/testsuite/ChangeLog
@@ -1,3 +1,8 @@
+2018-10-01 Markus Metzger <markus.t.metzger@intel.com>
+
+ * lib/gdb.exp (is_amd64_regs_target): Change assembly to C inline
+ assembly.
+
2018-09-28 Andrew Burgess <andrew.burgess@embecosm.com>
* gdb.base/frame-selection.exp: New file.
diff --git a/gdb/testsuite/lib/gdb.exp b/gdb/testsuite/lib/gdb.exp
index f32abfe..1eea922 100644
--- a/gdb/testsuite/lib/gdb.exp
+++ b/gdb/testsuite/lib/gdb.exp
@@ -2467,13 +2467,14 @@ gdb_caching_proc is_amd64_regs_target {
return 0
}
- set list {}
- foreach reg \
- {rax rbx rcx rdx rsi rdi rbp rsp r8 r9 r10 r11 r12 r13 r14 r15} {
- lappend list "\tincq %$reg"
- }
+ return [gdb_can_simple_compile is_amd64_regs_target {
+ int main (void) {
+ asm ("incq %rax");
+ asm ("incq %r15");
- return [gdb_can_simple_compile is_amd64_regs_target [join $list \n]]
+ return 0;
+ }
+ }]
}
# Return 1 if this target is an x86 or x86-64 with -m32.