[pushed,gdb/testsuite] Simplify gdb.base/unwind-on-each-insn.exp.tcl
Commit Message
Recent commit 1d98e564c97 ("[gdb/testsuite] Add
gdb.base/unwind-on-each-insn-{amd64,i386}.exp") broke commit eb015bf86b6
("[gdb/testsuite] Avoid using .eh_frame in gdb.base/unwind-on-each-insn.exp"),
in the sense that gdb.base/unwind-on-each-insn.exp no longer uses
-fno-asynchronous-unwind-tables, due to trying to concatenate two lists using:
...
lappend srcfile2_flags $nodebug_flags
...
which should instead be:
...
lappend srcfile2_flags {*}$nodebug_flags
...
Fix this by simplifying gdb.base/unwind-on-each-insn.exp.tcl, completely
leaving the responsibility to set srcfile_flags and srcfile2_flags to each
includer.
Tested on x86_64-linux.
---
.../gdb.base/unwind-on-each-insn-amd64.exp | 6 ++---
.../gdb.base/unwind-on-each-insn-i386.exp | 6 ++---
.../gdb.base/unwind-on-each-insn.exp | 13 +++++++----
.../gdb.base/unwind-on-each-insn.exp.tcl | 23 +------------------
4 files changed, 14 insertions(+), 34 deletions(-)
base-commit: f6210497fd7ff8f71c1421abb3dacdd4556dd097
@@ -17,10 +17,8 @@
require is_x86_64_m64_target
-set srcfile_flags {}
-set srcfile2_flags {}
-set srcfile_debug 1
-set srcfile2_debug 1
+set srcfile_flags {debug}
+set srcfile2_flags {debug}
if [info exists COMPILE] {
standard_testfile unwind-on-each-insn.c unwind-on-each-insn-foo.c
@@ -17,10 +17,8 @@
require is_x86_like_target
-set srcfile_flags {}
-set srcfile2_flags {}
-set srcfile_debug 1
-set srcfile2_debug 1
+set srcfile_flags {debug}
+set srcfile2_flags {debug}
if [info exists COMPILE] {
standard_testfile unwind-on-each-insn.c unwind-on-each-insn-foo.c
@@ -15,9 +15,14 @@
standard_testfile .c -foo.c
-set srcfile_flags {}
-set srcfile2_flags {}
-set srcfile_debug 1
-set srcfile2_debug 0
+set srcfile_flags {debug}
+set srcfile2_flags {nodebug}
+
+# Make sure that we don't use .eh_frame info, by not generating it,
+# using -fno-asynchronous-unwind-tables, if supported.
+if { [gdb_can_simple_compile fno-asynchronous-unwind-tables \
+ { void foo () { } } object -fno-asynchronous-unwind-tables] } {
+ lappend srcfile2_flags additional_flags=-fno-asynchronous-unwind-tables
+}
source $srcdir/$subdir/unwind-on-each-insn.exp.tcl
@@ -23,29 +23,8 @@
# and that the previous stack-pointer value, and frame base address
# value, can be calculated correctly.
-set debug_flags {debug}
-set nodebug_flags {nodebug}
-
-# Make sure that we don't use .eh_frame info, by not generating it,
-# using -fno-asynchronous-unwind-tables, if supported.
-if { [gdb_can_simple_compile fno-asynchronous-unwind-tables \
- { void foo () { } } object -fno-asynchronous-unwind-tables] } {
- lappend nodebug_flags additional_flags=-fno-asynchronous-unwind-tables
-}
-
-if { $srcfile_debug } {
- lappend srcfile_flags $debug_flags
-} else {
- lappend srcfile_flags $nodebug_flags
-}
-if { $srcfile2_debug } {
- lappend srcfile2_flags $debug_flags
-} else {
- lappend srcfile2_flags $nodebug_flags
-}
-
if {[prepare_for_testing_full "failed to prepare" \
- [list ${testfile} $debug_flags \
+ [list ${testfile} {debug} \
$srcfile $srcfile_flags $srcfile2 $srcfile2_flags]]} {
return -1
}