[PATCH 4/7] gdb/testsuite: Don't pass "nodebug" to object compilations

Pedro Alves <[email protected]>
Newsgroups gmane.comp.gdb.patches
Message-ID <[email protected]>
The "nodebug" option today is mostly a no-op.  The only check in the
tree is this in gdb_compile:

    # GDB doesn't support minimal symbols in AIX, so fail the compilation
    # if nodebug is requested for an AIX target.
    if { [istarget *-*-aix*] && [lsearch -exact $options nodebug] != -1} {
	return "minsyms not supported in AIX"
    }

The next few patches will rename/replace "nodebug" with an "symtab"
option instead, meaning "force emission of COFF/ELF/etc. symbol table
at link time".

With that, passing 'symtab' to a compilation that only produces an
object file, with no link step, does nothing.

Many testcases nonetheless pass "nodebug" when compiling a single
source to an object.  This happens both directly:

    gdb_compile $asm_file $binfile.o object {nodebug}

and through the per-source specs of prepare_for_testing_full,
build_executable_from_specs and build_executable_and_dwo_files, where
each source is compiled to an object before the executable is linked,
e.g.:

    prepare_for_testing_full "failed to prepare" \
        [list $testfile debug main.c debug $srcfile nodebug]

In all these cases the option has no effect on the object compile.

Presumably "nodebug" was added to these testcases to mean "build
without debug info", but that can be achieved by simply not passing
the "debug" option instead.

So this commit drops "nodebug" from all object-only compilations.

I found all of these with a local hack to gdb_compile,
gdb_compile_shlib_1 and build_executable that errored out if a
testcase passed down 'nodebug' to an 'object' compilation.

Change-Id: I9c5b16b718384ce06184484121862316a759aee2
---
 gdb/testsuite/gdb.base/large-frame.exp                |  2 +-
 gdb/testsuite/gdb.base/list-dot-nodebug.exp           |  4 ++--
 gdb/testsuite/gdb.base/list-nodebug.exp               |  2 +-
 .../gdb.base/unwind-on-each-insn-amd64-2.exp          |  1 -
 gdb/testsuite/gdb.base/unwind-on-each-insn.exp        |  2 +-
 gdb/testsuite/gdb.compile/compile-cplus.exp           |  2 +-
 gdb/testsuite/gdb.compile/compile.exp                 |  2 +-
 gdb/testsuite/gdb.cp/minsym-fallback.exp              |  4 +---
 gdb/testsuite/gdb.cp/nsalias.exp                      |  4 ++--
 gdb/testsuite/gdb.dwarf2/dup-psym.exp                 |  2 +-
 gdb/testsuite/gdb.dwarf2/dw2-anonymous-func.exp       |  2 +-
 gdb/testsuite/gdb.dwarf2/dw2-basic.exp                |  2 +-
 gdb/testsuite/gdb.dwarf2/dw2-compressed.exp           |  2 +-
 gdb/testsuite/gdb.dwarf2/dw2-cu-size.exp              |  2 +-
 gdb/testsuite/gdb.dwarf2/dw2-double-set-die-type.exp  |  2 +-
 gdb/testsuite/gdb.dwarf2/dw2-empty-namespace.exp      |  2 +-
 gdb/testsuite/gdb.dwarf2/dw2-filename.exp             |  2 +-
 gdb/testsuite/gdb.dwarf2/dw2-inheritance.exp          |  2 +-
 gdb/testsuite/gdb.dwarf2/dw2-intercu.exp              |  2 +-
 gdb/testsuite/gdb.dwarf2/dw2-intermix.exp             |  2 +-
 gdb/testsuite/gdb.dwarf2/dw2-linkage-name-trust.exp   |  4 +++-
 gdb/testsuite/gdb.dwarf2/dw2-op-stack-value.exp       |  2 +-
 gdb/testsuite/gdb.dwarf2/dw2-producer.exp             |  2 +-
 gdb/testsuite/gdb.dwarf2/dw2-ref-missing-frame.exp    |  4 ++--
 gdb/testsuite/gdb.dwarf2/dw2-strp.exp                 |  2 +-
 gdb/testsuite/gdb.dwarf2/dwz-many.exp                 |  4 ++--
 gdb/testsuite/gdb.dwarf2/dwzbuildid.tcl               |  4 ++--
 gdb/testsuite/gdb.dwarf2/fission-absolute-dwo.exp     |  4 ++--
 gdb/testsuite/gdb.dwarf2/fission-base.exp             |  2 +-
 gdb/testsuite/gdb.dwarf2/fission-call.exp             |  4 ++--
 gdb/testsuite/gdb.dwarf2/fission-dw-form-strx.exp     |  4 ++--
 gdb/testsuite/gdb.dwarf2/fission-loclists-pie.exp     |  2 +-
 gdb/testsuite/gdb.dwarf2/fission-loclists.exp         |  2 +-
 gdb/testsuite/gdb.dwarf2/fission-multi-cu.exp         |  6 +++---
 gdb/testsuite/gdb.dwarf2/fission-relative-dwo.exp     |  4 ++--
 gdb/testsuite/gdb.dwarf2/fission-reread.exp           | 11 +++++++----
 .../gdb.dwarf2/fission-type-unit-locexpr.exp          |  4 ++--
 gdb/testsuite/gdb.dwarf2/fission-with-type-unit.exp   |  4 ++--
 .../gdb.dwarf2/gdb-index-skeletonless-tu.exp          |  4 ++--
 gdb/testsuite/gdb.dwarf2/mac-fileno.exp               |  2 +-
 gdb/testsuite/gdb.dwarf2/struct-with-sig-2.exp        |  2 +-
 gdb/testsuite/gdb.fortran/call-no-debug.exp           |  6 +++---
 gdb/testsuite/gdb.linespec/break-asm-file.exp         |  4 ++--
 gdb/testsuite/gdb.trace/entry-values.exp              |  4 ++--
 gdb/testsuite/gdb.trace/unavailable-dwarf-piece.exp   |  4 ++--
 gdb/testsuite/gdb.tui/resize-3.exp                    |  2 +-
 46 files changed, 72 insertions(+), 70 deletions(-)

diff --git a/gdb/testsuite/gdb.base/large-frame.exp b/gdb/testsuite/gdb.base/large-frame.exp
index b9a4dc0d9ec..13fb3e46914 100644
--- a/gdb/testsuite/gdb.base/large-frame.exp
+++ b/gdb/testsuite/gdb.base/large-frame.exp
@@ -35,7 +35,7 @@ proc run_test { opt_level } {
     if {[prepare_for_testing_full "failed to prepare" \
 	     [list $::testfile-$opt_level debug \
 		  $srcfile [list debug] \
-		  $srcfile2 [list nodebug optimize=-$opt_level]]]} {
+		  $srcfile2 [list optimize=-$opt_level]]]} {
 	return
     }
 
diff --git a/gdb/testsuite/gdb.base/list-dot-nodebug.exp b/gdb/testsuite/gdb.base/list-dot-nodebug.exp
index 69ffd679e92..2bc3d27df0e 100644
--- a/gdb/testsuite/gdb.base/list-dot-nodebug.exp
+++ b/gdb/testsuite/gdb.base/list-dot-nodebug.exp
@@ -31,8 +31,8 @@ proc do_test { debug } {
 
 	if {[prepare_for_testing_full "failed to prepare" \
 		[list ${::testfile}-${debug} $opts \
-		    $::srcfile [list nodebug] \
-		    $::srcfile2 [list debug]]]} {
+		    $::srcfile {} \
+		    $::srcfile2 {debug}]]} {
 	    return -1
 	}
 
diff --git a/gdb/testsuite/gdb.base/list-nodebug.exp b/gdb/testsuite/gdb.base/list-nodebug.exp
index 53c31ca0891..c29905d94ba 100644
--- a/gdb/testsuite/gdb.base/list-nodebug.exp
+++ b/gdb/testsuite/gdb.base/list-nodebug.exp
@@ -21,7 +21,7 @@ standard_testfile .c -2.c
 if { [prepare_for_testing_full "failed to prepare" \
 	  [list \
 	       $testfile {} \
-	       $srcfile {nodebug} \
+	       $srcfile {} \
 	       $srcfile2 {debug}]] } {
     return
 }
diff --git a/gdb/testsuite/gdb.base/unwind-on-each-insn-amd64-2.exp b/gdb/testsuite/gdb.base/unwind-on-each-insn-amd64-2.exp
index 0e1af794f52..07201fe4cf6 100644
--- a/gdb/testsuite/gdb.base/unwind-on-each-insn-amd64-2.exp
+++ b/gdb/testsuite/gdb.base/unwind-on-each-insn-amd64-2.exp
@@ -22,7 +22,6 @@ lappend srcfile_flags debug
 lappend srcfile_flags nopie
 
 set srcfile2_flags {}
-lappend srcfile2_flags nodebug
 lappend srcfile_flags nopie
 
 set ldflags $srcfile_flags
diff --git a/gdb/testsuite/gdb.base/unwind-on-each-insn.exp b/gdb/testsuite/gdb.base/unwind-on-each-insn.exp
index 26e80adfe5b..4094f2d45b1 100644
--- a/gdb/testsuite/gdb.base/unwind-on-each-insn.exp
+++ b/gdb/testsuite/gdb.base/unwind-on-each-insn.exp
@@ -16,7 +16,7 @@
 standard_testfile .c -foo.c
 
 set srcfile_flags {debug}
-set srcfile2_flags {nodebug}
+set srcfile2_flags {}
 set ldflags {debug}
 
 # Make sure that we don't use .eh_frame info, by not generating it,
diff --git a/gdb/testsuite/gdb.compile/compile-cplus.exp b/gdb/testsuite/gdb.compile/compile-cplus.exp
index 80967915301..5db328feff6 100644
--- a/gdb/testsuite/gdb.compile/compile-cplus.exp
+++ b/gdb/testsuite/gdb.compile/compile-cplus.exp
@@ -37,7 +37,7 @@ set srcfilesoptions [list ${srcfile} ${options}]
 if { $srcfile3 != "" } {
     lappend srcfilesoptions $srcfile3 {}
 }
-set srcfile4options "nodebug c++"
+set srcfile4options {c++}
 lappend srcfilesoptions $srcfile4 $srcfile4options
 
 if { [build_executable_from_specs $testfile.exp $testfile $options \
diff --git a/gdb/testsuite/gdb.compile/compile.exp b/gdb/testsuite/gdb.compile/compile.exp
index 4429f653a63..5998f30180d 100644
--- a/gdb/testsuite/gdb.compile/compile.exp
+++ b/gdb/testsuite/gdb.compile/compile.exp
@@ -31,7 +31,7 @@ set srcfilesoptions [list ${srcfile} ${options}]
 if { $srcfile3 != "" } {
     lappend srcfilesoptions $srcfile3 ${options}
 }
-lappend srcfilesoptions $srcfile4 "nodebug"
+lappend srcfilesoptions $srcfile4 {}
 if { [build_executable_from_specs $testfile.exp $testfile $options \
 	  {*}$srcfilesoptions] } {
     return
diff --git a/gdb/testsuite/gdb.cp/minsym-fallback.exp b/gdb/testsuite/gdb.cp/minsym-fallback.exp
index b4271027814..d6488e6780c 100644
--- a/gdb/testsuite/gdb.cp/minsym-fallback.exp
+++ b/gdb/testsuite/gdb.cp/minsym-fallback.exp
@@ -25,9 +25,7 @@ set debug_flags {}
 lappend debug_flags debug
 lappend debug_flags c++
 
-set nodebug_flags {}
-lappend nodebug_flags nodebug
-lappend nodebug_flags c++
+set nodebug_flags {c++}
 
 set executable $testfile
 set objfile [standard_output_file ${testfile}.o]
diff --git a/gdb/testsuite/gdb.cp/nsalias.exp b/gdb/testsuite/gdb.cp/nsalias.exp
index 459efbf12d0..f3224b4339d 100644
--- a/gdb/testsuite/gdb.cp/nsalias.exp
+++ b/gdb/testsuite/gdb.cp/nsalias.exp
@@ -173,7 +173,7 @@ if {[gdb_compile $srcdir/$subdir/$srcfile ${binfile}1.o \
     return
 }
 
-if {[gdb_compile $asm_file ${binfile}2.o object {nodebug}] != ""} {
+if {[gdb_compile $asm_file ${binfile}2.o object {}] != ""} {
     return
 }
 
@@ -303,7 +303,7 @@ set the_dwarf [format {
 
 Dwarf::assemble $asm_file $the_dwarf
 
-if {[gdb_compile $asm_file ${binfile}3.o object {nodebug}] != ""} {
+if {[gdb_compile $asm_file ${binfile}3.o object {}] != ""} {
     return
 }
 
diff --git a/gdb/testsuite/gdb.dwarf2/dup-psym.exp b/gdb/testsuite/gdb.dwarf2/dup-psym.exp
index b020146e285..ac4bdf0fd27 100644
--- a/gdb/testsuite/gdb.dwarf2/dup-psym.exp
+++ b/gdb/testsuite/gdb.dwarf2/dup-psym.exp
@@ -22,7 +22,7 @@ require dwarf2_support
 standard_testfile .S
 
 if {[prepare_for_testing_full "failed to prepare" \
-	 [list $testfile {debug} main.c debug $srcfile nodebug]]} {
+	 [list $testfile {debug} main.c debug $srcfile {}]]} {
     return
 }
 
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-anonymous-func.exp b/gdb/testsuite/gdb.dwarf2/dw2-anonymous-func.exp
index a02d580bfd2..da254740b1e 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-anonymous-func.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-anonymous-func.exp
@@ -23,7 +23,7 @@ standard_testfile .S
 set dwarf_srcfile "file1.txt"
 
 if {[prepare_for_testing_full "failed to prepare" \
-	 [list $testfile debug main.c debug $srcfile nodebug]]} {
+	 [list $testfile debug main.c debug $srcfile {}]]} {
     return
 }
 
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-basic.exp b/gdb/testsuite/gdb.dwarf2/dw2-basic.exp
index f94bb8633ce..7e439d575f0 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-basic.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-basic.exp
@@ -23,7 +23,7 @@ standard_testfile .S
 set dwarf_srcfile "file1.txt"
 
 if {[prepare_for_testing_full "failed to prepare" \
-	 [list $testfile debug main.c debug $srcfile nodebug]]} {
+	 [list $testfile debug main.c debug $srcfile {}]]} {
     return
 }
 
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-compressed.exp b/gdb/testsuite/gdb.dwarf2/dw2-compressed.exp
index ff197a4d74f..f41dcabaec9 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-compressed.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-compressed.exp
@@ -25,7 +25,7 @@ set dwarf_srcfile "file1.txt"
 if {[prepare_for_testing_full "failed to prepare" \
 	 [list $testfile \
 	      {debug additional_flags=-static additional_flags=-nostdlib} \
-	      main.c -g0 $srcfile nodebug]]} {
+	      main.c -g0 $srcfile {}]]} {
     return
 }
 
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-cu-size.exp b/gdb/testsuite/gdb.dwarf2/dw2-cu-size.exp
index ea3842fe7c0..8e203dfd5f9 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-cu-size.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-cu-size.exp
@@ -25,7 +25,7 @@ require dwarf2_support
 standard_testfile .S
 
 if {[prepare_for_testing_full "failed to prepare" \
-	 [list $testfile debug main.c debug $srcfile nodebug]]} {
+	 [list $testfile debug main.c debug $srcfile {}]]} {
     return
 }
 
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-double-set-die-type.exp b/gdb/testsuite/gdb.dwarf2/dw2-double-set-die-type.exp
index bd36d62a5d3..b381708fcac 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-double-set-die-type.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-double-set-die-type.exp
@@ -23,7 +23,7 @@ require dwarf2_support
 standard_testfile .S
 
 if  { [gdb_compile [file join $srcdir $subdir $srcfile] $binfile \
-	   object {nodebug}] != "" } {
+	   object {}] != "" } {
     return
 }
 
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-empty-namespace.exp b/gdb/testsuite/gdb.dwarf2/dw2-empty-namespace.exp
index 7b7dd946c00..4f5ee42e2c7 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-empty-namespace.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-empty-namespace.exp
@@ -22,7 +22,7 @@ require dwarf2_support
 standard_testfile .S
 
 if  { [gdb_compile "${srcdir}/${subdir}/${srcfile}" $binfile \
-	   object {nodebug}] != "" } {
+	   object {}] != "" } {
     return
 }
 
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-filename.exp b/gdb/testsuite/gdb.dwarf2/dw2-filename.exp
index 953ad7d8eb5..56114103f9a 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-filename.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-filename.exp
@@ -22,7 +22,7 @@ require dwarf2_support
 standard_testfile .S
 set dwarf_srcfile "file1.txt"
 
-if  { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" object {nodebug}] != "" } {
+if  { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" object {}] != "" } {
     return
 }
 
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-inheritance.exp b/gdb/testsuite/gdb.dwarf2/dw2-inheritance.exp
index a65a0e702bb..5948a8b23fe 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-inheritance.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-inheritance.exp
@@ -23,7 +23,7 @@ require dwarf2_support
 standard_testfile .S
 
 if  { [gdb_compile "${srcdir}/${subdir}/${srcfile}" $binfile \
-	   object {nodebug}] != "" } {
+	   object {}] != "" } {
     return
 }
 
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-intercu.exp b/gdb/testsuite/gdb.dwarf2/dw2-intercu.exp
index 99c7cf8c111..c8b70f6ab75 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-intercu.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-intercu.exp
@@ -23,7 +23,7 @@ standard_testfile .S
 set dwarf_srcfile "file1.txt"
 
 if {[prepare_for_testing_full "failed to prepare" \
-	 [list $testfile debug main.c debug $srcfile nodebug]]} {
+	 [list $testfile debug main.c debug $srcfile {}]]} {
     return
 }
 
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-intermix.exp b/gdb/testsuite/gdb.dwarf2/dw2-intermix.exp
index c94a49f466b..586ab505729 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-intermix.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-intermix.exp
@@ -23,7 +23,7 @@ standard_testfile .S
 set dwarf_srcfile "file1.txt"
 
 if {[prepare_for_testing_full "failed to prepare" \
-	 [list $testfile debug main.c debug $srcfile nodebug]]} {
+	 [list $testfile debug main.c debug $srcfile {}]]} {
     return
 }
 
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-linkage-name-trust.exp b/gdb/testsuite/gdb.dwarf2/dw2-linkage-name-trust.exp
index e45ca986c15..15bb0f704cd 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-linkage-name-trust.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-linkage-name-trust.exp
@@ -27,7 +27,9 @@ standard_testfile .S
 set executable ${testfile}
 
 if {[prepare_for_testing_full "failed to prepare" \
-	 [list $testfile c++ $testfile-main.cc {c++ nodebug} \
+	 [list \
+	      $testfile c++ \
+	      $testfile-main.cc {c++} \
 	      $srcfile {}]]} {
     return
 }
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-op-stack-value.exp b/gdb/testsuite/gdb.dwarf2/dw2-op-stack-value.exp
index 0aa06852ac3..1be9c46d98b 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-op-stack-value.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-op-stack-value.exp
@@ -23,7 +23,7 @@ set additional_flags [gdb_target_symbol_prefix_flags_asm]
 standard_testfile .S
 
 if  { [gdb_compile "${srcdir}/${subdir}/${srcfile}" $binfile \
-	   object {nodebug}] != "" } {
+	   object {}] != "" } {
     return
 }
 
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-producer.exp b/gdb/testsuite/gdb.dwarf2/dw2-producer.exp
index 8f50ab7b9c2..18ada98510e 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-producer.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-producer.exp
@@ -21,7 +21,7 @@ standard_testfile .S
 set dwarf_srcfile "file1.txt"
 
 if {[prepare_for_testing_full "failed to prepare" \
-	 [list $testfile debug main.c debug $srcfile nodebug]]} {
+	 [list $testfile debug main.c debug $srcfile {}]]} {
     return
 }
 
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-ref-missing-frame.exp b/gdb/testsuite/gdb.dwarf2/dw2-ref-missing-frame.exp
index 0ff1865da71..81a0f2fb45d 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-ref-missing-frame.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-ref-missing-frame.exp
@@ -41,8 +41,8 @@ set executable ${testfile}
 
 if { [prepare_for_testing_full "failed to prepare" \
 	  [list $testfile {} \
-	       $srcfile [concat $flags {nodebug}]  \
-	       $srcfile2 {nodebug} \
+	       $srcfile [concat $flags {}]  \
+	       $srcfile2 {} \
 	       $srcfile3 {debug}]] == -1 } {
     return
 }
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-strp.exp b/gdb/testsuite/gdb.dwarf2/dw2-strp.exp
index 991c6323197..d839850476f 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-strp.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-strp.exp
@@ -72,7 +72,7 @@ Dwarf::assemble $asm_file {
 }
 
 if {[prepare_for_testing_full "failed to prepare" \
-	 [list $testfile debug $srcfile nodebug $asm_file nodebug]]} {
+	 [list $testfile debug $srcfile {} $asm_file {}]]} {
     return
 }
 
diff --git a/gdb/testsuite/gdb.dwarf2/dwz-many.exp b/gdb/testsuite/gdb.dwarf2/dwz-many.exp
index f11fd54c590..9a8c1c8af18 100644
--- a/gdb/testsuite/gdb.dwarf2/dwz-many.exp
+++ b/gdb/testsuite/gdb.dwarf2/dwz-many.exp
@@ -39,8 +39,8 @@ Dwarf::assemble $asm_file {
 if {[prepare_for_testing_full "failed to prepare" \
 	 [list \
 	      $testfile {debug} \
-	      $srcfile {nodebug} \
-	      $asm_file {nodebug} \
+	      $srcfile {} \
+	      $asm_file {} \
 	      $srcfile3 {debug}]]} {
     return
 }
diff --git a/gdb/testsuite/gdb.dwarf2/dwzbuildid.tcl b/gdb/testsuite/gdb.dwarf2/dwzbuildid.tcl
index 84e0c9f7669..2308ab67acf 100644
--- a/gdb/testsuite/gdb.dwarf2/dwzbuildid.tcl
+++ b/gdb/testsuite/gdb.dwarf2/dwzbuildid.tcl
@@ -101,7 +101,7 @@ proc write_dwarf_file {filename buildid {value 99}} {
 }
 
 if  { [gdb_compile ${srcdir}/${subdir}/${srcfile} ${binfile}1.o \
-	   object {nodebug}] != "" } {
+	   object {}] != "" } {
     return -1
 }
 
@@ -136,7 +136,7 @@ write_dwarf_file $srcfile8 $ok_buildid2
 # Compile everything.
 for {set i 2} {$i <= 8} {incr i} {
     if {[gdb_compile [standard_output_file [set srcfile$i]] \
-	     ${binfile}$i.o object nodebug] != ""} {
+	     ${binfile}$i.o object {}] != ""} {
 	return -1
     }
 }
diff --git a/gdb/testsuite/gdb.dwarf2/fission-absolute-dwo.exp b/gdb/testsuite/gdb.dwarf2/fission-absolute-dwo.exp
index e173e728a10..defa9aa5f13 100644
--- a/gdb/testsuite/gdb.dwarf2/fission-absolute-dwo.exp
+++ b/gdb/testsuite/gdb.dwarf2/fission-absolute-dwo.exp
@@ -108,8 +108,8 @@ Dwarf::assemble $asm_file {
 # ASM_FILE we split out the debug information into the dwo file.
 set object_file [standard_output_file ${testfile}.o]
 if { [build_executable_and_dwo_files "${testfile}.exp" ${binfile} {nodebug} \
-	  [list $asm_file {nodebug split-dwo} ${object_file}] \
-	  [list $srcfile {nodebug}]] } {
+	  [list $asm_file {split-dwo} ${object_file}] \
+	  [list $srcfile {}]] } {
     return
 }
 
diff --git a/gdb/testsuite/gdb.dwarf2/fission-base.exp b/gdb/testsuite/gdb.dwarf2/fission-base.exp
index 28507eac9ba..e1116162666 100644
--- a/gdb/testsuite/gdb.dwarf2/fission-base.exp
+++ b/gdb/testsuite/gdb.dwarf2/fission-base.exp
@@ -30,7 +30,7 @@ set obj [standard_output_file "${testfile}.o"]
 set dwo [standard_output_file "${testfile}.dwo"]
 if {[build_executable_and_dwo_files "$testfile.exp" "${binfile}" {nodebug} \
 	 [list $srcfile \
-	      [list nodebug split-dwo additional_flags=-DDWO=\"$dwo\"] \
+	      [list split-dwo additional_flags=-DDWO=\"$dwo\"] \
 	      $obj]]} {
     return
 }
diff --git a/gdb/testsuite/gdb.dwarf2/fission-call.exp b/gdb/testsuite/gdb.dwarf2/fission-call.exp
index af62fc20fbb..f7cfb6296e8 100644
--- a/gdb/testsuite/gdb.dwarf2/fission-call.exp
+++ b/gdb/testsuite/gdb.dwarf2/fission-call.exp
@@ -108,8 +108,8 @@ Dwarf::assemble $asm_file {
 
 set obj [standard_output_file "${testfile}-dw.o"]
 if {[build_executable_and_dwo_files "$testfile.exp" "${binfile}" {} \
-	 [list $asm_file {nodebug split-dwo} $obj] \
-	 [list $srcfile  {nodebug}]]} {
+	 [list $asm_file {split-dwo} $obj] \
+	 [list $srcfile {}]]} {
     return
 }
 
diff --git a/gdb/testsuite/gdb.dwarf2/fission-dw-form-strx.exp b/gdb/testsuite/gdb.dwarf2/fission-dw-form-strx.exp
index 38c77084e58..956c13ec602 100644
--- a/gdb/testsuite/gdb.dwarf2/fission-dw-form-strx.exp
+++ b/gdb/testsuite/gdb.dwarf2/fission-dw-form-strx.exp
@@ -76,8 +76,8 @@ Dwarf::assemble $asm_file {
 # Build the executable and extract the .dwo file using objcopy.
 set obj [standard_output_file "${testfile}-dw.o"]
 if {[build_executable_and_dwo_files "$testfile.exp" "${binfile}" {nodebug} \
-	 [list $asm_file [list nodebug split-dwo] $obj] \
-	 [list $srcfile  [list nodebug]]]} {
+	 [list $asm_file {split-dwo} $obj] \
+	 [list $srcfile {}]]} {
     return
 }
 
diff --git a/gdb/testsuite/gdb.dwarf2/fission-loclists-pie.exp b/gdb/testsuite/gdb.dwarf2/fission-loclists-pie.exp
index 04072731754..b7dffcfa6f9 100644
--- a/gdb/testsuite/gdb.dwarf2/fission-loclists-pie.exp
+++ b/gdb/testsuite/gdb.dwarf2/fission-loclists-pie.exp
@@ -36,7 +36,7 @@ set dwo [standard_output_file "${testfile}.dwo"]
 if {[build_executable_and_dwo_files "$testfile.exp" "${binfile}" \
 	 {nodebug pie} \
 	 [list $srcfile \
-	      [list nodebug split-dwo additional_flags=-DDWO=\"$dwo\"] \
+	      [list split-dwo additional_flags=-DDWO=\"$dwo\"] \
 	      $obj]]} {
     return
 }
diff --git a/gdb/testsuite/gdb.dwarf2/fission-loclists.exp b/gdb/testsuite/gdb.dwarf2/fission-loclists.exp
index 6747192b164..9f660edbb66 100644
--- a/gdb/testsuite/gdb.dwarf2/fission-loclists.exp
+++ b/gdb/testsuite/gdb.dwarf2/fission-loclists.exp
@@ -30,7 +30,7 @@ set obj [standard_output_file "${testfile}.o"]
 set dwo [standard_output_file "${testfile}.dwo"]
 if {[build_executable_and_dwo_files "$testfile.exp" "${binfile}" {nodebug} \
 	 [list $srcfile \
-	      [list nodebug split-dwo additional_flags=-DDWO=\"$dwo\"] \
+	      [list split-dwo additional_flags=-DDWO=\"$dwo\"] \
 	      $obj]]} {
     return
 }
diff --git a/gdb/testsuite/gdb.dwarf2/fission-multi-cu.exp b/gdb/testsuite/gdb.dwarf2/fission-multi-cu.exp
index 0621069174b..7fbee80ea80 100644
--- a/gdb/testsuite/gdb.dwarf2/fission-multi-cu.exp
+++ b/gdb/testsuite/gdb.dwarf2/fission-multi-cu.exp
@@ -197,9 +197,9 @@ Dwarf::assemble $asm_file_2 {
 set obj1 [standard_output_file "${testfile}-1-dw.o"]
 set obj2 [standard_output_file "${testfile}-2-dw.o"]
 if {[build_executable_and_dwo_files "$testfile.exp" "${binfile}" {nodebug} \
-	 [list $asm_file_1 [list nodebug split-dwo] $obj1] \
-	 [list $asm_file_2 [list nodebug split-dwo] $obj2] \
-	 [list $srcfile  [list nodebug]]]} {
+	 [list $asm_file_1 {split-dwo} $obj1] \
+	 [list $asm_file_2 {split-dwo} $obj2] \
+	 [list $srcfile {}]]} {
     return
 }
 
diff --git a/gdb/testsuite/gdb.dwarf2/fission-relative-dwo.exp b/gdb/testsuite/gdb.dwarf2/fission-relative-dwo.exp
index 6fe3e0b216b..b7a1072102b 100644
--- a/gdb/testsuite/gdb.dwarf2/fission-relative-dwo.exp
+++ b/gdb/testsuite/gdb.dwarf2/fission-relative-dwo.exp
@@ -105,8 +105,8 @@ Dwarf::assemble $asm_file {
 # ASM_FILE we split out the debug information into the dwo file.
 set object_file [standard_output_file ${testfile}.o]
 if { [build_executable_and_dwo_files "${testfile}.exp" ${testfile} {nodebug} \
-	  [list $asm_file {nodebug split-dwo} ${object_file}] \
-	  [list $srcfile {nodebug}]] } {
+	  [list $asm_file {split-dwo} ${object_file}] \
+	  [list $srcfile {}]] } {
     return
 }
 
diff --git a/gdb/testsuite/gdb.dwarf2/fission-reread.exp b/gdb/testsuite/gdb.dwarf2/fission-reread.exp
index 7fa70bcafe9..80cf179a538 100644
--- a/gdb/testsuite/gdb.dwarf2/fission-reread.exp
+++ b/gdb/testsuite/gdb.dwarf2/fission-reread.exp
@@ -29,16 +29,19 @@ standard_testfile .S
 set obj [standard_output_file "${testfile}.o"]
 set dwo [standard_output_file "${testfile}.dwo"]
 
-set options [list nodebug]
+set exec_options {}
 if { $additional_flags != "" } {
-    lappend options $additional_flags
+    lappend exec_options $additional_flags
 }
 
-set dwo_options $options
+set dwo_options {}
+if { $additional_flags != "" } {
+    lappend dwo_options $additional_flags
+}
 lappend dwo_options split-dwo
 lappend dwo_options additional_flags=-DDWO=\"$dwo\"
 
-if {[build_executable_and_dwo_files "$testfile.exp" "${binfile}" $options \
+if {[build_executable_and_dwo_files "$testfile.exp" "${binfile}" $exec_options \
 	 [list $srcfile $dwo_options $obj]]} {
     return
 }
diff --git a/gdb/testsuite/gdb.dwarf2/fission-type-unit-locexpr.exp b/gdb/testsuite/gdb.dwarf2/fission-type-unit-locexpr.exp
index 47fc2fbd1de..be5ce727df0 100644
--- a/gdb/testsuite/gdb.dwarf2/fission-type-unit-locexpr.exp
+++ b/gdb/testsuite/gdb.dwarf2/fission-type-unit-locexpr.exp
@@ -145,8 +145,8 @@ Dwarf::assemble $asm_file {
 
 set object_file [standard_output_file ${testfile}.o]
 if { [build_executable_and_dwo_files "${testfile}.exp" ${binfile} {nodebug} \
-	  [list $asm_file {nodebug split-dwo} ${object_file}] \
-	  [list $srcfile {nodebug}]] } {
+	  [list $asm_file {split-dwo} ${object_file}] \
+	  [list $srcfile {}]] } {
     return
 }
 
diff --git a/gdb/testsuite/gdb.dwarf2/fission-with-type-unit.exp b/gdb/testsuite/gdb.dwarf2/fission-with-type-unit.exp
index 27927d7cc6c..858265b3afa 100644
--- a/gdb/testsuite/gdb.dwarf2/fission-with-type-unit.exp
+++ b/gdb/testsuite/gdb.dwarf2/fission-with-type-unit.exp
@@ -78,8 +78,8 @@ Dwarf::assemble $asm_file {
 
 set obj [standard_output_file "${testfile}-dw.o"]
 if {[build_executable_and_dwo_files "$testfile.exp" "${binfile}" {} \
-	 [list $asm_file {nodebug split-dwo} $obj] \
-	 [list $srcfile  {nodebug}]]} {
+	 [list $asm_file {split-dwo} $obj] \
+	 [list $srcfile {}]]} {
     return
 }
 
diff --git a/gdb/testsuite/gdb.dwarf2/gdb-index-skeletonless-tu.exp b/gdb/testsuite/gdb.dwarf2/gdb-index-skeletonless-tu.exp
index 31a45e224ca..1bd2a6981e5 100644
--- a/gdb/testsuite/gdb.dwarf2/gdb-index-skeletonless-tu.exp
+++ b/gdb/testsuite/gdb.dwarf2/gdb-index-skeletonless-tu.exp
@@ -78,8 +78,8 @@ Dwarf::assemble $asm_file {
 
 set obj [standard_output_file "${testfile}-dw.o"]
 if {[build_executable_and_dwo_files "$testfile.exp" "${binfile}" {} \
-	 [list $asm_file {nodebug split-dwo} $obj] \
-	 [list $srcfile  {nodebug}]]} {
+	 [list $asm_file {split-dwo} $obj] \
+	 [list $srcfile {}]]} {
     return
 }
 
diff --git a/gdb/testsuite/gdb.dwarf2/mac-fileno.exp b/gdb/testsuite/gdb.dwarf2/mac-fileno.exp
index 0e9a4988059..3b36e9509b1 100644
--- a/gdb/testsuite/gdb.dwarf2/mac-fileno.exp
+++ b/gdb/testsuite/gdb.dwarf2/mac-fileno.exp
@@ -24,7 +24,7 @@ standard_testfile .S
 set dwarf_srcfile "file1.txt"
 
 if {[prepare_for_testing_full "failed to prepare" \
-	 [list $testfile debug main.c debug $srcfile nodebug]]} {
+	 [list $testfile debug main.c debug $srcfile {}]]} {
     return
 }
 
diff --git a/gdb/testsuite/gdb.dwarf2/struct-with-sig-2.exp b/gdb/testsuite/gdb.dwarf2/struct-with-sig-2.exp
index 5c9f27149af..82ced20d162 100644
--- a/gdb/testsuite/gdb.dwarf2/struct-with-sig-2.exp
+++ b/gdb/testsuite/gdb.dwarf2/struct-with-sig-2.exp
@@ -75,7 +75,7 @@ Dwarf::assemble [list filename $asm_file add_dummy_cus 0] {
 # We're using an object instead of executable here to keep cc-with-tweaks.sh
 # from modifying it.  It also means we can set the build-id, rather than
 # having to extract it.
-if { [gdb_compile $asm_file $binfile.dwz object {nodebug}] != "" } {
+if { [gdb_compile $asm_file $binfile.dwz object {}] != "" } {
     return
 }
 
diff --git a/gdb/testsuite/gdb.fortran/call-no-debug.exp b/gdb/testsuite/gdb.fortran/call-no-debug.exp
index 6ddcf10e411..e85cabe6d12 100644
--- a/gdb/testsuite/gdb.fortran/call-no-debug.exp
+++ b/gdb/testsuite/gdb.fortran/call-no-debug.exp
@@ -22,9 +22,9 @@ standard_testfile call-no-debug-prog.f90 call-no-debug-func.f90
 load_lib fortran.exp
 
 if {[prepare_for_testing_full "failed to prepare" \
-	 [list $testfile [list debug f90] \
-	      $srcfile [list debug f90] \
-	      $srcfile2 [list nodebug f90]]]} {
+	 [list $testfile {debug f90} \
+	      $srcfile {debug f90} \
+	      $srcfile2 {f90}]]} {
     return
 }
 
diff --git a/gdb/testsuite/gdb.linespec/break-asm-file.exp b/gdb/testsuite/gdb.linespec/break-asm-file.exp
index c6ae8dea7be..6b86dd5b4cd 100644
--- a/gdb/testsuite/gdb.linespec/break-asm-file.exp
+++ b/gdb/testsuite/gdb.linespec/break-asm-file.exp
@@ -33,11 +33,11 @@ if  {[gdb_compile ${srcdir}/${subdir}/${srcfile} ${binfile}1.o \
 
 # Compile .s files without debug information.
 if  {[gdb_compile ${srcdir}/${subdir}/$asm_file0 ${binfile}2.o \
-	  object {nodebug}] != ""} {
+	  object {}] != ""} {
     return
 }
 if  {[gdb_compile ${srcdir}/${subdir}/$asm_file1 ${binfile}3.o \
-	  object {nodebug}] != ""} {
+	  object {}] != ""} {
     return
 }
 
diff --git a/gdb/testsuite/gdb.trace/entry-values.exp b/gdb/testsuite/gdb.trace/entry-values.exp
index 405f0d7e519..251acc10bfe 100644
--- a/gdb/testsuite/gdb.trace/entry-values.exp
+++ b/gdb/testsuite/gdb.trace/entry-values.exp
@@ -20,7 +20,7 @@ require dwarf2_support
 standard_testfile .c entry-values-dw.S
 
 if  {[gdb_compile ${srcdir}/${subdir}/${srcfile} ${binfile}1.o \
-	  object {nodebug}] != ""} {
+	  object {}] != ""} {
     return
 }
 
@@ -154,7 +154,7 @@ Dwarf::assemble $asm_file {
     }
 }
 
-if  {[gdb_compile $asm_file ${binfile}2.o object {nodebug}] != ""} {
+if  {[gdb_compile $asm_file ${binfile}2.o object {}] != ""} {
     return
 }
 
diff --git a/gdb/testsuite/gdb.trace/unavailable-dwarf-piece.exp b/gdb/testsuite/gdb.trace/unavailable-dwarf-piece.exp
index ee8fb5d52a2..f85f7b19c34 100644
--- a/gdb/testsuite/gdb.trace/unavailable-dwarf-piece.exp
+++ b/gdb/testsuite/gdb.trace/unavailable-dwarf-piece.exp
@@ -24,7 +24,7 @@ set asm_file [standard_output_file $srcfile2]
 set opts {}
 
 if  { [gdb_compile ${srcdir}/${subdir}/${srcfile} ${binfile}1.o \
-	   object {nodebug}] != "" } {
+	   object {}] != "" } {
     return
 }
 
@@ -283,7 +283,7 @@ Dwarf::assemble $asm_file {
     }
 }
 
-if  { [gdb_compile ${asm_file} ${binfile}2.o object {nodebug}] != "" } {
+if  { [gdb_compile ${asm_file} ${binfile}2.o object {}] != "" } {
     return
 }
 
diff --git a/gdb/testsuite/gdb.tui/resize-3.exp b/gdb/testsuite/gdb.tui/resize-3.exp
index fdaffe00641..0b164b10a86 100644
--- a/gdb/testsuite/gdb.tui/resize-3.exp
+++ b/gdb/testsuite/gdb.tui/resize-3.exp
@@ -22,7 +22,7 @@ standard_testfile -main.c -foo.c
 if { [build_executable_from_specs "failed to prepare" \
 	  $testfile {debug} \
 	  $srcfile {debug} \
-	  $srcfile2 {nodebug}] == -1 } {
+	  $srcfile2 {}] == -1 } {
     return
 }
 
-- 
2.54.0
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.