This is the mail archive of the
gdb-cvs@sourceware.org
mailing list for the GDB project.
[binutils-gdb] gdb: Minor cleanup in some gdb.arch/* tests
- From: Andrew Burgess <aburgess at sourceware dot org>
- To: gdb-cvs at sourceware dot org
- Date: 23 Mar 2018 11:58:49 -0000
- Subject: [binutils-gdb] gdb: Minor cleanup in some gdb.arch/* tests
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=066cfa988ddf88ad32b7a114f2e984a13a3848c8
commit 066cfa988ddf88ad32b7a114f2e984a13a3848c8
Author: Andrew Burgess <andrew.burgess@embecosm.com>
Date: Mon Mar 19 00:37:31 2018 +0000
gdb: Minor cleanup in some gdb.arch/* tests
A small number of tests incorrectly tried to pass -Wa,-g through to
GCC as an extra compile time flag, either to gdb_compile or
prepare_for_testing.
The problem is that the syntax used for passing the flags was
incorrect, and as a result these extra flags were being ignored.
Luckily, the 'debug' flag was being passed in each case anyway, which
means that the '-g' flag would already be added.
Given that all these tests pass 'debug', and the invalid flag has been
ignored for some time, I'm just removing the flags in this commit.
I've also changed the tests from using gdb_compile to
prepare_for_testing, which allows some extra code to be removed from a
couple of tests scripts.
There should be no change in the test results after this commit.
gdb/testsuite/ChangeLog:
* gdb.arch/amd64-disp-step-avx.exp: Remove unneeded assembler flag
option, syntax was wrong anyway.
* gdb.arch/arm-disp-step.exp: Likewise.
* gdb.arch/sparc64-regs.exp: Likewise.
* gdb.arch/amd64-disp-step.exp: Remove unneeded assembler flag
option, syntax was wrong anyway, switch to use
prepare_for_testing.
* gdb.arch/i386-disp-step.exp: Likewise.
Diff:
---
gdb/testsuite/ChangeLog | 11 +++++++++++
gdb/testsuite/gdb.arch/amd64-disp-step-avx.exp | 5 +----
gdb/testsuite/gdb.arch/amd64-disp-step.exp | 12 +-----------
gdb/testsuite/gdb.arch/arm-disp-step.exp | 4 +---
gdb/testsuite/gdb.arch/i386-disp-step.exp | 12 +-----------
gdb/testsuite/gdb.arch/sparc64-regs.exp | 5 +----
6 files changed, 16 insertions(+), 33 deletions(-)
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog
index 065b1c3..eb7fe0b 100644
--- a/gdb/testsuite/ChangeLog
+++ b/gdb/testsuite/ChangeLog
@@ -1,3 +1,14 @@
+2018-03-23 Andrew Burgess <andrew.burgess@embecosm.com>
+
+ * gdb.arch/amd64-disp-step-avx.exp: Remove unneeded assembler flag
+ option, syntax was wrong anyway.
+ * gdb.arch/arm-disp-step.exp: Likewise.
+ * gdb.arch/sparc64-regs.exp: Likewise.
+ * gdb.arch/amd64-disp-step.exp: Remove unneeded assembler flag
+ option, syntax was wrong anyway, switch to use
+ prepare_for_testing.
+ * gdb.arch/i386-disp-step.exp: Likewise.
+
2018-03-23 Andreas Arnez <arnez@linux.vnet.ibm.com>
* gdb.ada/exec_changed.exp: Replace "target_info exists
diff --git a/gdb/testsuite/gdb.arch/amd64-disp-step-avx.exp b/gdb/testsuite/gdb.arch/amd64-disp-step-avx.exp
index 5c20aeb..1f85fa7 100644
--- a/gdb/testsuite/gdb.arch/amd64-disp-step-avx.exp
+++ b/gdb/testsuite/gdb.arch/amd64-disp-step-avx.exp
@@ -25,10 +25,7 @@ if { ![istarget x86_64-*-* ] || ![is_lp64_target] } {
standard_testfile .S
-set additional_flags "-Wa,-g"
-
-if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile} \
- [list debug $additional_flags]] } {
+if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile}] } {
return -1
}
diff --git a/gdb/testsuite/gdb.arch/amd64-disp-step.exp b/gdb/testsuite/gdb.arch/amd64-disp-step.exp
index 84f7e69..782b758 100644
--- a/gdb/testsuite/gdb.arch/amd64-disp-step.exp
+++ b/gdb/testsuite/gdb.arch/amd64-disp-step.exp
@@ -27,20 +27,10 @@ set newline "\[\r\n\]*"
standard_testfile .S
-set additional_flags "-Wa,-g"
-
-if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable [list debug $additional_flags]] != "" } {
- untested "failed to compile"
+if { [prepare_for_testing "failed to prepare" $testfile $srcfile] } {
return -1
}
-# Get things started.
-
-gdb_exit
-gdb_start
-gdb_reinitialize_dir $srcdir/$subdir
-gdb_load ${binfile}
-
gdb_test "set displaced-stepping on" ""
gdb_test "show displaced-stepping" ".* displaced stepping .* is on.*"
diff --git a/gdb/testsuite/gdb.arch/arm-disp-step.exp b/gdb/testsuite/gdb.arch/arm-disp-step.exp
index 760d392..0f33b37 100644
--- a/gdb/testsuite/gdb.arch/arm-disp-step.exp
+++ b/gdb/testsuite/gdb.arch/arm-disp-step.exp
@@ -24,9 +24,7 @@ if {![is_aarch32_target]} then {
standard_testfile .S
-set additional_flags "-Wa,-g"
-
-if { [prepare_for_testing "failed to prepare" $testfile $srcfile [list debug $additional_flags]] } {
+if { [prepare_for_testing "failed to prepare" $testfile $srcfile] } {
return -1
}
diff --git a/gdb/testsuite/gdb.arch/i386-disp-step.exp b/gdb/testsuite/gdb.arch/i386-disp-step.exp
index ff0713c..d15c54b 100644
--- a/gdb/testsuite/gdb.arch/i386-disp-step.exp
+++ b/gdb/testsuite/gdb.arch/i386-disp-step.exp
@@ -25,20 +25,10 @@ if { ![is_x86_like_target] } then {
standard_testfile .S
-set additional_flags "-Wa,-g"
-
-if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable [list debug $additional_flags]] != "" } {
- untested "failed to compile"
+if { [prepare_for_testing "failed to prepare" $testfile $srcfile] } {
return -1
}
-# Get things started.
-
-gdb_exit
-gdb_start
-gdb_reinitialize_dir $srcdir/$subdir
-gdb_load ${binfile}
-
gdb_test "set displaced-stepping on" ""
gdb_test "show displaced-stepping" ".* displaced stepping .* is on.*"
diff --git a/gdb/testsuite/gdb.arch/sparc64-regs.exp b/gdb/testsuite/gdb.arch/sparc64-regs.exp
index 3e84de6..6b621bb 100644
--- a/gdb/testsuite/gdb.arch/sparc64-regs.exp
+++ b/gdb/testsuite/gdb.arch/sparc64-regs.exp
@@ -25,10 +25,7 @@ if ![istarget "sparc64*-*-linux*"] then {
standard_testfile .S
-set additional_flags "-Wa,-g"
-
-if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile} \
- [list debug $additional_flags]] } {
+if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile}] } {
return -1
}