[PATCH 5/7] gdb/testsuite: Rename nodebug => symtab

Pedro Alves <[email protected]>
Newsgroups gmane.comp.gdb.patches
Message-ID <[email protected]>
lld-link, used by windows-msvc targets, does not emit the COFF symbol
table by default, so testcases that don't pass the "debug" option,
such as gdb.base/nodebug.exp, fail to even run to main, as no COFF
symbol table means no minsyms.

The lld-link's -debug:dwarf option, which we pass when testcases ask
for debug, forces a COFF symbol table, but plain -debug, or -debug:pdb
does not.  There's a -debug:symtab option that lets us explicitly ask
for it, which can be combined with either -debug:dwarf or -debug:pdb,
in any order.

At first, I thought of fixing this by making gdb_compile always add
-debug:symtab to every program.  But then, when we get to testing with
PDB support in the future, that would result in us testing against
binaries that have both minsyms and PDB, while that is not what
regular users get by default.  So then, it would be better to only add
-debug:symtab if "debug" is not in the options.  But then, what if
some testcase _does_ want to test the combination of PDB and COFF
symbol tables?

So I thought that instead I'd add a new "symtab" option to gdb_compile
that makes us add -Wl,-debug:symtab to the ldflags, and pass that
"symtab" option down in testcases that truly want to debug a program
with a symbol table.  Passing both "symtab debug" would then mean that
you want both symbol table and debug info.

However, while looking around, I realized that the nodebug flag
already has that meaning, and is already passed down by many (but not
all, see [1] below]) testcases that test with no debug info, even
though the option is a no-op on all targets (except AIX, see below).
It has that meaning because to debug a program with no debug info, you
need the minsyms to be able to run to main.

[1] - about 200 use nodebug, 100 don't (fixed in the next patch)

Note how the only check for "nodebug" in the testsuite's machinery is
this AIX check 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"
    }

... which talks about minsyms specifically, i.e., XCOFF symbol table.

nodebug isn't actually documented anywhere, particularly not in
gdb_compile.  A grep for nodebug in the DejaGnu sources also finds no
hit there.  IMHO, it's confusing for 'nodebug' to exist when 'no debug
option at all' means the same, so I propose renaming nodebug to
symtab, repurposing it to really mean "ensure symbol table / minsyms",
and documenting it.

So this commit renames the option from "nodebug" to "symtab", and
adjusts all testcases throughout.

Curiously, gdb.base/nodebug.exp, the "canonical" minsyms-only no-debug
testcase is missing that option.  But I'll leave adding it to a
separate patch, to keep this one strictly about the rename.

Change-Id: I73b8a3e87eb35d62e4e530e843dc252f90d43c17
---
 gdb/testsuite/gdb.arch/aarch64-prologue.exp       |  2 +-
 gdb/testsuite/gdb.arch/aarch64-w-registers.exp    |  2 +-
 .../gdb.arch/amd64-extended-prologue-analysis.exp | 15 ++++++---------
 gdb/testsuite/gdb.arch/i386-cfi-notcurrent.exp    |  2 +-
 gdb/testsuite/gdb.arch/ppc64-break-on-_exit.exp   |  4 ++--
 .../riscv64-unwind-prologue-with-c_li.exp         |  2 +-
 .../riscv64-unwind-prologue-with-ld-lw.exp        |  2 +-
 .../gdb.arch/riscv64-unwind-prologue-with-mv.exp  |  2 +-
 gdb/testsuite/gdb.arch/skip-prologue.exp          |  2 +-
 gdb/testsuite/gdb.base/cast-indirection.exp       |  2 +-
 gdb/testsuite/gdb.base/disasm-optim.exp           |  2 +-
 gdb/testsuite/gdb.base/list-dot-nodebug.exp       |  2 +-
 gdb/testsuite/gdb.base/rtld-step-nodebugsym.exp   |  2 +-
 gdb/testsuite/gdb.base/stap-probe.exp             |  2 +-
 gdb/testsuite/gdb.base/step-symless.exp           |  2 +-
 gdb/testsuite/gdb.base/tailcall-msym.exp          |  2 +-
 gdb/testsuite/gdb.base/until-nodebug.exp          |  2 +-
 gdb/testsuite/gdb.base/until-trailing-insns.exp   |  2 +-
 gdb/testsuite/gdb.compile/compile-ops.exp         |  2 +-
 gdb/testsuite/gdb.cp/call-method-register.exp     |  2 +-
 gdb/testsuite/gdb.cp/incomplete-type-overload.exp |  2 +-
 gdb/testsuite/gdb.cp/infcall-nodebug-c++-d0.exp   |  2 +-
 gdb/testsuite/gdb.cp/infcall-nodebug-c-d0.exp     |  2 +-
 gdb/testsuite/gdb.cp/namelessclass.exp            |  2 +-
 .../gdb.debuginfod/fetch_src_and_symbols.exp      |  4 ++--
 gdb/testsuite/gdb.dlang/circular.exp              |  2 +-
 gdb/testsuite/gdb.dlang/dlang-start-2.exp         |  2 +-
 gdb/testsuite/gdb.dlang/watch-loc.exp             |  2 +-
 .../DW_OP_piece_with_DW_OP_GNU_uninit.exp         |  2 +-
 gdb/testsuite/gdb.dwarf2/ada-array-bound.exp      |  2 +-
 gdb/testsuite/gdb.dwarf2/ada-artificial-field.exp |  2 +-
 gdb/testsuite/gdb.dwarf2/ada-cold-name.exp        |  2 +-
 gdb/testsuite/gdb.dwarf2/ada-linkage-name.exp     |  2 +-
 gdb/testsuite/gdb.dwarf2/ada-thick-pointer.exp    |  2 +-
 gdb/testsuite/gdb.dwarf2/ada-valprint-error.exp   |  2 +-
 gdb/testsuite/gdb.dwarf2/ada-var-in-module.exp    |  2 +-
 gdb/testsuite/gdb.dwarf2/arr-opt-out.exp          |  2 +-
 gdb/testsuite/gdb.dwarf2/arr-stride-dyn.exp       |  2 +-
 gdb/testsuite/gdb.dwarf2/arr-stride.exp           |  2 +-
 gdb/testsuite/gdb.dwarf2/arr-subrange.exp         |  2 +-
 .../assign-variable-value-to-register.exp         |  2 +-
 gdb/testsuite/gdb.dwarf2/atomic-type.exp          |  2 +-
 .../gdb.dwarf2/backward-spec-inter-cu.exp         |  2 +-
 gdb/testsuite/gdb.dwarf2/bad-regnum.exp           |  2 +-
 gdb/testsuite/gdb.dwarf2/builtin-type-copy.exp    |  2 +-
 gdb/testsuite/gdb.dwarf2/calling-convention.exp   |  2 +-
 gdb/testsuite/gdb.dwarf2/clang-cli-macro.exp      |  2 +-
 gdb/testsuite/gdb.dwarf2/clztest.exp              |  2 +-
 gdb/testsuite/gdb.dwarf2/comp-unit-lang.exp       |  2 +-
 .../gdb.dwarf2/complex-partial-optimized.exp      |  2 +-
 gdb/testsuite/gdb.dwarf2/corrupt.exp              |  2 +-
 gdb/testsuite/gdb.dwarf2/count.exp                |  2 +-
 gdb/testsuite/gdb.dwarf2/cpp-linkage-name.exp     |  2 +-
 gdb/testsuite/gdb.dwarf2/cu-empty-name.exp        |  2 +-
 gdb/testsuite/gdb.dwarf2/cu-no-addrs.exp          |  2 +-
 gdb/testsuite/gdb.dwarf2/data-loc-cast.exp        |  2 +-
 gdb/testsuite/gdb.dwarf2/data-loc.exp             |  2 +-
 .../debug-aranges-duplicate-offset-warning.exp    |  2 +-
 gdb/testsuite/gdb.dwarf2/debug-frame-no-cfa.exp   |  2 +-
 gdb/testsuite/gdb.dwarf2/debug-frame.exp          |  2 +-
 .../dw-form-ref-addr-with-type-units.exp          |  2 +-
 gdb/testsuite/gdb.dwarf2/dw-form-strx.exp.tcl     |  4 ++--
 gdb/testsuite/gdb.dwarf2/dw2-abs-hi-pc.exp        |  2 +-
 gdb/testsuite/gdb.dwarf2/dw2-align.exp            |  2 +-
 .../gdb.dwarf2/dw2-bad-abstract-origin.exp        |  2 +-
 gdb/testsuite/gdb.dwarf2/dw2-bad-elf.exp          |  2 +-
 .../gdb.dwarf2/dw2-bad-mips-linkage-name.exp      |  2 +-
 gdb/testsuite/gdb.dwarf2/dw2-bad-unresolved.exp   |  2 +-
 gdb/testsuite/gdb.dwarf2/dw2-bfloat16.exp         |  2 +-
 .../gdb.dwarf2/dw2-canonicalize-type.exp          |  2 +-
 gdb/testsuite/gdb.dwarf2/dw2-case-insensitive.exp |  2 +-
 gdb/testsuite/gdb.dwarf2/dw2-common-block.exp     |  2 +-
 gdb/testsuite/gdb.dwarf2/dw2-const.exp            |  2 +-
 .../gdb.dwarf2/dw2-disasm-over-non-stmt.exp       |  2 +-
 gdb/testsuite/gdb.dwarf2/dw2-dup-frame.exp        |  2 +-
 gdb/testsuite/gdb.dwarf2/dw2-empty-file-name.exp  |  2 +-
 .../gdb.dwarf2/dw2-empty-inline-low-high.exp      |  2 +-
 .../gdb.dwarf2/dw2-empty-inline-ranges.exp        |  2 +-
 gdb/testsuite/gdb.dwarf2/dw2-entry-pc.exp         |  2 +-
 gdb/testsuite/gdb.dwarf2/dw2-entry-points.exp     |  2 +-
 gdb/testsuite/gdb.dwarf2/dw2-entry-value-2.exp    |  2 +-
 gdb/testsuite/gdb.dwarf2/dw2-entry-value.exp      |  2 +-
 .../gdb.dwarf2/dw2-epilogue-begin.exp.tcl         |  2 +-
 gdb/testsuite/gdb.dwarf2/dw2-error.exp            |  2 +-
 .../gdb.dwarf2/dw2-extend-inline-block.exp        |  2 +-
 gdb/testsuite/gdb.dwarf2/dw2-fixed-point.exp      |  2 +-
 gdb/testsuite/gdb.dwarf2/dw2-gas-workaround.exp   |  4 ++--
 gdb/testsuite/gdb.dwarf2/dw2-icc-opaque.exp       |  2 +-
 gdb/testsuite/gdb.dwarf2/dw2-icycle.exp           |  2 +-
 gdb/testsuite/gdb.dwarf2/dw2-ifort-parameter.exp  |  2 +-
 gdb/testsuite/gdb.dwarf2/dw2-inline-break.exp     |  2 +-
 gdb/testsuite/gdb.dwarf2/dw2-inline-bt.exp        |  2 +-
 gdb/testsuite/gdb.dwarf2/dw2-inline-header-1.exp  |  2 +-
 gdb/testsuite/gdb.dwarf2/dw2-inline-header-2.exp  |  2 +-
 gdb/testsuite/gdb.dwarf2/dw2-inline-header-3.exp  |  2 +-
 .../gdb.dwarf2/dw2-inline-many-frames.exp         |  2 +-
 gdb/testsuite/gdb.dwarf2/dw2-inline-param.exp     |  2 +-
 .../gdb.dwarf2/dw2-inline-small-func.exp          |  2 +-
 gdb/testsuite/gdb.dwarf2/dw2-inline-stepping.exp  |  2 +-
 .../gdb.dwarf2/dw2-inline-with-lexical-scope.exp  |  2 +-
 gdb/testsuite/gdb.dwarf2/dw2-inter-cu-error-2.exp |  2 +-
 gdb/testsuite/gdb.dwarf2/dw2-inter-cu-error.exp   |  2 +-
 .../gdb.dwarf2/dw2-inter-cu-forth-and-back.exp    |  2 +-
 gdb/testsuite/gdb.dwarf2/dw2-inter-cu-symbol.exp  |  2 +-
 gdb/testsuite/gdb.dwarf2/dw2-is-stmt-2.exp        |  2 +-
 gdb/testsuite/gdb.dwarf2/dw2-is-stmt.exp          |  2 +-
 .../gdb.dwarf2/dw2-lexical-block-bare.exp         |  2 +-
 gdb/testsuite/gdb.dwarf2/dw2-line-number-zero.exp |  2 +-
 .../dw2-line-unknown-extended-opcode.exp          |  2 +-
 gdb/testsuite/gdb.dwarf2/dw2-lines.exp            |  2 +-
 .../gdb.dwarf2/dw2-main-no-line-number.exp        |  2 +-
 gdb/testsuite/gdb.dwarf2/dw2-missing-cu-tag.exp   |  2 +-
 .../gdb.dwarf2/dw2-namespaceless-anonymous.exp    |  2 +-
 gdb/testsuite/gdb.dwarf2/dw2-noloc.exp            |  2 +-
 gdb/testsuite/gdb.dwarf2/dw2-op-call.exp          |  2 +-
 gdb/testsuite/gdb.dwarf2/dw2-op-out-param.exp     |  2 +-
 gdb/testsuite/gdb.dwarf2/dw2-opt-structptr.exp    |  2 +-
 .../gdb.dwarf2/dw2-out-of-range-end-of-seq.exp    |  2 +-
 gdb/testsuite/gdb.dwarf2/dw2-param-error.exp      |  2 +-
 gdb/testsuite/gdb.dwarf2/dw2-prologue-end-2.exp   |  2 +-
 gdb/testsuite/gdb.dwarf2/dw2-prologue-end.exp     |  2 +-
 gdb/testsuite/gdb.dwarf2/dw2-ranges-base.exp      |  2 +-
 gdb/testsuite/gdb.dwarf2/dw2-ranges-func.exp      |  2 +-
 gdb/testsuite/gdb.dwarf2/dw2-ranges-overlap.exp   |  2 +-
 .../gdb.dwarf2/dw2-ranges-psym-warning.exp        |  2 +-
 gdb/testsuite/gdb.dwarf2/dw2-ranges-psym.exp      |  2 +-
 gdb/testsuite/gdb.dwarf2/dw2-reg-undefined.exp    |  2 +-
 gdb/testsuite/gdb.dwarf2/dw2-regno-invalid.exp    |  2 +-
 gdb/testsuite/gdb.dwarf2/dw2-restrict.exp         |  2 +-
 .../gdb.dwarf2/dw2-single-line-discriminators.exp |  2 +-
 .../gdb.dwarf2/dw2-skipped-line-entries.exp       |  2 +-
 ...w2-step-between-different-inline-functions.exp |  2 +-
 .../dw2-step-between-inline-func-blocks.exp       |  2 +-
 .../dw2-step-out-of-function-no-stmt.exp          |  2 +-
 .../gdb.dwarf2/dw2-undefined-ret-addr.exp         |  2 +-
 .../gdb.dwarf2/dw2-unexpected-entry-pc.exp        |  2 +-
 gdb/testsuite/gdb.dwarf2/dw2-unresolved.exp       |  2 +-
 .../gdb.dwarf2/dw2-unusual-field-names.exp        |  2 +-
 gdb/testsuite/gdb.dwarf2/dw2-using-debug-str.exp  |  2 +-
 gdb/testsuite/gdb.dwarf2/dw2-var-zero-addr.exp    |  2 +-
 .../gdb.dwarf2/dw2-vendor-extended-opcode.exp     |  2 +-
 gdb/testsuite/gdb.dwarf2/dw2-weird-type-len.exp   |  2 +-
 .../gdb.dwarf2/dw2-wrong-mangled-name.exp         |  2 +-
 gdb/testsuite/gdb.dwarf2/dw2-zero-range.exp       |  2 +-
 gdb/testsuite/gdb.dwarf2/dwz-unused-pu.exp        |  2 +-
 gdb/testsuite/gdb.dwarf2/dwznolink.exp            |  2 +-
 gdb/testsuite/gdb.dwarf2/dyn-type-unallocated.exp |  2 +-
 gdb/testsuite/gdb.dwarf2/dynamic-bit-offset.exp   |  2 +-
 gdb/testsuite/gdb.dwarf2/dynamic-bit-size.exp     |  2 +-
 gdb/testsuite/gdb.dwarf2/dynarr-ptr.exp           |  2 +-
 .../gdb.dwarf2/enqueued-cu-base-addr.exp          |  2 +-
 gdb/testsuite/gdb.dwarf2/enum-type.exp            |  2 +-
 gdb/testsuite/gdb.dwarf2/fission-absolute-dwo.exp |  2 +-
 gdb/testsuite/gdb.dwarf2/fission-base.exp         |  2 +-
 gdb/testsuite/gdb.dwarf2/fission-dw-form-strx.exp |  2 +-
 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     |  2 +-
 gdb/testsuite/gdb.dwarf2/fission-relative-dwo.exp |  2 +-
 .../gdb.dwarf2/fission-type-unit-locexpr.exp      |  2 +-
 gdb/testsuite/gdb.dwarf2/formdata16.exp           |  2 +-
 gdb/testsuite/gdb.dwarf2/fortran-var-string.exp   |  2 +-
 .../gdb.dwarf2/forward-spec-inter-cu.exp          |  2 +-
 gdb/testsuite/gdb.dwarf2/forward-spec.exp         |  2 +-
 gdb/testsuite/gdb.dwarf2/gdb-index-nodebug.exp    |  2 +-
 gdb/testsuite/gdb.dwarf2/implptrconst.exp         |  2 +-
 gdb/testsuite/gdb.dwarf2/implptrpiece.exp         |  2 +-
 .../imported-unit-abstract-const-value.exp        |  2 +-
 gdb/testsuite/gdb.dwarf2/imported-unit-bp.exp.tcl |  2 +-
 gdb/testsuite/gdb.dwarf2/imported-unit-c.exp      |  2 +-
 .../gdb.dwarf2/imported-unit-runto-main.exp       |  2 +-
 gdb/testsuite/gdb.dwarf2/imported-unit.exp        |  2 +-
 .../gdb.dwarf2/info-locals-optimized-out.exp      |  2 +-
 gdb/testsuite/gdb.dwarf2/loc-sec-offset.exp       |  2 +-
 .../gdb.dwarf2/locexpr-data-member-location.exp   |  8 ++++----
 .../gdb.dwarf2/loclists-multiple-cus.exp          |  2 +-
 gdb/testsuite/gdb.dwarf2/loclists-sec-offset.exp  |  2 +-
 gdb/testsuite/gdb.dwarf2/loclists-start-end.exp   |  2 +-
 gdb/testsuite/gdb.dwarf2/macro-complaints.exp     |  2 +-
 .../gdb.dwarf2/macro-source-path.exp.tcl          |  2 +-
 gdb/testsuite/gdb.dwarf2/main-subprogram.exp      |  2 +-
 .../gdb.dwarf2/malformed-line-header.exp          |  2 +-
 gdb/testsuite/gdb.dwarf2/mega-enum.exp            |  2 +-
 gdb/testsuite/gdb.dwarf2/method-ptr.exp           |  2 +-
 gdb/testsuite/gdb.dwarf2/missing-line-table.exp   |  2 +-
 gdb/testsuite/gdb.dwarf2/missing-sig-type.exp     |  2 +-
 .../missing-type-name-for-templates.exp           |  2 +-
 gdb/testsuite/gdb.dwarf2/missing-type-name.exp    |  2 +-
 gdb/testsuite/gdb.dwarf2/nameless-enum.exp        |  2 +-
 .../gdb.dwarf2/negative-data-member-location.exp  |  2 +-
 gdb/testsuite/gdb.dwarf2/nonvar-access.exp        |  2 +-
 gdb/testsuite/gdb.dwarf2/nostaticblock.exp        |  2 +-
 gdb/testsuite/gdb.dwarf2/opaque-type-lookup.exp   |  2 +-
 gdb/testsuite/gdb.dwarf2/opt-out-not-implptr.exp  |  2 +-
 .../gdb.dwarf2/rnglists-multiple-cus.exp          |  2 +-
 gdb/testsuite/gdb.dwarf2/rnglists-sec-offset.exp  |  2 +-
 gdb/testsuite/gdb.dwarf2/rust-enum.exp            |  2 +-
 gdb/testsuite/gdb.dwarf2/shortpiece.exp           |  2 +-
 gdb/testsuite/gdb.dwarf2/static-const-member.exp  |  2 +-
 gdb/testsuite/gdb.dwarf2/static-optimized-out.exp |  2 +-
 gdb/testsuite/gdb.dwarf2/staticvirtual.exp        |  2 +-
 gdb/testsuite/gdb.dwarf2/struct-decl.exp          |  2 +-
 gdb/testsuite/gdb.dwarf2/struct-with-sig-2.exp    |  2 +-
 gdb/testsuite/gdb.dwarf2/struct-with-sig.exp      |  2 +-
 gdb/testsuite/gdb.dwarf2/subrange-enum.exp        |  2 +-
 gdb/testsuite/gdb.dwarf2/subrange.exp             |  2 +-
 .../gdb.dwarf2/symbol_needs_eval_fail.exp         |  2 +-
 .../gdb.dwarf2/symbol_needs_eval_timeout.exp      |  2 +-
 gdb/testsuite/gdb.dwarf2/symtab-producer.exp      |  2 +-
 gdb/testsuite/gdb.dwarf2/symtab-sorting.exp       |  2 +-
 .../template-specification-full-name.exp          |  2 +-
 gdb/testsuite/gdb.dwarf2/trace-crash.exp          |  2 +-
 gdb/testsuite/gdb.dwarf2/typeddwarf.exp           |  2 +-
 gdb/testsuite/gdb.dwarf2/typedef-void-finish.exp  |  2 +-
 gdb/testsuite/gdb.dwarf2/var-access.exp           |  2 +-
 gdb/testsuite/gdb.dwarf2/void-type.exp            |  2 +-
 gdb/testsuite/gdb.dwarf2/watch-notconst.exp       |  2 +-
 gdb/testsuite/gdb.opt/break-on-_exit.exp          |  2 +-
 gdb/testsuite/gdb.perf/skip-prologue.exp          |  2 +-
 gdb/testsuite/gdb.python/make-visualizer.exp      |  2 +-
 gdb/testsuite/gdb.python/py-framefilter.exp       |  2 +-
 gdb/testsuite/gdb.python/py-linetable-empty.exp   |  2 +-
 gdb/testsuite/gdb.python/py-objfile.exp           |  2 +-
 gdb/testsuite/gdb.python/py-sym-artificial.exp    |  2 +-
 gdb/testsuite/gdb.reverse/map-to-same-line.exp    |  2 +-
 .../gdb.rocm/break-kernel-no-debug-info.exp       |  2 +-
 gdb/testsuite/gdb.tui/tailcall-debug.exp          |  2 +-
 gdb/testsuite/gdb.tui/tailcall-msym.exp           |  2 +-
 gdb/testsuite/lib/gdb.exp                         |  6 ++++--
 229 files changed, 244 insertions(+), 245 deletions(-)

diff --git a/gdb/testsuite/gdb.arch/aarch64-prologue.exp b/gdb/testsuite/gdb.arch/aarch64-prologue.exp
index 509fd31e8b4..5f20896f007 100644
--- a/gdb/testsuite/gdb.arch/aarch64-prologue.exp
+++ b/gdb/testsuite/gdb.arch/aarch64-prologue.exp
@@ -18,7 +18,7 @@
 require is_aarch64_target
 
 standard_testfile
-if { [prepare_for_testing "failed to prepare" $testfile $srcfile {nodebug}]} {
+if { [prepare_for_testing "failed to prepare" $testfile $srcfile {symtab}]} {
     return
 }
 
diff --git a/gdb/testsuite/gdb.arch/aarch64-w-registers.exp b/gdb/testsuite/gdb.arch/aarch64-w-registers.exp
index c2685b30201..8e59512fccf 100644
--- a/gdb/testsuite/gdb.arch/aarch64-w-registers.exp
+++ b/gdb/testsuite/gdb.arch/aarch64-w-registers.exp
@@ -19,7 +19,7 @@
 require is_aarch64_target
 
 standard_testfile
-if { [prepare_for_testing "failed to prepare" $testfile $srcfile {nodebug}]} {
+if { [prepare_for_testing "failed to prepare" $testfile $srcfile {symtab}]} {
     return
 }
 
diff --git a/gdb/testsuite/gdb.arch/amd64-extended-prologue-analysis.exp b/gdb/testsuite/gdb.arch/amd64-extended-prologue-analysis.exp
index d511c773dc3..8259a69262e 100644
--- a/gdb/testsuite/gdb.arch/amd64-extended-prologue-analysis.exp
+++ b/gdb/testsuite/gdb.arch/amd64-extended-prologue-analysis.exp
@@ -101,11 +101,8 @@ with_test_prefix "w/o .cfi directives" {
 	} else {
 	    # For at least gcc 11.4/clang 14.0.0 and later, -O1 makes them more
 	    # eager to use registers in the prologue.
-	    #
-	    # At least gcc 11.4 and later by default does not generate full
-	    # debug info, "nodebug" is there for other compilers.
 	    if { [prepare_for_testing "failed to prepare" "$testfile-no-cfi-C" \
-		$srcfile { optimize=-O1 nodebug
+		$srcfile { optimize=-O1 symtab
 		additional_flags=-fno-asynchronous-unwind-tables
 		additional_flags=-fno-omit-frame-pointer}] } {
 		return
@@ -122,7 +119,7 @@ with_test_prefix "w/o .cfi directives" {
 
     with_test_prefix "ASM source" {
 	if { [prepare_for_testing "failed to prepare" "$testfile-no-cfi-S" \
-	    $srcfile2 nodebug ] } {
+	    $srcfile2 symtab ] } {
 	    return
 	}
 
@@ -139,7 +136,7 @@ with_test_prefix "with .cfi directives" {
     with_test_prefix "compiler gen" {
 	if { [prepare_for_testing "failed to prepare" "$testfile-cfi-C" \
 	    $srcfile { optimize=-O1
-	    nodebug additional_flags=-fno-omit-frame-pointer}] } {
+	    symtab additional_flags=-fno-omit-frame-pointer}] } {
 	    return
 	}
 
@@ -153,7 +150,7 @@ with_test_prefix "with .cfi directives" {
 
     with_test_prefix "ASM source" {
 	if { [prepare_for_testing "failed to prepare" "$testfile-cfi-S" \
-	    $srcfile3 nodebug ] } {
+	    $srcfile3 symtab ] } {
 	    return
 	}
 
@@ -177,7 +174,7 @@ with_test_prefix "offset initialization" {
 		"compiler doesn't support -fno-asynchronous-unwind-tables flag"
 	} else {
 	    if { [prepare_for_testing "failed to prepare" "$testfile-offset-C" \
-		$srcfile { optimize=-O1 nodebug
+		$srcfile { optimize=-O1 symtab
 		additional_flags=-fno-asynchronous-unwind-tables
 		additional_flags=-fomit-frame-pointer}] } {
 		return
@@ -194,7 +191,7 @@ with_test_prefix "offset initialization" {
 
     with_test_prefix "ASM source" {
 	if { [prepare_for_testing "failed to prepare" "$testfile-offset-S" \
-	    $srcfile4 nodebug ] } {
+	    $srcfile4 symtab ] } {
 	    return
 	}
 
diff --git a/gdb/testsuite/gdb.arch/i386-cfi-notcurrent.exp b/gdb/testsuite/gdb.arch/i386-cfi-notcurrent.exp
index a340182c1d8..351cb1cd248 100644
--- a/gdb/testsuite/gdb.arch/i386-cfi-notcurrent.exp
+++ b/gdb/testsuite/gdb.arch/i386-cfi-notcurrent.exp
@@ -21,7 +21,7 @@ require is_x86_like_target
 set testfile "i386-cfi-notcurrent"
 set srcfile ${testfile}.S
 
-if {[prepare_for_testing "failed to prepare" ${testfile} ${srcfile} {nodebug}]} {
+if {[prepare_for_testing "failed to prepare" ${testfile} ${srcfile} {symtab}]} {
     return
 }
 
diff --git a/gdb/testsuite/gdb.arch/ppc64-break-on-_exit.exp b/gdb/testsuite/gdb.arch/ppc64-break-on-_exit.exp
index 684fa04213d..543d4ccbfe0 100644
--- a/gdb/testsuite/gdb.arch/ppc64-break-on-_exit.exp
+++ b/gdb/testsuite/gdb.arch/ppc64-break-on-_exit.exp
@@ -21,11 +21,11 @@
 # In particular, we're trying to exercise the instruction analysis
 # functionality of prologue skipping.  If non-minimal symbols are
 # read, then that functionality might not be used because f.i.
-# line-info is used instead.  So, we use nodebug.
+# line-info is used instead.  So, we use compile without 'debug'.
 
 require {istarget "powerpc*"} is_lp64_target
 
-set flags { nodebug }
+set flags { symtab }
 if {[info exists COMPILE]} {
     standard_testfile .c -main.c
     lappend flags optimize=-O2
diff --git a/gdb/testsuite/gdb.arch/riscv64-unwind-prologue-with-c_li.exp b/gdb/testsuite/gdb.arch/riscv64-unwind-prologue-with-c_li.exp
index 495a720ba7c..c269fbcea56 100644
--- a/gdb/testsuite/gdb.arch/riscv64-unwind-prologue-with-c_li.exp
+++ b/gdb/testsuite/gdb.arch/riscv64-unwind-prologue-with-c_li.exp
@@ -22,7 +22,7 @@ require {istarget "riscv64-*-*"}
 standard_testfile .c -foo.s
 
 if {[prepare_for_testing "failed to prepare" $testfile \
-			 "$srcfile $srcfile2"  nodebug]} {
+			 "$srcfile $srcfile2"  symtab]} {
     return
 }
 
diff --git a/gdb/testsuite/gdb.arch/riscv64-unwind-prologue-with-ld-lw.exp b/gdb/testsuite/gdb.arch/riscv64-unwind-prologue-with-ld-lw.exp
index b665dd4f404..32767c5ae13 100644
--- a/gdb/testsuite/gdb.arch/riscv64-unwind-prologue-with-ld-lw.exp
+++ b/gdb/testsuite/gdb.arch/riscv64-unwind-prologue-with-ld-lw.exp
@@ -21,7 +21,7 @@ require {istarget "riscv64-*-*"}
 standard_testfile riscv64-unwind-prologue-with-ld-lw.c \
 		  riscv64-unwind-prologue-with-ld-lw-foo.s
 if {[prepare_for_testing "failed to prepare" $testfile \
-			 "$srcfile $srcfile2"  nodebug]} {
+			 "$srcfile $srcfile2"  symtab]} {
     return
 }
 
diff --git a/gdb/testsuite/gdb.arch/riscv64-unwind-prologue-with-mv.exp b/gdb/testsuite/gdb.arch/riscv64-unwind-prologue-with-mv.exp
index e0f66ac7f9e..cbe8ea2f4c7 100644
--- a/gdb/testsuite/gdb.arch/riscv64-unwind-prologue-with-mv.exp
+++ b/gdb/testsuite/gdb.arch/riscv64-unwind-prologue-with-mv.exp
@@ -20,7 +20,7 @@ require {istarget "riscv64-*-*"}
 
 standard_testfile .c .s
 if {[prepare_for_testing "failed to prepare" $testfile \
-			 "$srcfile $srcfile2"  nodebug]} {
+			 "$srcfile $srcfile2"  symtab]} {
     return
 }
 
diff --git a/gdb/testsuite/gdb.arch/skip-prologue.exp b/gdb/testsuite/gdb.arch/skip-prologue.exp
index c53f86250c8..ee39c693558 100644
--- a/gdb/testsuite/gdb.arch/skip-prologue.exp
+++ b/gdb/testsuite/gdb.arch/skip-prologue.exp
@@ -18,7 +18,7 @@
 standard_testfile
 
 if { [prepare_for_testing "failed to prepare"  $testfile $srcfile \
-	  {nodebug}] } {
+	  {symtab}] } {
     return
 }
 
diff --git a/gdb/testsuite/gdb.base/cast-indirection.exp b/gdb/testsuite/gdb.base/cast-indirection.exp
index 193c02a6625..74afec68dda 100644
--- a/gdb/testsuite/gdb.base/cast-indirection.exp
+++ b/gdb/testsuite/gdb.base/cast-indirection.exp
@@ -18,7 +18,7 @@
 standard_testfile
 
 if { [prepare_for_testing "failed to prepare" $testfile $srcfile \
-	  {nodebug}] == -1} {
+	  {symtab}] == -1} {
     return
 }
 
diff --git a/gdb/testsuite/gdb.base/disasm-optim.exp b/gdb/testsuite/gdb.base/disasm-optim.exp
index c926a020075..2c88476f577 100644
--- a/gdb/testsuite/gdb.base/disasm-optim.exp
+++ b/gdb/testsuite/gdb.base/disasm-optim.exp
@@ -19,7 +19,7 @@ require is_amd64_regs_target
 
 standard_testfile .S
 
-if { [prepare_for_testing "failed to prepare" $testfile ${testfile}.S {nodebug}] } {
+if { [prepare_for_testing "failed to prepare" $testfile ${testfile}.S {symtab}] } {
     return
 }
 
diff --git a/gdb/testsuite/gdb.base/list-dot-nodebug.exp b/gdb/testsuite/gdb.base/list-dot-nodebug.exp
index 2bc3d27df0e..f2adca2a066 100644
--- a/gdb/testsuite/gdb.base/list-dot-nodebug.exp
+++ b/gdb/testsuite/gdb.base/list-dot-nodebug.exp
@@ -53,7 +53,7 @@ proc do_test { debug } {
 	}
 
     } else {
-	lappend opts nodebug
+	lappend opts symtab
 
 	set executable ${::testfile}-none
 	if {[build_executable "failed to prepare" ${executable} \
diff --git a/gdb/testsuite/gdb.base/rtld-step-nodebugsym.exp b/gdb/testsuite/gdb.base/rtld-step-nodebugsym.exp
index f9192c1ff98..35afcd64de1 100644
--- a/gdb/testsuite/gdb.base/rtld-step-nodebugsym.exp
+++ b/gdb/testsuite/gdb.base/rtld-step-nodebugsym.exp
@@ -19,7 +19,7 @@
 standard_testfile
 
 if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile} \
-       {nodebug}] } {
+       {symtab}] } {
     return
 }
 
diff --git a/gdb/testsuite/gdb.base/stap-probe.exp b/gdb/testsuite/gdb.base/stap-probe.exp
index ce4f9a2d8cd..999b3cfdc44 100644
--- a/gdb/testsuite/gdb.base/stap-probe.exp
+++ b/gdb/testsuite/gdb.base/stap-probe.exp
@@ -243,7 +243,7 @@ proc stap_test_no_debuginfo {exec_name {args ""}} {
     global hex
 
     set flags {}
-    lappend flags nodebug
+    lappend flags symtab
     lappend flags optimize=-O2
     lappend_include_file flags $::srcdir/lib/attributes.h
     if { $args != "" } {
diff --git a/gdb/testsuite/gdb.base/step-symless.exp b/gdb/testsuite/gdb.base/step-symless.exp
index 1f4dd88a103..3d000f909f9 100644
--- a/gdb/testsuite/gdb.base/step-symless.exp
+++ b/gdb/testsuite/gdb.base/step-symless.exp
@@ -14,7 +14,7 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 standard_testfile
-if {[build_executable ${testfile}.exp ${testfile} ${srcfile} {nodebug}] == -1} {
+if {[build_executable ${testfile}.exp ${testfile} ${srcfile} {symtab}] == -1} {
     return
 }
 
diff --git a/gdb/testsuite/gdb.base/tailcall-msym.exp b/gdb/testsuite/gdb.base/tailcall-msym.exp
index d6cd06f88cd..7ec13ca62e4 100644
--- a/gdb/testsuite/gdb.base/tailcall-msym.exp
+++ b/gdb/testsuite/gdb.base/tailcall-msym.exp
@@ -128,7 +128,7 @@ close $fd
 
 # Rebuild the test executable from the modified assembler file.  Don't
 # include debug as we want GDB to use the msymbols.
-if { [prepare_for_testing "prepare" ${testfile}-updated $asm_file {nodebug}] } {
+if { [prepare_for_testing "prepare" ${testfile}-updated $asm_file {symtab}] } {
     return
 }
 
diff --git a/gdb/testsuite/gdb.base/until-nodebug.exp b/gdb/testsuite/gdb.base/until-nodebug.exp
index 01be462bb86..d9b20d0bae1 100644
--- a/gdb/testsuite/gdb.base/until-nodebug.exp
+++ b/gdb/testsuite/gdb.base/until-nodebug.exp
@@ -18,7 +18,7 @@
 
 standard_testfile advance.c
 
-if {[prepare_for_testing "failed to prepare" $testfile $srcfile nodebug]} {
+if {[prepare_for_testing "failed to prepare" $testfile $srcfile symtab]} {
     return
 }
 
diff --git a/gdb/testsuite/gdb.base/until-trailing-insns.exp b/gdb/testsuite/gdb.base/until-trailing-insns.exp
index 0c1b7ec0dca..40977f3dfcf 100644
--- a/gdb/testsuite/gdb.base/until-trailing-insns.exp
+++ b/gdb/testsuite/gdb.base/until-trailing-insns.exp
@@ -156,7 +156,7 @@ Dwarf::assemble $asm_file {
 }
 
 if { [prepare_for_testing "failed to prepare" ${testfile} \
-	[list $srcfile $asm_file] {nodebug} ] } {
+	[list $srcfile $asm_file] {symtab} ] } {
     return
 }
 
diff --git a/gdb/testsuite/gdb.compile/compile-ops.exp b/gdb/testsuite/gdb.compile/compile-ops.exp
index c5c921f8b04..05269e3f531 100644
--- a/gdb/testsuite/gdb.compile/compile-ops.exp
+++ b/gdb/testsuite/gdb.compile/compile-ops.exp
@@ -412,7 +412,7 @@ Dwarf::assemble $asm_file {
 }
 
 if { [prepare_for_testing "failed to prepare" ${testfile} \
-	  [list $srcfile $asm_file] {nodebug}] } {
+	  [list $srcfile $asm_file] {symtab}] } {
     return
 }
 
diff --git a/gdb/testsuite/gdb.cp/call-method-register.exp b/gdb/testsuite/gdb.cp/call-method-register.exp
index 4649e7bf38b..6567fb18abb 100644
--- a/gdb/testsuite/gdb.cp/call-method-register.exp
+++ b/gdb/testsuite/gdb.cp/call-method-register.exp
@@ -28,7 +28,7 @@ lappend flags_debug debug
 lappend flags_debug c++
 
 set flags_nodebug {}
-lappend flags_nodebug nodebug
+lappend flags_nodebug symtab
 lappend flags_nodebug c++
 
 if {[prepare_for_testing "failed to prepare" $testfile $srcfile $flags_debug]} {
diff --git a/gdb/testsuite/gdb.cp/incomplete-type-overload.exp b/gdb/testsuite/gdb.cp/incomplete-type-overload.exp
index f0289bbd860..b0b178cf8f5 100644
--- a/gdb/testsuite/gdb.cp/incomplete-type-overload.exp
+++ b/gdb/testsuite/gdb.cp/incomplete-type-overload.exp
@@ -30,7 +30,7 @@ lappend flags_debug debug
 lappend flags_debug c++
 
 set flags_nodebug {}
-lappend flags_nodebug nodebug
+lappend flags_nodebug symtab
 lappend flags_nodebug c++
 
 if {[prepare_for_testing "failed to prepare" $testfile $srcfile $flags_debug]} {
diff --git a/gdb/testsuite/gdb.cp/infcall-nodebug-c++-d0.exp b/gdb/testsuite/gdb.cp/infcall-nodebug-c++-d0.exp
index 6d7c4aeb98b..f043bc050db 100644
--- a/gdb/testsuite/gdb.cp/infcall-nodebug-c++-d0.exp
+++ b/gdb/testsuite/gdb.cp/infcall-nodebug-c++-d0.exp
@@ -18,6 +18,6 @@
 require allow_cplus_tests
 set lang {c++}
 
-set debug nodebug
+set debug symtab
 
 source $srcdir/$subdir/infcall-nodebug.exp.tcl
diff --git a/gdb/testsuite/gdb.cp/infcall-nodebug-c-d0.exp b/gdb/testsuite/gdb.cp/infcall-nodebug-c-d0.exp
index e41bb4225c0..76c16a85313 100644
--- a/gdb/testsuite/gdb.cp/infcall-nodebug-c-d0.exp
+++ b/gdb/testsuite/gdb.cp/infcall-nodebug-c-d0.exp
@@ -16,6 +16,6 @@
 
 set lang {c}
 
-set debug nodebug
+set debug symtab
 
 source $srcdir/$subdir/infcall-nodebug.exp.tcl
diff --git a/gdb/testsuite/gdb.cp/namelessclass.exp b/gdb/testsuite/gdb.cp/namelessclass.exp
index e3be4cf666c..81925b2e74d 100644
--- a/gdb/testsuite/gdb.cp/namelessclass.exp
+++ b/gdb/testsuite/gdb.cp/namelessclass.exp
@@ -27,7 +27,7 @@ require is_x86_64_m64_target
 standard_testfile .S
 set csrcfile "${testfile}.cc"
 
-if {[prepare_for_testing "failed to prepare" $testfile $srcfile {nodebug}]} {
+if {[prepare_for_testing "failed to prepare" $testfile $srcfile {symtab}]} {
     return
 }
 
diff --git a/gdb/testsuite/gdb.debuginfod/fetch_src_and_symbols.exp b/gdb/testsuite/gdb.debuginfod/fetch_src_and_symbols.exp
index e7c2f524abe..23185e28806 100644
--- a/gdb/testsuite/gdb.debuginfod/fetch_src_and_symbols.exp
+++ b/gdb/testsuite/gdb.debuginfod/fetch_src_and_symbols.exp
@@ -138,13 +138,13 @@ proc_with_prefix no_url { } {
     write_dwarf_file ${binfile}_dwz.S $buildid
 
     if {[gdb_compile ${binfile}_has_altlink.S ${binfile}_alt.o object \
-	     nodebug] != ""} {
+	     symtab] != ""} {
 	fail "compile main with altlink"
 	return -1
     }
 
     if {[gdb_compile ${binfile}_dwz.S ${binfile}_dwz.o object \
-	     nodebug] != ""} {
+	     symtab] != ""} {
 	fail "compile altlink"
 	return -1
     }
diff --git a/gdb/testsuite/gdb.dlang/circular.exp b/gdb/testsuite/gdb.dlang/circular.exp
index c6c4dcb3af9..83ee9ecd4e6 100644
--- a/gdb/testsuite/gdb.dlang/circular.exp
+++ b/gdb/testsuite/gdb.dlang/circular.exp
@@ -126,7 +126,7 @@ Dwarf::assemble $asm_file {
 }
 
 if { [prepare_for_testing "failed to prepare" ${testfile} \
-	  [list $srcfile $asm_file] {nodebug}] } {
+	  [list $srcfile $asm_file] {symtab}] } {
     return
 }
 
diff --git a/gdb/testsuite/gdb.dlang/dlang-start-2.exp b/gdb/testsuite/gdb.dlang/dlang-start-2.exp
index 368db31a015..89eff478e23 100644
--- a/gdb/testsuite/gdb.dlang/dlang-start-2.exp
+++ b/gdb/testsuite/gdb.dlang/dlang-start-2.exp
@@ -69,7 +69,7 @@ Dwarf::assemble $asm_file {
 }
 
 if { [prepare_for_testing "failed to prepare" ${testfile} \
-	  [list $srcfile $asm_file] {nodebug}] } {
+	  [list $srcfile $asm_file] {symtab}] } {
     return
 }
 
diff --git a/gdb/testsuite/gdb.dlang/watch-loc.exp b/gdb/testsuite/gdb.dlang/watch-loc.exp
index b61a444d54f..cb7eaed6e01 100644
--- a/gdb/testsuite/gdb.dlang/watch-loc.exp
+++ b/gdb/testsuite/gdb.dlang/watch-loc.exp
@@ -68,7 +68,7 @@ Dwarf::assemble $asm_file {
 }
 
 if { [prepare_for_testing "failed to prepare" ${testfile} \
-	  [list $srcfile $asm_file] {nodebug}] } {
+	  [list $srcfile $asm_file] {symtab}] } {
     return
 }
 
diff --git a/gdb/testsuite/gdb.dwarf2/DW_OP_piece_with_DW_OP_GNU_uninit.exp b/gdb/testsuite/gdb.dwarf2/DW_OP_piece_with_DW_OP_GNU_uninit.exp
index 52599ca3ced..639c1e29136 100644
--- a/gdb/testsuite/gdb.dwarf2/DW_OP_piece_with_DW_OP_GNU_uninit.exp
+++ b/gdb/testsuite/gdb.dwarf2/DW_OP_piece_with_DW_OP_GNU_uninit.exp
@@ -72,7 +72,7 @@ Dwarf::assemble $asm_file {
 }
 
 if {[build_executable ${testfile}.exp ${testfile} \
-	 [list $srcfile $asm_file] {nodebug}]} {
+	 [list $srcfile $asm_file] {symtab}]} {
     return
 }
 
diff --git a/gdb/testsuite/gdb.dwarf2/ada-array-bound.exp b/gdb/testsuite/gdb.dwarf2/ada-array-bound.exp
index 4a5e14e2c2e..245ddb6d510 100644
--- a/gdb/testsuite/gdb.dwarf2/ada-array-bound.exp
+++ b/gdb/testsuite/gdb.dwarf2/ada-array-bound.exp
@@ -81,7 +81,7 @@ Dwarf::assemble $asm_file {
 }
 
 if { [prepare_for_testing "failed to prepare" ${testfile} \
-	  [list $srcfile $asm_file] {nodebug}] } {
+	  [list $srcfile $asm_file] {symtab}] } {
     return
 }
 
diff --git a/gdb/testsuite/gdb.dwarf2/ada-artificial-field.exp b/gdb/testsuite/gdb.dwarf2/ada-artificial-field.exp
index 72127bb4cb1..f898acc9c71 100644
--- a/gdb/testsuite/gdb.dwarf2/ada-artificial-field.exp
+++ b/gdb/testsuite/gdb.dwarf2/ada-artificial-field.exp
@@ -78,7 +78,7 @@ Dwarf::assemble $asm_file {
 }
 
 if {[prepare_for_testing ${testfile}.exp ${testfile} \
-	 [list $srcfile $asm_file] {nodebug}]} {
+	 [list $srcfile $asm_file] {symtab}]} {
     return
 }
 
diff --git a/gdb/testsuite/gdb.dwarf2/ada-cold-name.exp b/gdb/testsuite/gdb.dwarf2/ada-cold-name.exp
index a3d90e53970..96f57aad6cc 100644
--- a/gdb/testsuite/gdb.dwarf2/ada-cold-name.exp
+++ b/gdb/testsuite/gdb.dwarf2/ada-cold-name.exp
@@ -58,7 +58,7 @@ Dwarf::assemble $asm_file {
 }
 
 if { [prepare_for_testing "failed to prepare" ${testfile} \
-	  [list $srcfile $asm_file] {nodebug}] } {
+	  [list $srcfile $asm_file] {symtab}] } {
     return
 }
 
diff --git a/gdb/testsuite/gdb.dwarf2/ada-linkage-name.exp b/gdb/testsuite/gdb.dwarf2/ada-linkage-name.exp
index 23dd7aaa86f..4d9169a6954 100644
--- a/gdb/testsuite/gdb.dwarf2/ada-linkage-name.exp
+++ b/gdb/testsuite/gdb.dwarf2/ada-linkage-name.exp
@@ -62,7 +62,7 @@ Dwarf::assemble $asm_file {
 }
 
 if { [prepare_for_testing "failed to prepare" ${testfile} \
-	  [list $srcfile $asm_file] {nodebug}] } {
+	  [list $srcfile $asm_file] {symtab}] } {
     return
 }
 
diff --git a/gdb/testsuite/gdb.dwarf2/ada-thick-pointer.exp b/gdb/testsuite/gdb.dwarf2/ada-thick-pointer.exp
index b53d8a35935..27083ca77bb 100644
--- a/gdb/testsuite/gdb.dwarf2/ada-thick-pointer.exp
+++ b/gdb/testsuite/gdb.dwarf2/ada-thick-pointer.exp
@@ -85,7 +85,7 @@ Dwarf::assemble $asm_file {
 }
 
 if { [prepare_for_testing "failed to prepare" ${testfile} \
-	  [list $srcfile $asm_file] {nodebug}] } {
+	  [list $srcfile $asm_file] {symtab}] } {
     return
 }
 
diff --git a/gdb/testsuite/gdb.dwarf2/ada-valprint-error.exp b/gdb/testsuite/gdb.dwarf2/ada-valprint-error.exp
index 171e0cbf3aa..17034c01f40 100644
--- a/gdb/testsuite/gdb.dwarf2/ada-valprint-error.exp
+++ b/gdb/testsuite/gdb.dwarf2/ada-valprint-error.exp
@@ -103,7 +103,7 @@ Dwarf::assemble $asm_file {
 }
 
 if { [prepare_for_testing ${testfile}.exp ${testfile} \
-	  [list $srcfile $asm_file] {nodebug}] } {
+	  [list $srcfile $asm_file] {symtab}] } {
     return
 }
 
diff --git a/gdb/testsuite/gdb.dwarf2/ada-var-in-module.exp b/gdb/testsuite/gdb.dwarf2/ada-var-in-module.exp
index b97e81b65c2..f8800cba735 100644
--- a/gdb/testsuite/gdb.dwarf2/ada-var-in-module.exp
+++ b/gdb/testsuite/gdb.dwarf2/ada-var-in-module.exp
@@ -134,7 +134,7 @@ Dwarf::assemble $asm_file {
 }
 
 if {[prepare_for_testing "failed to prepare" ${testfile} \
-	 [list $srcfile $asm_file] {nodebug}]} {
+	 [list $srcfile $asm_file] {symtab}]} {
     return
 }
 
diff --git a/gdb/testsuite/gdb.dwarf2/arr-opt-out.exp b/gdb/testsuite/gdb.dwarf2/arr-opt-out.exp
index 8587897ccef..d4a459c1ad3 100644
--- a/gdb/testsuite/gdb.dwarf2/arr-opt-out.exp
+++ b/gdb/testsuite/gdb.dwarf2/arr-opt-out.exp
@@ -80,7 +80,7 @@ Dwarf::assemble $asm_file {
 }
 
 if {[prepare_for_testing "failed to prepare" ${testfile} \
-	 [list $srcfile $asm_file] {nodebug}]} {
+	 [list $srcfile $asm_file] {symtab}]} {
     return
 }
 
diff --git a/gdb/testsuite/gdb.dwarf2/arr-stride-dyn.exp b/gdb/testsuite/gdb.dwarf2/arr-stride-dyn.exp
index 56246180ef6..3087fa32cf5 100644
--- a/gdb/testsuite/gdb.dwarf2/arr-stride-dyn.exp
+++ b/gdb/testsuite/gdb.dwarf2/arr-stride-dyn.exp
@@ -99,7 +99,7 @@ Dwarf::assemble $asm_file {
 }
 
 if { [prepare_for_testing "failed to prepare" ${testfile} \
-	  [list $srcfile $asm_file] {nodebug}] } {
+	  [list $srcfile $asm_file] {symtab}] } {
     return
 }
 
diff --git a/gdb/testsuite/gdb.dwarf2/arr-stride.exp b/gdb/testsuite/gdb.dwarf2/arr-stride.exp
index cdec17eed07..3c90622ee73 100644
--- a/gdb/testsuite/gdb.dwarf2/arr-stride.exp
+++ b/gdb/testsuite/gdb.dwarf2/arr-stride.exp
@@ -110,7 +110,7 @@ Dwarf::assemble $asm_file {
 }
 
 if { [prepare_for_testing "failed to prepare" ${testfile} \
-	  [list $srcfile $asm_file] {nodebug}] } {
+	  [list $srcfile $asm_file] {symtab}] } {
     return
 }
 
diff --git a/gdb/testsuite/gdb.dwarf2/arr-subrange.exp b/gdb/testsuite/gdb.dwarf2/arr-subrange.exp
index ec2640cdb7a..df21c77575c 100644
--- a/gdb/testsuite/gdb.dwarf2/arr-subrange.exp
+++ b/gdb/testsuite/gdb.dwarf2/arr-subrange.exp
@@ -75,7 +75,7 @@ Dwarf::assemble $asm_file {
 }
 
 if { [prepare_for_testing "failed to prepare" ${testfile} \
-	  [list $srcfile $asm_file] {nodebug}] } {
+	  [list $srcfile $asm_file] {symtab}] } {
     return
 }
 
diff --git a/gdb/testsuite/gdb.dwarf2/assign-variable-value-to-register.exp b/gdb/testsuite/gdb.dwarf2/assign-variable-value-to-register.exp
index 0d1611a73ed..6ad2e3650df 100644
--- a/gdb/testsuite/gdb.dwarf2/assign-variable-value-to-register.exp
+++ b/gdb/testsuite/gdb.dwarf2/assign-variable-value-to-register.exp
@@ -66,7 +66,7 @@ Dwarf::assemble $dwarf_file {
 }
 
 if { [prepare_for_testing "failed to prepare" $testfile \
-	[list $srcfile $dwarf_file] {nodebug}] } {
+	[list $srcfile $dwarf_file] {symtab}] } {
     return
 }
 
diff --git a/gdb/testsuite/gdb.dwarf2/atomic-type.exp b/gdb/testsuite/gdb.dwarf2/atomic-type.exp
index 92865016ea3..87e3962e636 100644
--- a/gdb/testsuite/gdb.dwarf2/atomic-type.exp
+++ b/gdb/testsuite/gdb.dwarf2/atomic-type.exp
@@ -80,7 +80,7 @@ Dwarf::assemble $asm_file {
 }
 
 if { [prepare_for_testing "failed to prepare" ${testfile} \
-	  [list $srcfile $asm_file] {nodebug}] } {
+	  [list $srcfile $asm_file] {symtab}] } {
     return
 }
 
diff --git a/gdb/testsuite/gdb.dwarf2/backward-spec-inter-cu.exp b/gdb/testsuite/gdb.dwarf2/backward-spec-inter-cu.exp
index de76cc8aca2..ad94d5d0f92 100644
--- a/gdb/testsuite/gdb.dwarf2/backward-spec-inter-cu.exp
+++ b/gdb/testsuite/gdb.dwarf2/backward-spec-inter-cu.exp
@@ -74,7 +74,7 @@ Dwarf::assemble $asm_file {
 }
 
 if {[build_executable "failed to build executable" ${testfile} \
-	 [list $srcfile $asm_file] {nodebug}]} {
+	 [list $srcfile $asm_file] {symtab}]} {
     return
 }
 
diff --git a/gdb/testsuite/gdb.dwarf2/bad-regnum.exp b/gdb/testsuite/gdb.dwarf2/bad-regnum.exp
index 6c9d80b1e04..7ad03394d0a 100644
--- a/gdb/testsuite/gdb.dwarf2/bad-regnum.exp
+++ b/gdb/testsuite/gdb.dwarf2/bad-regnum.exp
@@ -61,7 +61,7 @@ Dwarf::assemble $asm_file {
 }
 
 if { [prepare_for_testing "failed to prepare" ${testfile} \
-	  [list $srcfile $asm_file] {nodebug}] } {
+	  [list $srcfile $asm_file] {symtab}] } {
     return
 }
 
diff --git a/gdb/testsuite/gdb.dwarf2/builtin-type-copy.exp b/gdb/testsuite/gdb.dwarf2/builtin-type-copy.exp
index 1eb9fefba85..32bbcddf38e 100644
--- a/gdb/testsuite/gdb.dwarf2/builtin-type-copy.exp
+++ b/gdb/testsuite/gdb.dwarf2/builtin-type-copy.exp
@@ -67,7 +67,7 @@ Dwarf::assemble $asm_file {
 # the compiler.
 
 if { [prepare_for_testing "failed to prepare" ${testfile} \
-	  [list $srcfile $asm_file] {nodebug}] } {
+	  [list $srcfile $asm_file] {symtab}] } {
     return
 }
 
diff --git a/gdb/testsuite/gdb.dwarf2/calling-convention.exp b/gdb/testsuite/gdb.dwarf2/calling-convention.exp
index 202371400ea..eadc23f8391 100644
--- a/gdb/testsuite/gdb.dwarf2/calling-convention.exp
+++ b/gdb/testsuite/gdb.dwarf2/calling-convention.exp
@@ -68,7 +68,7 @@ Dwarf::assemble $asm_file {
 }
 
 if { [prepare_for_testing "failed to prepare" ${testfile} \
-	  [list $srcfile $asm_file] {nodebug}] } {
+	  [list $srcfile $asm_file] {symtab}] } {
     return
 }
 
diff --git a/gdb/testsuite/gdb.dwarf2/clang-cli-macro.exp b/gdb/testsuite/gdb.dwarf2/clang-cli-macro.exp
index 14c7e671ffc..dc419c447c0 100644
--- a/gdb/testsuite/gdb.dwarf2/clang-cli-macro.exp
+++ b/gdb/testsuite/gdb.dwarf2/clang-cli-macro.exp
@@ -81,7 +81,7 @@ Dwarf::assemble $asm_file {
     }
 }
 
-if {[prepare_for_testing "failed to prepare" $testfile [list $srcfile $asm_file] {nodebug}]} {
+if {[prepare_for_testing "failed to prepare" $testfile [list $srcfile $asm_file] {symtab}]} {
     return
 }
 
diff --git a/gdb/testsuite/gdb.dwarf2/clztest.exp b/gdb/testsuite/gdb.dwarf2/clztest.exp
index c827ae6175c..e80aa6a708f 100644
--- a/gdb/testsuite/gdb.dwarf2/clztest.exp
+++ b/gdb/testsuite/gdb.dwarf2/clztest.exp
@@ -25,7 +25,7 @@ require dwarf2_support
 require is_x86_64_m64_target
 
 if { [prepare_for_testing "failed to prepare" "${test}" ${test}.S \
-      {nodebug nopie additional_flags=-nostdlib}] } {
+      {symtab nopie additional_flags=-nostdlib}] } {
     return
 }
 
diff --git a/gdb/testsuite/gdb.dwarf2/comp-unit-lang.exp b/gdb/testsuite/gdb.dwarf2/comp-unit-lang.exp
index e4c9177575e..33e5c6d503e 100644
--- a/gdb/testsuite/gdb.dwarf2/comp-unit-lang.exp
+++ b/gdb/testsuite/gdb.dwarf2/comp-unit-lang.exp
@@ -55,7 +55,7 @@ proc do_test {cu_lang gdb_lang} {
     }
 
     if { [prepare_for_testing "failed to prepare" ${testfile} \
-	      [list $srcfile $asm_file] {nodebug}] } {
+	      [list $srcfile $asm_file] {symtab}] } {
 	return -1
     }
 
diff --git a/gdb/testsuite/gdb.dwarf2/complex-partial-optimized.exp b/gdb/testsuite/gdb.dwarf2/complex-partial-optimized.exp
index c22a729826b..2113a89a324 100644
--- a/gdb/testsuite/gdb.dwarf2/complex-partial-optimized.exp
+++ b/gdb/testsuite/gdb.dwarf2/complex-partial-optimized.exp
@@ -78,7 +78,7 @@ Dwarf::assemble $asm_file {
 }
 
 if {[prepare_for_testing "failed to prepare" ${testfile} \
-	 [list $srcfile $asm_file] {nodebug}]} {
+	 [list $srcfile $asm_file] {symtab}]} {
     return
 }
 
diff --git a/gdb/testsuite/gdb.dwarf2/corrupt.exp b/gdb/testsuite/gdb.dwarf2/corrupt.exp
index b46f0cb1b43..68d7d13f472 100644
--- a/gdb/testsuite/gdb.dwarf2/corrupt.exp
+++ b/gdb/testsuite/gdb.dwarf2/corrupt.exp
@@ -68,7 +68,7 @@ Dwarf::assemble $asm_file {
 }
 
 if {[prepare_for_testing "failed to prepare" $testfile \
-	 [list $srcfile $asm_file] {nodebug}]} {
+	 [list $srcfile $asm_file] {symtab}]} {
     return
 }
 
diff --git a/gdb/testsuite/gdb.dwarf2/count.exp b/gdb/testsuite/gdb.dwarf2/count.exp
index 8ed443fe734..924a69723f9 100644
--- a/gdb/testsuite/gdb.dwarf2/count.exp
+++ b/gdb/testsuite/gdb.dwarf2/count.exp
@@ -126,7 +126,7 @@ Dwarf::assemble $asm_file {
 }
 
 if { [prepare_for_testing "failed to prepare" $testfile \
-	  [list $srcfile $asm_file] {nodebug}] } {
+	  [list $srcfile $asm_file] {symtab}] } {
     return
 }
 
diff --git a/gdb/testsuite/gdb.dwarf2/cpp-linkage-name.exp b/gdb/testsuite/gdb.dwarf2/cpp-linkage-name.exp
index 6a3abaf83a4..6eda08f3bcf 100644
--- a/gdb/testsuite/gdb.dwarf2/cpp-linkage-name.exp
+++ b/gdb/testsuite/gdb.dwarf2/cpp-linkage-name.exp
@@ -81,7 +81,7 @@ Dwarf::assemble $asm_file {
 }
 
 if { [prepare_for_testing "failed to prepare" ${testfile} \
-	  [list $srcfile $asm_file] {nodebug}] } {
+	  [list $srcfile $asm_file] {symtab}] } {
     return
 }
 
diff --git a/gdb/testsuite/gdb.dwarf2/cu-empty-name.exp b/gdb/testsuite/gdb.dwarf2/cu-empty-name.exp
index d4aa0203807..c81eb814232 100644
--- a/gdb/testsuite/gdb.dwarf2/cu-empty-name.exp
+++ b/gdb/testsuite/gdb.dwarf2/cu-empty-name.exp
@@ -37,7 +37,7 @@ Dwarf::assemble $asm_file {
 }
 
 if { [prepare_for_testing "failed to prepare" ${testfile} \
-	  [list $srcfile $asm_file] {nodebug}] } {
+	  [list $srcfile $asm_file] {symtab}] } {
     return
 }
 
diff --git a/gdb/testsuite/gdb.dwarf2/cu-no-addrs.exp b/gdb/testsuite/gdb.dwarf2/cu-no-addrs.exp
index 844b01d1b4a..8ae7b38de21 100644
--- a/gdb/testsuite/gdb.dwarf2/cu-no-addrs.exp
+++ b/gdb/testsuite/gdb.dwarf2/cu-no-addrs.exp
@@ -52,7 +52,7 @@ Dwarf::assemble $asm_file {
 }
 
 if {[prepare_for_testing "failed to prepare" ${testfile} \
-	 [list $srcfile $asm_file] {nodebug}]} {
+	 [list $srcfile $asm_file] {symtab}]} {
     return
 }
 
diff --git a/gdb/testsuite/gdb.dwarf2/data-loc-cast.exp b/gdb/testsuite/gdb.dwarf2/data-loc-cast.exp
index a0ead537898..e66c0f3c542 100644
--- a/gdb/testsuite/gdb.dwarf2/data-loc-cast.exp
+++ b/gdb/testsuite/gdb.dwarf2/data-loc-cast.exp
@@ -142,7 +142,7 @@ Dwarf::assemble $asm_file {
 }
 
 if { [prepare_for_testing "failed to prepare" ${testfile} \
-	  [list $srcfile $asm_file] {nodebug}] } {
+	  [list $srcfile $asm_file] {symtab}] } {
     return
 }
 
diff --git a/gdb/testsuite/gdb.dwarf2/data-loc.exp b/gdb/testsuite/gdb.dwarf2/data-loc.exp
index b78afe25716..3c724e8f46a 100644
--- a/gdb/testsuite/gdb.dwarf2/data-loc.exp
+++ b/gdb/testsuite/gdb.dwarf2/data-loc.exp
@@ -120,7 +120,7 @@ Dwarf::assemble $asm_file {
 # the compiler.
 
 if { [prepare_for_testing "failed to prepare" ${testfile} \
-	  [list $srcfile $asm_file] {nodebug}] } {
+	  [list $srcfile $asm_file] {symtab}] } {
     return
 }
 
diff --git a/gdb/testsuite/gdb.dwarf2/debug-aranges-duplicate-offset-warning.exp b/gdb/testsuite/gdb.dwarf2/debug-aranges-duplicate-offset-warning.exp
index 9432415fdd0..528e6b62da8 100644
--- a/gdb/testsuite/gdb.dwarf2/debug-aranges-duplicate-offset-warning.exp
+++ b/gdb/testsuite/gdb.dwarf2/debug-aranges-duplicate-offset-warning.exp
@@ -60,7 +60,7 @@ Dwarf::assemble $asm_file {
 save_vars { GDBFLAGS } {
     append GDBFLAGS " -iex \"maint set dwarf synchronous on\""
     if { [prepare_for_testing "failed to prepare" ${testfile} \
-	      [list $srcfile $asm_file] {nodebug}] } {
+	      [list $srcfile $asm_file] {symtab}] } {
 	return
     }
 }
diff --git a/gdb/testsuite/gdb.dwarf2/debug-frame-no-cfa.exp b/gdb/testsuite/gdb.dwarf2/debug-frame-no-cfa.exp
index 3f7d77cf074..f14be6216a0 100644
--- a/gdb/testsuite/gdb.dwarf2/debug-frame-no-cfa.exp
+++ b/gdb/testsuite/gdb.dwarf2/debug-frame-no-cfa.exp
@@ -69,7 +69,7 @@ Dwarf::assemble $asm_file {
 }
 
 if { [prepare_for_testing "failed to prepare" ${testfile} \
-	[list $srcfile $asm_file] {nodebug}] } {
+	[list $srcfile $asm_file] {symtab}] } {
     return
 }
 
diff --git a/gdb/testsuite/gdb.dwarf2/debug-frame.exp b/gdb/testsuite/gdb.dwarf2/debug-frame.exp
index ddadab7566e..ff75f797d7b 100644
--- a/gdb/testsuite/gdb.dwarf2/debug-frame.exp
+++ b/gdb/testsuite/gdb.dwarf2/debug-frame.exp
@@ -95,7 +95,7 @@ foreach_with_prefix is_64 { false true } {
     }
 
     if { [prepare_for_testing "failed to prepare" ${testfile}-${is_64} \
-	      [list $srcfile $asm_file] {nodebug}] } {
+	      [list $srcfile $asm_file] {symtab}] } {
 	continue
     }
 
diff --git a/gdb/testsuite/gdb.dwarf2/dw-form-ref-addr-with-type-units.exp b/gdb/testsuite/gdb.dwarf2/dw-form-ref-addr-with-type-units.exp
index 6c330435298..bf93a2d3a74 100644
--- a/gdb/testsuite/gdb.dwarf2/dw-form-ref-addr-with-type-units.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw-form-ref-addr-with-type-units.exp
@@ -99,7 +99,7 @@ Dwarf::assemble $asm_file {
 }
 
 if { [prepare_for_testing "failed to prepare" ${testfile} \
-	  [list $srcfile $asm_file] {nodebug}] } {
+	  [list $srcfile $asm_file] {symtab}] } {
     return
 }
 
diff --git a/gdb/testsuite/gdb.dwarf2/dw-form-strx.exp.tcl b/gdb/testsuite/gdb.dwarf2/dw-form-strx.exp.tcl
index b261dc654af..a03af84d02a 100644
--- a/gdb/testsuite/gdb.dwarf2/dw-form-strx.exp.tcl
+++ b/gdb/testsuite/gdb.dwarf2/dw-form-strx.exp.tcl
@@ -54,8 +54,8 @@ Dwarf::assemble $asm_file {
     }
 }
 
-if { [build_executable "failed to prepare" ${testfile} \
-	  [list $srcfile $asm_file] {nodebug}] } {
+if { [prepare_for_testing "failed to prepare" ${testfile} \
+	  [list $srcfile $asm_file] {symtab}] } {
     return
 }
 
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-abs-hi-pc.exp b/gdb/testsuite/gdb.dwarf2/dw2-abs-hi-pc.exp
index 367871e3094..441cd6cece2 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-abs-hi-pc.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-abs-hi-pc.exp
@@ -40,7 +40,7 @@ set sources \
 	 ${testfile}-world.c]
 
 set flags {}
-lappend flags nodebug
+lappend flags symtab
 lappend flags additional_flags=[quote_for_host -DHELLO_START=$hello_start]
 lappend flags additional_flags=[quote_for_host -DHELLO_END=$hello_start \
 				    + $hello_len]
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-align.exp b/gdb/testsuite/gdb.dwarf2/dw2-align.exp
index 6671dd5a3fd..b122e8a8b9d 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-align.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-align.exp
@@ -67,7 +67,7 @@ Dwarf::assemble $asm_file {
 }
 
 if { [prepare_for_testing "failed to prepare" ${testfile} \
-	  [list $srcfile $asm_file] {nodebug}] } {
+	  [list $srcfile $asm_file] {symtab}] } {
     return
 }
 
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-bad-abstract-origin.exp b/gdb/testsuite/gdb.dwarf2/dw2-bad-abstract-origin.exp
index b35b7f847cf..530d1ecd543 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-bad-abstract-origin.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-bad-abstract-origin.exp
@@ -194,7 +194,7 @@ proc run_test { dwarf_version } {
     }
 
     if {[prepare_for_testing "failed to prepare" "${dw_testname}" \
-	     [list $::srcfile $asm_file] {nodebug}]} {
+	     [list $::srcfile $asm_file] {symtab}]} {
 	return false
     }
 
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-bad-elf.exp b/gdb/testsuite/gdb.dwarf2/dw2-bad-elf.exp
index b148ae0e005..23ca32f8923 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-bad-elf.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-bad-elf.exp
@@ -159,7 +159,7 @@ Dwarf::assemble $asm_file {
 }
 
 if { [build_executable ${testfile}.exp ${testfile} \
-	  [list $srcfile $srcfile2 $asm_file] {nodebug}] } {
+	  [list $srcfile $srcfile2 $asm_file] {symtab}] } {
     return
 }
 
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-bad-mips-linkage-name.exp b/gdb/testsuite/gdb.dwarf2/dw2-bad-mips-linkage-name.exp
index aa7c12c12fa..88366fcfc16 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-bad-mips-linkage-name.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-bad-mips-linkage-name.exp
@@ -54,7 +54,7 @@ Dwarf::assemble $asm_file {
 }
 
 if { [prepare_for_testing "failed to prepare" ${testfile} \
-	  [list $srcfile $asm_file] {nodebug}] } {
+	  [list $srcfile $asm_file] {symtab}] } {
     return
 }
 
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-bad-unresolved.exp b/gdb/testsuite/gdb.dwarf2/dw2-bad-unresolved.exp
index 6f6eb153c3a..34552ddf38a 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-bad-unresolved.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-bad-unresolved.exp
@@ -51,7 +51,7 @@ Dwarf::assemble $asm_file {
 }
 
 if { [prepare_for_testing "failed to prepare" ${testfile} \
-	  [list $srcfile $asm_file] {nodebug}] } {
+	  [list $srcfile $asm_file] {symtab}] } {
     return
 }
 
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-bfloat16.exp b/gdb/testsuite/gdb.dwarf2/dw2-bfloat16.exp
index 6b71e1e0558..339ccf28e3f 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-bfloat16.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-bfloat16.exp
@@ -67,7 +67,7 @@ Dwarf::assemble $asm_file {
 }
 
 if { [prepare_for_testing "failed to prepare" ${testfile} \
-	  [list $srcfile $asm_file] {nodebug}] } {
+	  [list $srcfile $asm_file] {symtab}] } {
     return
 }
 
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-canonicalize-type.exp b/gdb/testsuite/gdb.dwarf2/dw2-canonicalize-type.exp
index 48206cdc237..85635ea56d8 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-canonicalize-type.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-canonicalize-type.exp
@@ -24,7 +24,7 @@ standard_testfile .S
 set executable ${testfile}
 
 if {[prepare_for_testing "failed to prepare" $testfile $srcfile \
-	 [list nodebug $additional_flags]]} {
+	 [list symtab $additional_flags]]} {
     return
 }
 
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-case-insensitive.exp b/gdb/testsuite/gdb.dwarf2/dw2-case-insensitive.exp
index b2f37062e45..5e296beabf7 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-case-insensitive.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-case-insensitive.exp
@@ -59,7 +59,7 @@ Dwarf::assemble $asm_file {
 }
 
 if { [prepare_for_testing "failed to prepare" ${testfile} \
-	  [list $srcfile $asm_file] {nodebug}] } {
+	  [list $srcfile $asm_file] {symtab}] } {
     return
 }
 
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-common-block.exp b/gdb/testsuite/gdb.dwarf2/dw2-common-block.exp
index 38d2652cd3b..0c1582f9fae 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-common-block.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-common-block.exp
@@ -27,7 +27,7 @@ require allow_fortran_tests
 standard_testfile .S
 
 if { [prepare_for_testing "failed to prepare" "${testfile}" $srcfile \
-      {nodebug nopie f90}] } {
+      {symtab nopie f90}] } {
     return
 }
 
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-const.exp b/gdb/testsuite/gdb.dwarf2/dw2-const.exp
index 41baf2ae18d..6940cd18a75 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-const.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-const.exp
@@ -66,7 +66,7 @@ Dwarf::assemble $asm_file {
 }
 
 if {[prepare_for_testing "failed to prepare" ${testfile} \
-	 [list $srcfile $asm_file] nodebug]} {
+	 [list $srcfile $asm_file] symtab]} {
     return
 }
 
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-disasm-over-non-stmt.exp b/gdb/testsuite/gdb.dwarf2/dw2-disasm-over-non-stmt.exp
index 76de1bc4649..4ee161ac61d 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-disasm-over-non-stmt.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-disasm-over-non-stmt.exp
@@ -93,7 +93,7 @@ Dwarf::assemble $asm_file {
 }
 
 if { [prepare_for_testing "failed to prepare" ${testfile} \
-	  [list $srcfile $asm_file] {nodebug} ] } {
+	  [list $srcfile $asm_file] {symtab} ] } {
     return
 }
 
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-dup-frame.exp b/gdb/testsuite/gdb.dwarf2/dw2-dup-frame.exp
index 6f3c6a0092e..82fa405f039 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-dup-frame.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-dup-frame.exp
@@ -22,7 +22,7 @@ require is_x86_64_m64_target
 
 standard_testfile .S
 
-if { [prepare_for_testing "failed to prepare" $testfile $srcfile {nodebug nopie}] } {
+if { [prepare_for_testing "failed to prepare" $testfile $srcfile {symtab nopie}] } {
     return
 }
 
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-empty-file-name.exp b/gdb/testsuite/gdb.dwarf2/dw2-empty-file-name.exp
index 15539bad856..54281eea718 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-empty-file-name.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-empty-file-name.exp
@@ -51,7 +51,7 @@ Dwarf::assemble $asm_file {
 }
 
 if { [build_executable "failed to prepare" ${testfile} \
-	  [list $srcfile $asm_file] {nodebug}] } {
+	  [list $srcfile $asm_file] {symtab}] } {
     return
 }
 
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-empty-inline-low-high.exp b/gdb/testsuite/gdb.dwarf2/dw2-empty-inline-low-high.exp
index ae696ac71f0..eaaef715f4b 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-empty-inline-low-high.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-empty-inline-low-high.exp
@@ -94,7 +94,7 @@ Dwarf::assemble $asm_file {
 }
 
 if {[prepare_for_testing "failed to prepare" $testfile \
-	 [list $srcfile $asm_file] {nodebug}]} {
+	 [list $srcfile $asm_file] {symtab}]} {
     return
 }
 
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-empty-inline-ranges.exp b/gdb/testsuite/gdb.dwarf2/dw2-empty-inline-ranges.exp
index 6992e9911c8..93536007d55 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-empty-inline-ranges.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-empty-inline-ranges.exp
@@ -186,7 +186,7 @@ proc run_test { dwarf_version empty_loc entry_pc_type } {
     write_asm_file $asm_file $dwarf_version $ranges $entry_pc_label
 
     if {[prepare_for_testing "failed to prepare" $this_testfile \
-	     [list $::srcfile $asm_file] {nodebug nopie}]} {
+	     [list $::srcfile $asm_file] {symtab nopie}]} {
 	return
     }
 
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-entry-pc.exp b/gdb/testsuite/gdb.dwarf2/dw2-entry-pc.exp
index 193c26bb65d..3a87262795a 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-entry-pc.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-entry-pc.exp
@@ -79,7 +79,7 @@ proc get_next_suffix {} {
 
 proc build_and_runto_main { suffix asm_file } {
     if {[prepare_for_testing "failed to prepare" "${::testfile}-${suffix}" \
-	     [list $::srcfile $asm_file] {nodebug nopie}]} {
+	     [list $::srcfile $asm_file] {symtab nopie}]} {
 	return false
     }
 
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-entry-points.exp b/gdb/testsuite/gdb.dwarf2/dw2-entry-points.exp
index 1be466f513c..59090f0eea5 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-entry-points.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-entry-points.exp
@@ -190,7 +190,7 @@ Dwarf::assemble $asm_file {
 }
 
 if {[prepare_for_testing "failed to prepare" ${testfile} \
-	 [list $srcfile $asm_file] {nodebug}]} {
+	 [list $srcfile $asm_file] {symtab}]} {
     return
 }
 
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-entry-value-2.exp b/gdb/testsuite/gdb.dwarf2/dw2-entry-value-2.exp
index 3b48846fb71..09bdeb47c94 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-entry-value-2.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-entry-value-2.exp
@@ -93,7 +93,7 @@ Dwarf::assemble $asm_file {
 }
 
 if { [prepare_for_testing "failed to prepare" $testfile \
-	  [list $srcfile $asm_file] {nodebug}] } {
+	  [list $srcfile $asm_file] {symtab}] } {
     return
 }
 
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-entry-value.exp b/gdb/testsuite/gdb.dwarf2/dw2-entry-value.exp
index fecb2e9296d..28fe5658211 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-entry-value.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-entry-value.exp
@@ -17,7 +17,7 @@ load_lib dwarf.exp
 # This test can only be run on targets which support DWARF-2 and use gas.
 require dwarf2_support
 
-if { [prepare_for_testing "failed to prepare" "dw2-entry-value" {dw2-entry-value-main.c dw2-entry-value.S} {nodebug}] } {
+if { [prepare_for_testing "failed to prepare" "dw2-entry-value" {dw2-entry-value-main.c dw2-entry-value.S} {symtab}] } {
     return
 }
 
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-epilogue-begin.exp.tcl b/gdb/testsuite/gdb.dwarf2/dw2-epilogue-begin.exp.tcl
index d74a8db0a7b..c9aab811e83 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-epilogue-begin.exp.tcl
+++ b/gdb/testsuite/gdb.dwarf2/dw2-epilogue-begin.exp.tcl
@@ -165,7 +165,7 @@ Dwarf::assemble $asm_file {
 }
 
 if { [prepare_for_testing "failed to prepare" ${testfile} \
-	  [list $srcfile $asm_file] {nodebug}] } {
+	  [list $srcfile $asm_file] {symtab}] } {
     return
 }
 
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-error.exp b/gdb/testsuite/gdb.dwarf2/dw2-error.exp
index 01d07a4e6ec..5e5c6e9ba63 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-error.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-error.exp
@@ -24,7 +24,7 @@ require is_x86_64_m64_target
 
 # We can't use prepare_for_testing here because we need to check the
 # 'file' command's output.
-if {[build_executable $testfile.exp $testfile $srcfile {nodebug quiet}]} {
+if {[build_executable $testfile.exp $testfile $srcfile {symtab quiet}]} {
     return
 }
 
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-extend-inline-block.exp b/gdb/testsuite/gdb.dwarf2/dw2-extend-inline-block.exp
index f2a5e7a54fa..b58fb30fd7f 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-extend-inline-block.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-extend-inline-block.exp
@@ -517,7 +517,7 @@ proc check_for_block_ranges_2 {} {
 
 proc run_test { asm_file testfile block_check_func } {
     if {[prepare_for_testing "failed to prepare" $testfile \
-	     [list $::srcfile $asm_file] {nodebug}]} {
+	     [list $::srcfile $asm_file] {symtab}]} {
 	return
     }
 
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-fixed-point.exp b/gdb/testsuite/gdb.dwarf2/dw2-fixed-point.exp
index c52f7302ea6..c16dc686594 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-fixed-point.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-fixed-point.exp
@@ -113,7 +113,7 @@ Dwarf::assemble $asm_file {
 }
 
 if { [prepare_for_testing ${testfile}.exp ${testfile} \
-	  [list $srcfile $asm_file] {nodebug}] } {
+	  [list $srcfile $asm_file] {symtab}] } {
     return
 }
 
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-gas-workaround.exp b/gdb/testsuite/gdb.dwarf2/dw2-gas-workaround.exp
index a6e81e2407d..2b0a8ea3cf0 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-gas-workaround.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-gas-workaround.exp
@@ -89,7 +89,7 @@ proc create_dwarf_assembly {source_file one_diridx} {
 
 set asm_file [create_dwarf_assembly $srcfile2 false]
 if { [prepare_for_testing "failed to prepare" ${testfile} \
-	  [list $srcfile $asm_file] {nodebug}] } {
+	  [list $srcfile $asm_file] {symtab}] } {
     return
 }
 
@@ -107,7 +107,7 @@ gdb_test_multiple "ptype bar" "" {
 # directory indexes is only one.
 set asm_file [create_dwarf_assembly $srcfile3 true]
 if {[prepare_for_testing "failed to prepare" ${testfile}-one-diridx \
-	 [list $srcfile $asm_file] {nodebug}] } {
+	 [list $srcfile $asm_file] {symtab}] } {
     return
 }
 
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-icc-opaque.exp b/gdb/testsuite/gdb.dwarf2/dw2-icc-opaque.exp
index d28b6a93689..d83d2a3d324 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-icc-opaque.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-icc-opaque.exp
@@ -88,7 +88,7 @@ Dwarf::assemble $asm_file {
 }
 
 if { [prepare_for_testing "failed to prepare" ${testfile} \
-	  [list $srcfile $asm_file] {nodebug}] } {
+	  [list $srcfile $asm_file] {symtab}] } {
     return
 }
 
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-icycle.exp b/gdb/testsuite/gdb.dwarf2/dw2-icycle.exp
index 59a5ff6aaf9..2345321cb7c 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-icycle.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-icycle.exp
@@ -23,7 +23,7 @@ require dwarf2_support
 standard_testfile .S main.c
 
 if { [build_executable "failed to prepare" ${testfile} \
-	  [list $srcfile $srcfile2] {nodebug}] } {
+	  [list $srcfile $srcfile2] {symtab}] } {
     return
 }
 
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-ifort-parameter.exp b/gdb/testsuite/gdb.dwarf2/dw2-ifort-parameter.exp
index 7efeec9b489..105a5351be5 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-ifort-parameter.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-ifort-parameter.exp
@@ -58,7 +58,7 @@ Dwarf::assemble $asm_file {
 }
 
 if { [prepare_for_testing "failed to prepare" ${testfile} \
-	  [list $srcfile $asm_file] {nodebug}] } {
+	  [list $srcfile $asm_file] {symtab}] } {
     return
 }
 
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-inline-break.exp b/gdb/testsuite/gdb.dwarf2/dw2-inline-break.exp
index 114252335de..49b84fbc50e 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-inline-break.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-inline-break.exp
@@ -28,7 +28,7 @@ set basename "inline-break"
 
 standard_testfile .S
 
-if { [prepare_for_testing "failed to prepare" $testfile $srcfile {nodebug}] } {
+if { [prepare_for_testing "failed to prepare" $testfile $srcfile {symtab}] } {
     return
 }
 
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-inline-bt.exp b/gdb/testsuite/gdb.dwarf2/dw2-inline-bt.exp
index 3a34bf060d9..6c7feded911 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-inline-bt.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-inline-bt.exp
@@ -98,7 +98,7 @@ set return_addr_in_main [get_hexadecimal_valueof "\$pc" "*UNKNOWN*" \
 # to parameterise this test in the future.
 
 proc do_test { } {
-    set build_options {nodebug}
+    set build_options {symtab}
 
     set asm_file [standard_output_file $::srcfile2]
     Dwarf::assemble $asm_file {
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-inline-header-1.exp b/gdb/testsuite/gdb.dwarf2/dw2-inline-header-1.exp
index 951434ba7b2..23b9ed61144 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-inline-header-1.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-inline-header-1.exp
@@ -65,7 +65,7 @@ proc do_test { start_label func_name tag } {
     standard_testfile dw2-inline-header-lbls.c dw2-inline-header-${tag}.S \
 	dw2-inline-header.c dw2-inline-header.h
 
-    set build_options {nodebug optimize=-O1}
+    set build_options {symtab optimize=-O1}
 
     set asm_file [standard_output_file $srcfile2]
     Dwarf::assemble $asm_file {
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-inline-header-2.exp b/gdb/testsuite/gdb.dwarf2/dw2-inline-header-2.exp
index b3a4176a665..76f3f5a48e3 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-inline-header-2.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-inline-header-2.exp
@@ -56,7 +56,7 @@ require is_c_compiler_gcc
 standard_testfile dw2-inline-header-lbls.c dw2-inline-header.S \
     dw2-inline-header.c dw2-inline-header.h
 
-set build_options {nodebug optimize=-O1}
+set build_options {symtab optimize=-O1}
 
 set asm_file [standard_output_file $srcfile2]
 Dwarf::assemble $asm_file {
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-inline-header-3.exp b/gdb/testsuite/gdb.dwarf2/dw2-inline-header-3.exp
index c1faccb883a..84cb607568c 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-inline-header-3.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-inline-header-3.exp
@@ -45,7 +45,7 @@ require is_c_compiler_gcc
 standard_testfile dw2-inline-header-lbls.c dw2-inline-header.S \
     dw2-inline-header.c dw2-inline-header.h
 
-set build_options {nodebug optimize=-O1}
+set build_options {symtab optimize=-O1}
 
 set asm_file [standard_output_file $srcfile2]
 Dwarf::assemble $asm_file {
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-inline-many-frames.exp b/gdb/testsuite/gdb.dwarf2/dw2-inline-many-frames.exp
index 7709fec14fc..9377d8fadef 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-inline-many-frames.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-inline-many-frames.exp
@@ -285,7 +285,7 @@ Dwarf::assemble $asm_file {
 }
 
 if { [prepare_for_testing "failed to prepare" ${testfile} \
-	  [list $srcfile $asm_file] {nodebug}] } {
+	  [list $srcfile $asm_file] {symtab}] } {
     return
 }
 
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-inline-param.exp b/gdb/testsuite/gdb.dwarf2/dw2-inline-param.exp
index e6859159c29..4146ec4d093 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-inline-param.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-inline-param.exp
@@ -22,7 +22,7 @@ standard_testfile .S -main.c
 set binfile_stripped ${binfile}-stripped
 
 if { [prepare_for_testing "failed to prepare" "${testfile}" \
-	  [list $srcfile2 $srcfile] {nodebug nopie}] } {
+	  [list $srcfile2 $srcfile] {symtab nopie}] } {
     return
 }
 
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-inline-small-func.exp b/gdb/testsuite/gdb.dwarf2/dw2-inline-small-func.exp
index bf372fcd563..7613f543d31 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-inline-small-func.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-inline-small-func.exp
@@ -119,7 +119,7 @@ Dwarf::assemble $asm_file {
 }
 
 if { [prepare_for_testing "failed to prepare" ${testfile} \
-	  [list $srcfile $asm_file] {nodebug optimize=-O1}] } {
+	  [list $srcfile $asm_file] {symtab optimize=-O1}] } {
     return
 }
 
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-inline-stepping.exp b/gdb/testsuite/gdb.dwarf2/dw2-inline-stepping.exp
index 07e9ef45be0..f47da4fb4c1 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-inline-stepping.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-inline-stepping.exp
@@ -122,7 +122,7 @@ Dwarf::assemble $asm_file {
 }
 
 if { [prepare_for_testing "failed to prepare" ${testfile} \
-	  [list $srcfile $asm_file] {nodebug}] } {
+	  [list $srcfile $asm_file] {symtab}] } {
     return
 }
 
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-inline-with-lexical-scope.exp b/gdb/testsuite/gdb.dwarf2/dw2-inline-with-lexical-scope.exp
index 1454b1e14c4..d06936c300b 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-inline-with-lexical-scope.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-inline-with-lexical-scope.exp
@@ -131,7 +131,7 @@ Dwarf::assemble $asm_file {
 }
 
 if {[prepare_for_testing "failed to prepare" ${testfile} \
-	 [list $srcfile $asm_file] {nodebug}]} {
+	 [list $srcfile $asm_file] {symtab}]} {
     return
 }
 
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-inter-cu-error-2.exp b/gdb/testsuite/gdb.dwarf2/dw2-inter-cu-error-2.exp
index b783bf7434e..c47abf9a5a6 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-inter-cu-error-2.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-inter-cu-error-2.exp
@@ -44,7 +44,7 @@ Dwarf::assemble $asm_file {
 }
 
 if {[build_executable "failed to prepare" $testfile \
-	 [list $asm_file $srcfile] {nodebug}]} {
+	 [list $asm_file $srcfile] {symtab}]} {
     return
 }
 
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-inter-cu-error.exp b/gdb/testsuite/gdb.dwarf2/dw2-inter-cu-error.exp
index 2e892350db5..9324d892bfa 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-inter-cu-error.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-inter-cu-error.exp
@@ -46,7 +46,7 @@ Dwarf::assemble $asm_file {
 }
 
 if {[build_executable "failed to prepare" $testfile \
-	 [list $asm_file $srcfile] {nodebug}]} {
+	 [list $asm_file $srcfile] {symtab}]} {
     return
 }
 
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-inter-cu-forth-and-back.exp b/gdb/testsuite/gdb.dwarf2/dw2-inter-cu-forth-and-back.exp
index a1aee9b2f47..1661215b9cd 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-inter-cu-forth-and-back.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-inter-cu-forth-and-back.exp
@@ -56,7 +56,7 @@ Dwarf::assemble $asm_file {
 }
 
 if {[prepare_for_testing "failed to prepare" $testfile \
-	 [list $asm_file $srcfile] {nodebug}]} {
+	 [list $asm_file $srcfile] {symtab}]} {
     return
 }
 
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-inter-cu-symbol.exp b/gdb/testsuite/gdb.dwarf2/dw2-inter-cu-symbol.exp
index 964868f8d3e..ddcd1b994e4 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-inter-cu-symbol.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-inter-cu-symbol.exp
@@ -73,7 +73,7 @@ Dwarf::assemble $asm_file {
 }
 
 if { [prepare_for_testing "failed to prepare" ${testfile} \
-	  [list $srcfile $asm_file] {nodebug}] } {
+	  [list $srcfile $asm_file] {symtab}] } {
     return
 }
 
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-is-stmt-2.exp b/gdb/testsuite/gdb.dwarf2/dw2-is-stmt-2.exp
index df29523bcaa..a71c08c2357 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-is-stmt-2.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-is-stmt-2.exp
@@ -144,7 +144,7 @@ Dwarf::assemble $asm_file {
 }
 
 if { [prepare_for_testing "failed to prepare" ${testfile} \
-	  [list $srcfile $asm_file] {nodebug}] } {
+	  [list $srcfile $asm_file] {symtab}] } {
     return
 }
 
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-is-stmt.exp b/gdb/testsuite/gdb.dwarf2/dw2-is-stmt.exp
index 6d0c3795ea3..c1c862acb2b 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-is-stmt.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-is-stmt.exp
@@ -95,7 +95,7 @@ Dwarf::assemble $asm_file {
 }
 
 if { [prepare_for_testing "failed to prepare" ${testfile} \
-	  [list $srcfile $asm_file] {nodebug}] } {
+	  [list $srcfile $asm_file] {symtab}] } {
     return
 }
 
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-lexical-block-bare.exp b/gdb/testsuite/gdb.dwarf2/dw2-lexical-block-bare.exp
index eb119d062c0..4213270f2d3 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-lexical-block-bare.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-lexical-block-bare.exp
@@ -55,7 +55,7 @@ Dwarf::assemble $asm_file {
 }
 
 if { [prepare_for_testing "failed to prepare" ${testfile} \
-			  [list $srcfile $asm_file] {nodebug}] } {
+			  [list $srcfile $asm_file] {symtab}] } {
     return
 }
 
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-line-number-zero.exp b/gdb/testsuite/gdb.dwarf2/dw2-line-number-zero.exp
index edc479134b1..badd9d7d468 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-line-number-zero.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-line-number-zero.exp
@@ -109,7 +109,7 @@ Dwarf::assemble $asm_file {
 }
 
 if { [prepare_for_testing "failed to prepare" ${testfile} \
-	  [list $srcfile $asm_file] {nodebug}] } {
+	  [list $srcfile $asm_file] {symtab}] } {
     return
 }
 
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-line-unknown-extended-opcode.exp b/gdb/testsuite/gdb.dwarf2/dw2-line-unknown-extended-opcode.exp
index 552da389598..5b111b326b4 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-line-unknown-extended-opcode.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-line-unknown-extended-opcode.exp
@@ -77,7 +77,7 @@ Dwarf::assemble { file_id $f } {
 close $f
 
 if { [prepare_for_testing "failed to prepare" ${testfile} \
-	  [list $srcfile $asm_file] {nodebug}] } {
+	  [list $srcfile $asm_file] {symtab}] } {
     return
 }
 
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-lines.exp b/gdb/testsuite/gdb.dwarf2/dw2-lines.exp
index 12eb4a70373..5fdce89615e 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-lines.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-lines.exp
@@ -115,7 +115,7 @@ proc test_1 { _cv _cdw64 _lv _ldw64 {_string_form ""}} {
     }
 
     if { [prepare_for_testing "failed to prepare" ${testfile}.[prefix_id] \
-	      [list $srcfile $asm_file] {nodebug}] } {
+	      [list $srcfile $asm_file] {symtab}] } {
 	return -1
     }
 
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-main-no-line-number.exp b/gdb/testsuite/gdb.dwarf2/dw2-main-no-line-number.exp
index 10ddbfc1422..0c485f36fa6 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-main-no-line-number.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-main-no-line-number.exp
@@ -45,7 +45,7 @@ Dwarf::assemble $asm_file {
 }
 
 if { [prepare_for_testing "failed to prepare" ${testfile} \
-	  [list $srcfile $asm_file] {nodebug}] } {
+	  [list $srcfile $asm_file] {symtab}] } {
     return
 }
 
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-missing-cu-tag.exp b/gdb/testsuite/gdb.dwarf2/dw2-missing-cu-tag.exp
index 74a5ea90b13..ec8718d9efa 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-missing-cu-tag.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-missing-cu-tag.exp
@@ -40,7 +40,7 @@ Dwarf::assemble $asm_file {
 # Don't use prepare_for_testing here as we want to manually run the
 # file command (so we can check its output).
 if {[build_executable "failed to build executable" $testfile \
-	 [list $srcfile $asm_file] {nodebug quiet}]} {
+	 [list $srcfile $asm_file] {symtab quiet}]} {
     return
 }
 
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-namespaceless-anonymous.exp b/gdb/testsuite/gdb.dwarf2/dw2-namespaceless-anonymous.exp
index 34f911eca12..140a3336104 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-namespaceless-anonymous.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-namespaceless-anonymous.exp
@@ -54,7 +54,7 @@ Dwarf::assemble $asm_file {
 }
 
 if {[prepare_for_testing ${testfile}.exp ${testfile} \
-	 [list $srcfile $asm_file] {nodebug}] } {
+	 [list $srcfile $asm_file] {symtab}] } {
     return
 }
 
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-noloc.exp b/gdb/testsuite/gdb.dwarf2/dw2-noloc.exp
index 962e6ba2a51..cbe713afdc7 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-noloc.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-noloc.exp
@@ -210,7 +210,7 @@ Dwarf::assemble $asm_file {
     }
 }
 
-if { [prepare_for_testing "failed to prepare" ${testfile} [list $srcfile $asm_file] {nodebug}] } {
+if { [prepare_for_testing "failed to prepare" ${testfile} [list $srcfile $asm_file] {symtab}] } {
     return
 }
 
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-op-call.exp b/gdb/testsuite/gdb.dwarf2/dw2-op-call.exp
index 852eb5b5e04..17b4d759701 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-op-call.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-op-call.exp
@@ -22,7 +22,7 @@ require dwarf2_support
 standard_testfile .S main.c
 
 if { [prepare_for_testing "failed to prepare" ${testfile} \
-	  [list $srcfile $srcfile2] {nodebug}] } {
+	  [list $srcfile $srcfile2] {symtab}] } {
     return
 }
 
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-op-out-param.exp b/gdb/testsuite/gdb.dwarf2/dw2-op-out-param.exp
index 92fd7f71fb9..89df3a677cc 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-op-out-param.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-op-out-param.exp
@@ -23,7 +23,7 @@ require dwarf2_support
 # This test can only be run on x86-64 targets.
 require is_x86_64_m64_target
 
-if { [prepare_for_testing "failed to prepare" "${test}" ${test}.S {nodebug}] } {
+if { [prepare_for_testing "failed to prepare" "${test}" ${test}.S {symtab}] } {
     return
 }
 
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-opt-structptr.exp b/gdb/testsuite/gdb.dwarf2/dw2-opt-structptr.exp
index 7951d251444..c9a7783c464 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-opt-structptr.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-opt-structptr.exp
@@ -121,7 +121,7 @@ proc build_test_program {} {
     }
 
     set sources "$srcfile $asm_file"
-    if {[build_executable "failed to compile" $testfile $sources {nodebug}]} {
+    if {[build_executable "failed to compile" $testfile $sources {symtab}]} {
 	return -1
     }
 }
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-out-of-range-end-of-seq.exp b/gdb/testsuite/gdb.dwarf2/dw2-out-of-range-end-of-seq.exp
index 3d790f1d4af..9992a184ccf 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-out-of-range-end-of-seq.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-out-of-range-end-of-seq.exp
@@ -75,7 +75,7 @@ Dwarf::assemble $asm_file {
 }
 
 if { [prepare_for_testing "failed to prepare" ${testfile} \
-	  [list $srcfile $asm_file] {nodebug}] } {
+	  [list $srcfile $asm_file] {symtab}] } {
     return
 }
 
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-param-error.exp b/gdb/testsuite/gdb.dwarf2/dw2-param-error.exp
index cdd3923cb2c..a84cf831c4f 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-param-error.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-param-error.exp
@@ -20,7 +20,7 @@ require dwarf2_support
 standard_testfile .S -main.c
 
 if { [prepare_for_testing "failed to prepare" "${testfile}" \
-	  [list $srcfile2 $srcfile] {nodebug}] } {
+	  [list $srcfile2 $srcfile] {symtab}] } {
     return
 }
 
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-prologue-end-2.exp b/gdb/testsuite/gdb.dwarf2/dw2-prologue-end-2.exp
index acb9f3bb600..035f51d79c4 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-prologue-end-2.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-prologue-end-2.exp
@@ -72,7 +72,7 @@ Dwarf::assemble $asm_file {
 }
 
 if { [prepare_for_testing "failed to prepare" ${testfile} \
-	  [list $srcfile $asm_file] {nodebug}] } {
+	  [list $srcfile $asm_file] {symtab}] } {
     return
 }
 
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-prologue-end.exp b/gdb/testsuite/gdb.dwarf2/dw2-prologue-end.exp
index 8032f71c7d9..36ee07941b0 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-prologue-end.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-prologue-end.exp
@@ -79,7 +79,7 @@ Dwarf::assemble $asm_file {
 }
 
 if { [prepare_for_testing "failed to prepare" ${testfile} \
-	  [list $srcfile $asm_file] {nodebug}] } {
+	  [list $srcfile $asm_file] {symtab}] } {
     return
 }
 
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-ranges-base.exp b/gdb/testsuite/gdb.dwarf2/dw2-ranges-base.exp
index 0b792f8e4cf..dc83c7c105f 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-ranges-base.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-ranges-base.exp
@@ -117,7 +117,7 @@ Dwarf::assemble $asm_file {
 }
 
 if { [prepare_for_testing "failed to prepare" ${testfile} \
-	  [list $srcfile $asm_file] {nodebug}] } {
+	  [list $srcfile $asm_file] {symtab}] } {
     return
 }
 
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-ranges-func.exp b/gdb/testsuite/gdb.dwarf2/dw2-ranges-func.exp
index 032b39912c7..27d6db76c06 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-ranges-func.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-ranges-func.exp
@@ -201,7 +201,7 @@ proc do_test {suffix} {
     }
 
     if { [prepare_for_testing "failed to prepare" ${testfile} \
-	      [list $srcfile $asm_file] {nodebug}] } {
+	      [list $srcfile $asm_file] {symtab}] } {
 	return -1
     }
 
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-ranges-overlap.exp b/gdb/testsuite/gdb.dwarf2/dw2-ranges-overlap.exp
index 924752ccd65..22c538fe6e0 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-ranges-overlap.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-ranges-overlap.exp
@@ -66,7 +66,7 @@ Dwarf::assemble $asm_file {
 }
 
 if { [prepare_for_testing "failed to prepare" ${testfile} \
-	  [list $srcfile $asm_file] {nodebug}] } {
+	  [list $srcfile $asm_file] {symtab}] } {
     return
 }
 
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-ranges-psym-warning.exp b/gdb/testsuite/gdb.dwarf2/dw2-ranges-psym-warning.exp
index ea5ef93c014..0e38b182d56 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-ranges-psym-warning.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-ranges-psym-warning.exp
@@ -101,7 +101,7 @@ Dwarf::assemble $asm_file {
 }
 
 if { [build_executable "failed to prepare" ${testfile} \
-	  [list $srcfile $srcfile2 $asm_file] {nodebug}] } {
+	  [list $srcfile $srcfile2 $asm_file] {symtab}] } {
     return
 }
 
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-ranges-psym.exp b/gdb/testsuite/gdb.dwarf2/dw2-ranges-psym.exp
index eb4187f151c..8dd6edf9f75 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-ranges-psym.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-ranges-psym.exp
@@ -112,7 +112,7 @@ Dwarf::assemble $asm_file {
 }
 
 if { [build_executable "failed to prepare" ${testfile} \
-	  [list $srcfile $srcfile2 $asm_file] {nodebug}] } {
+	  [list $srcfile $srcfile2 $asm_file] {symtab}] } {
     return
 }
 
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-reg-undefined.exp b/gdb/testsuite/gdb.dwarf2/dw2-reg-undefined.exp
index b9a8cbbdb31..75a7388763a 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-reg-undefined.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-reg-undefined.exp
@@ -22,7 +22,7 @@ require is_x86_64_m64_target
 
 standard_testfile .S
 
-if { [prepare_for_testing "failed to prepare" $testfile $srcfile {nodebug nopie}] } {
+if { [prepare_for_testing "failed to prepare" $testfile $srcfile {symtab nopie}] } {
     return
 }
 
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-regno-invalid.exp b/gdb/testsuite/gdb.dwarf2/dw2-regno-invalid.exp
index c4aac0b4818..fadd7f72ca4 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-regno-invalid.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-regno-invalid.exp
@@ -55,7 +55,7 @@ Dwarf::assemble $asm_file {
 }
 
 if { [prepare_for_testing "failed to prepare" ${testfile} \
-			  [list $srcfile $asm_file] {nodebug}] } {
+			  [list $srcfile $asm_file] {symtab}] } {
     return
 }
 
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-restrict.exp b/gdb/testsuite/gdb.dwarf2/dw2-restrict.exp
index be138b89693..f6c6f061729 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-restrict.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-restrict.exp
@@ -24,7 +24,7 @@ require is_x86_64_m64_target
 standard_testfile .S
 
 if {[prepare_for_testing "failed to prepare" $testfile $srcfile \
-	 {nodebug nopie}]} {
+	 {symtab nopie}]} {
     return
 }
 
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-single-line-discriminators.exp b/gdb/testsuite/gdb.dwarf2/dw2-single-line-discriminators.exp
index 6812d5b06b8..9887fe6a307 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-single-line-discriminators.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-single-line-discriminators.exp
@@ -27,7 +27,7 @@ require is_x86_64_m64_target
 standard_testfile .S
 set csrcfile ${testfile}.c
 
-if { [prepare_for_testing "failed to prepare" "${testfile}" $srcfile {nodebug nopie}] } {
+if { [prepare_for_testing "failed to prepare" "${testfile}" $srcfile {symtab nopie}] } {
     return
 }
 
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-skipped-line-entries.exp b/gdb/testsuite/gdb.dwarf2/dw2-skipped-line-entries.exp
index 1920ec3ee98..0b6f35d2aa6 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-skipped-line-entries.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-skipped-line-entries.exp
@@ -151,7 +151,7 @@ Dwarf::assemble $asm_file {
 }
 
 if { [prepare_for_testing "failed to prepare" ${testfile} \
-	  [list $srcfile $asm_file] {nodebug}] } {
+	  [list $srcfile $asm_file] {symtab}] } {
     return
 }
 
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-step-between-different-inline-functions.exp b/gdb/testsuite/gdb.dwarf2/dw2-step-between-different-inline-functions.exp
index 02074b1b33c..baef96d25dc 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-step-between-different-inline-functions.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-step-between-different-inline-functions.exp
@@ -179,7 +179,7 @@ Dwarf::assemble $asm_file {
 }
 
 if {[prepare_for_testing "failed to prepare" "${::testfile}" \
-	 [list $srcfile $asm_file] {nodebug}]} {
+	 [list $srcfile $asm_file] {symtab}]} {
     return
 }
 
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-step-between-inline-func-blocks.exp b/gdb/testsuite/gdb.dwarf2/dw2-step-between-inline-func-blocks.exp
index 70619ae5b69..f7c68b5aedf 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-step-between-inline-func-blocks.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-step-between-inline-func-blocks.exp
@@ -162,7 +162,7 @@ Dwarf::assemble $asm_file {
 }
 
 if {[prepare_for_testing "failed to prepare" "${::testfile}" \
-	 [list $srcfile $asm_file] {nodebug}]} {
+	 [list $srcfile $asm_file] {symtab}]} {
     return
 }
 
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-step-out-of-function-no-stmt.exp b/gdb/testsuite/gdb.dwarf2/dw2-step-out-of-function-no-stmt.exp
index 285cd00bfc5..4496858658b 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-step-out-of-function-no-stmt.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-step-out-of-function-no-stmt.exp
@@ -98,7 +98,7 @@ Dwarf::assemble $asm_file {
 }
 
 if { [prepare_for_testing "failed to prepare" ${testfile} \
-	  [list $srcfile $asm_file] {nodebug}] } {
+	  [list $srcfile $asm_file] {symtab}] } {
     return
 }
 
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-undefined-ret-addr.exp b/gdb/testsuite/gdb.dwarf2/dw2-undefined-ret-addr.exp
index 8dac3949c5f..771c0a88ef1 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-undefined-ret-addr.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-undefined-ret-addr.exp
@@ -22,7 +22,7 @@ require dwarf2_support
 # This test can only be run on x86-64 targets.
 require is_x86_64_m64_target
 
-if {[prepare_for_testing "failed to prepare" "$testfile" $srcfile {nodebug nopie}]} {
+if {[prepare_for_testing "failed to prepare" "$testfile" $srcfile {symtab nopie}]} {
     return
 }
 
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-unexpected-entry-pc.exp b/gdb/testsuite/gdb.dwarf2/dw2-unexpected-entry-pc.exp
index e57fa1affc9..12eeab9b0cd 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-unexpected-entry-pc.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-unexpected-entry-pc.exp
@@ -227,7 +227,7 @@ proc run_test { producer entry_label dwarf_version with_line_table } {
     }
 
     if {[prepare_for_testing "failed to prepare" "${dw_testname}" \
-	     [list $::srcfile $asm_file] {nodebug}]} {
+	     [list $::srcfile $asm_file] {symtab}]} {
 	return false
     }
 
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-unresolved.exp b/gdb/testsuite/gdb.dwarf2/dw2-unresolved.exp
index 1034ab5faf4..3309f08f928 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-unresolved.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-unresolved.exp
@@ -22,7 +22,7 @@ set additional_flags [gdb_target_symbol_prefix_flags_asm]
 
 if { [prepare_for_testing "failed to prepare" "dw2-unresolved" \
 	{dw2-unresolved-main.c dw2-unresolved.S} \
-	[list nodebug $additional_flags]] } {
+	[list symtab $additional_flags]] } {
     return
 }
 
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-unusual-field-names.exp b/gdb/testsuite/gdb.dwarf2/dw2-unusual-field-names.exp
index e9bed9ba10c..3adda6d0e14 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-unusual-field-names.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-unusual-field-names.exp
@@ -108,7 +108,7 @@ proc run_test { field_name } {
     }
 
     if { [prepare_for_testing "failed to prepare" ${testfile} \
-	      [list $srcfile $asm_file] {nodebug}] } {
+	      [list $srcfile $asm_file] {symtab}] } {
 	return -1
     }
 
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-using-debug-str.exp b/gdb/testsuite/gdb.dwarf2/dw2-using-debug-str.exp
index 68d25f70375..a54ec1b02d8 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-using-debug-str.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-using-debug-str.exp
@@ -85,7 +85,7 @@ Dwarf::assemble $asm_file {
 }
 
 if { [prepare_for_testing "failed to prepare" ${testfile} \
-	  [list $srcfile $asm_file] {nodebug}] } {
+	  [list $srcfile $asm_file] {symtab}] } {
     return
 }
 
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-var-zero-addr.exp b/gdb/testsuite/gdb.dwarf2/dw2-var-zero-addr.exp
index 04a2aa06ea9..23ac3e16655 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-var-zero-addr.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-var-zero-addr.exp
@@ -20,7 +20,7 @@ require dwarf2_support
 standard_testfile .S main.c
 
 if {[prepare_for_testing "failed to prepare" ${testfile} \
-	 [list $srcfile $srcfile2] {nodebug}]} {
+	 [list $srcfile $srcfile2] {symtab}]} {
     return
 }
 
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-vendor-extended-opcode.exp b/gdb/testsuite/gdb.dwarf2/dw2-vendor-extended-opcode.exp
index b76abddebd5..977f91edfbd 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-vendor-extended-opcode.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-vendor-extended-opcode.exp
@@ -63,7 +63,7 @@ Dwarf::assemble $asm_file {
 }
 
 if { [prepare_for_testing "failed to prepare" ${testfile} \
-	  [list $srcfile $asm_file] {nodebug}] } {
+	  [list $srcfile $asm_file] {symtab}] } {
     return
 }
 
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-weird-type-len.exp b/gdb/testsuite/gdb.dwarf2/dw2-weird-type-len.exp
index 5d31a05b06b..87a9504bb94 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-weird-type-len.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-weird-type-len.exp
@@ -87,7 +87,7 @@ Dwarf::assemble $asm_file {
 }
 
 if { [prepare_for_testing "failed to prepare" ${testfile} \
-	  [list $srcfile $asm_file] {nodebug}] } {
+	  [list $srcfile $asm_file] {symtab}] } {
     return
 }
 
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-wrong-mangled-name.exp b/gdb/testsuite/gdb.dwarf2/dw2-wrong-mangled-name.exp
index bec85887e03..7acca936ecd 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-wrong-mangled-name.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-wrong-mangled-name.exp
@@ -53,7 +53,7 @@ Dwarf::assemble $asm_file {
 }
 
 if {[prepare_for_testing "failed to prepare" ${testfile} \
-	 [list $srcfile $asm_file] {nodebug}]} {
+	 [list $srcfile $asm_file] {symtab}]} {
     return
 }
 
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-zero-range.exp b/gdb/testsuite/gdb.dwarf2/dw2-zero-range.exp
index 11942956caf..c5000f22847 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-zero-range.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-zero-range.exp
@@ -148,7 +148,7 @@ foreach_with_prefix ranges_sect {ranges rnglists} {
 
     set lib_path [standard_output_file shr1-${ranges_sect}.sl]
     set lib_sources [list ${srcdir}/${subdir}/$srcfile2 $asm_file]
-    if { [gdb_compile_shlib $lib_sources $lib_path {nodebug}] != "" } {
+    if { [gdb_compile_shlib $lib_sources $lib_path {symtab}] != "" } {
 	untested "failed to compile"
 	return
     }
diff --git a/gdb/testsuite/gdb.dwarf2/dwz-unused-pu.exp b/gdb/testsuite/gdb.dwarf2/dwz-unused-pu.exp
index db497636d64..3bda97141a3 100644
--- a/gdb/testsuite/gdb.dwarf2/dwz-unused-pu.exp
+++ b/gdb/testsuite/gdb.dwarf2/dwz-unused-pu.exp
@@ -55,7 +55,7 @@ Dwarf::assemble $asm_file {
 }
 
 if { [prepare_for_testing "failed to prepare" $testfile \
-	  [list $asm_file $srcfile] {nodebug}] } {
+	  [list $asm_file $srcfile] {symtab}] } {
     return
 }
 
diff --git a/gdb/testsuite/gdb.dwarf2/dwznolink.exp b/gdb/testsuite/gdb.dwarf2/dwznolink.exp
index 898ae1637f5..5bfd76e32a1 100644
--- a/gdb/testsuite/gdb.dwarf2/dwznolink.exp
+++ b/gdb/testsuite/gdb.dwarf2/dwznolink.exp
@@ -45,7 +45,7 @@ Dwarf::assemble $asm_file {
 # We can't use prepare_for_testing here because we need to check the
 # 'file' command's output.
 if {[build_executable $testfile.exp $testfile \
-	 [list $srcfile $asm_file] {nodebug quiet}]} {
+	 [list $srcfile $asm_file] {symtab quiet}]} {
     return
 }
 
diff --git a/gdb/testsuite/gdb.dwarf2/dyn-type-unallocated.exp b/gdb/testsuite/gdb.dwarf2/dyn-type-unallocated.exp
index 75eb35ec9a5..f8d41c3e42b 100644
--- a/gdb/testsuite/gdb.dwarf2/dyn-type-unallocated.exp
+++ b/gdb/testsuite/gdb.dwarf2/dyn-type-unallocated.exp
@@ -121,7 +121,7 @@ Dwarf::assemble $asm_file {
 }
 
 set flags {}
-lappend flags {nodebug}
+lappend flags {symtab}
 lappend_include_file flags $srcdir/lib/attributes.h
 
 if { [prepare_for_testing "failed to prepare" "${testfile}" \
diff --git a/gdb/testsuite/gdb.dwarf2/dynamic-bit-offset.exp b/gdb/testsuite/gdb.dwarf2/dynamic-bit-offset.exp
index 33ad0de8691..26205de765c 100644
--- a/gdb/testsuite/gdb.dwarf2/dynamic-bit-offset.exp
+++ b/gdb/testsuite/gdb.dwarf2/dynamic-bit-offset.exp
@@ -87,7 +87,7 @@ Dwarf::assemble $asm_file {
 }
 
 if {[prepare_for_testing "failed to prepare" ${testfile} \
-	 [list $srcfile $asm_file] {nodebug}]} {
+	 [list $srcfile $asm_file] {symtab}]} {
     return
 }
 
diff --git a/gdb/testsuite/gdb.dwarf2/dynamic-bit-size.exp b/gdb/testsuite/gdb.dwarf2/dynamic-bit-size.exp
index 3f0c595a457..1e876c5be7f 100644
--- a/gdb/testsuite/gdb.dwarf2/dynamic-bit-size.exp
+++ b/gdb/testsuite/gdb.dwarf2/dynamic-bit-size.exp
@@ -86,7 +86,7 @@ Dwarf::assemble $asm_file {
 }
 
 if {[prepare_for_testing "failed to prepare" ${testfile} \
-	 [list $srcfile $asm_file] {nodebug}]} {
+	 [list $srcfile $asm_file] {symtab}]} {
     return
 }
 
diff --git a/gdb/testsuite/gdb.dwarf2/dynarr-ptr.exp b/gdb/testsuite/gdb.dwarf2/dynarr-ptr.exp
index 1f759c31ded..aa750bb17c7 100644
--- a/gdb/testsuite/gdb.dwarf2/dynarr-ptr.exp
+++ b/gdb/testsuite/gdb.dwarf2/dynarr-ptr.exp
@@ -120,7 +120,7 @@ Dwarf::assemble $asm_file {
 # the compiler.
 
 if { [prepare_for_testing "failed to prepare" ${testfile} \
-	  [list $srcfile $asm_file] {nodebug}] } {
+	  [list $srcfile $asm_file] {symtab}] } {
     return
 }
 
diff --git a/gdb/testsuite/gdb.dwarf2/enqueued-cu-base-addr.exp b/gdb/testsuite/gdb.dwarf2/enqueued-cu-base-addr.exp
index 31eb5f6a839..97bb89641b2 100644
--- a/gdb/testsuite/gdb.dwarf2/enqueued-cu-base-addr.exp
+++ b/gdb/testsuite/gdb.dwarf2/enqueued-cu-base-addr.exp
@@ -71,7 +71,7 @@ Dwarf::assemble $asm_file {
 }
 
 if { [prepare_for_testing "failed to prepare" ${testfile} \
-	  [list $srcfile $asm_file] {nodebug}] } {
+	  [list $srcfile $asm_file] {symtab}] } {
     return
 }
 
diff --git a/gdb/testsuite/gdb.dwarf2/enum-type.exp b/gdb/testsuite/gdb.dwarf2/enum-type.exp
index 5af889a3544..39473062e42 100644
--- a/gdb/testsuite/gdb.dwarf2/enum-type.exp
+++ b/gdb/testsuite/gdb.dwarf2/enum-type.exp
@@ -103,7 +103,7 @@ Dwarf::assemble $asm_file {
 }
 
 if { [prepare_for_testing "failed to prepare" ${testfile} \
-	  [list $srcfile $asm_file] {nodebug}] } {
+	  [list $srcfile $asm_file] {symtab}] } {
     return
 }
 
diff --git a/gdb/testsuite/gdb.dwarf2/fission-absolute-dwo.exp b/gdb/testsuite/gdb.dwarf2/fission-absolute-dwo.exp
index defa9aa5f13..0b2510316ce 100644
--- a/gdb/testsuite/gdb.dwarf2/fission-absolute-dwo.exp
+++ b/gdb/testsuite/gdb.dwarf2/fission-absolute-dwo.exp
@@ -107,7 +107,7 @@ Dwarf::assemble $asm_file {
 # Compile both source files to create the executable.  As we compile
 # 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} \
+if { [build_executable_and_dwo_files "${testfile}.exp" ${binfile} {symtab} \
 	  [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 e1116162666..8278dae1d58 100644
--- a/gdb/testsuite/gdb.dwarf2/fission-base.exp
+++ b/gdb/testsuite/gdb.dwarf2/fission-base.exp
@@ -28,7 +28,7 @@ standard_testfile .S
 
 set obj [standard_output_file "${testfile}.o"]
 set dwo [standard_output_file "${testfile}.dwo"]
-if {[build_executable_and_dwo_files "$testfile.exp" "${binfile}" {nodebug} \
+if {[build_executable_and_dwo_files "$testfile.exp" "${binfile}" {symtab} \
 	 [list $srcfile \
 	      [list split-dwo additional_flags=-DDWO=\"$dwo\"] \
 	      $obj]]} {
diff --git a/gdb/testsuite/gdb.dwarf2/fission-dw-form-strx.exp b/gdb/testsuite/gdb.dwarf2/fission-dw-form-strx.exp
index 956c13ec602..11f77f28b04 100644
--- a/gdb/testsuite/gdb.dwarf2/fission-dw-form-strx.exp
+++ b/gdb/testsuite/gdb.dwarf2/fission-dw-form-strx.exp
@@ -75,7 +75,7 @@ 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} \
+if {[build_executable_and_dwo_files "$testfile.exp" "${binfile}" {symtab} \
 	 [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 b7dffcfa6f9..3311091d041 100644
--- a/gdb/testsuite/gdb.dwarf2/fission-loclists-pie.exp
+++ b/gdb/testsuite/gdb.dwarf2/fission-loclists-pie.exp
@@ -34,7 +34,7 @@ standard_testfile .S
 set obj [standard_output_file "${testfile}.o"]
 set dwo [standard_output_file "${testfile}.dwo"]
 if {[build_executable_and_dwo_files "$testfile.exp" "${binfile}" \
-	 {nodebug pie} \
+	 {symtab pie} \
 	 [list $srcfile \
 	      [list split-dwo additional_flags=-DDWO=\"$dwo\"] \
 	      $obj]]} {
diff --git a/gdb/testsuite/gdb.dwarf2/fission-loclists.exp b/gdb/testsuite/gdb.dwarf2/fission-loclists.exp
index 9f660edbb66..e2708840d3e 100644
--- a/gdb/testsuite/gdb.dwarf2/fission-loclists.exp
+++ b/gdb/testsuite/gdb.dwarf2/fission-loclists.exp
@@ -28,7 +28,7 @@ standard_testfile .S
 
 set obj [standard_output_file "${testfile}.o"]
 set dwo [standard_output_file "${testfile}.dwo"]
-if {[build_executable_and_dwo_files "$testfile.exp" "${binfile}" {nodebug} \
+if {[build_executable_and_dwo_files "$testfile.exp" "${binfile}" {symtab} \
 	 [list $srcfile \
 	      [list split-dwo additional_flags=-DDWO=\"$dwo\"] \
 	      $obj]]} {
diff --git a/gdb/testsuite/gdb.dwarf2/fission-multi-cu.exp b/gdb/testsuite/gdb.dwarf2/fission-multi-cu.exp
index 7fbee80ea80..55f098965ce 100644
--- a/gdb/testsuite/gdb.dwarf2/fission-multi-cu.exp
+++ b/gdb/testsuite/gdb.dwarf2/fission-multi-cu.exp
@@ -196,7 +196,7 @@ Dwarf::assemble $asm_file_2 {
 # Compile all of the input files, split the DWARF into the .dwo files.
 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} \
+if {[build_executable_and_dwo_files "$testfile.exp" "${binfile}" {symtab} \
 	 [list $asm_file_1 {split-dwo} $obj1] \
 	 [list $asm_file_2 {split-dwo} $obj2] \
 	 [list $srcfile {}]]} {
diff --git a/gdb/testsuite/gdb.dwarf2/fission-relative-dwo.exp b/gdb/testsuite/gdb.dwarf2/fission-relative-dwo.exp
index b7a1072102b..dcbd58dc7e3 100644
--- a/gdb/testsuite/gdb.dwarf2/fission-relative-dwo.exp
+++ b/gdb/testsuite/gdb.dwarf2/fission-relative-dwo.exp
@@ -104,7 +104,7 @@ Dwarf::assemble $asm_file {
 # Compile both source files to create the executable.  As we compile
 # 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} \
+if { [build_executable_and_dwo_files "${testfile}.exp" ${testfile} {symtab} \
 	  [list $asm_file {split-dwo} ${object_file}] \
 	  [list $srcfile {}]] } {
     return
diff --git a/gdb/testsuite/gdb.dwarf2/fission-type-unit-locexpr.exp b/gdb/testsuite/gdb.dwarf2/fission-type-unit-locexpr.exp
index be5ce727df0..50bf129e09b 100644
--- a/gdb/testsuite/gdb.dwarf2/fission-type-unit-locexpr.exp
+++ b/gdb/testsuite/gdb.dwarf2/fission-type-unit-locexpr.exp
@@ -144,7 +144,7 @@ Dwarf::assemble $asm_file {
 }
 
 set object_file [standard_output_file ${testfile}.o]
-if { [build_executable_and_dwo_files "${testfile}.exp" ${binfile} {nodebug} \
+if { [build_executable_and_dwo_files "${testfile}.exp" ${binfile} {symtab} \
 	  [list $asm_file {split-dwo} ${object_file}] \
 	  [list $srcfile {}]] } {
     return
diff --git a/gdb/testsuite/gdb.dwarf2/formdata16.exp b/gdb/testsuite/gdb.dwarf2/formdata16.exp
index 1f135508593..cb789bf1cce 100644
--- a/gdb/testsuite/gdb.dwarf2/formdata16.exp
+++ b/gdb/testsuite/gdb.dwarf2/formdata16.exp
@@ -83,7 +83,7 @@ Dwarf::assemble $asm_file {
 }
 
 if { [prepare_for_testing "failed to prepare" ${testfile} \
-			  [list $srcfile $asm_file] {nodebug}] } {
+			  [list $srcfile $asm_file] {symtab}] } {
     return
 }
 
diff --git a/gdb/testsuite/gdb.dwarf2/fortran-var-string.exp b/gdb/testsuite/gdb.dwarf2/fortran-var-string.exp
index 925872bc2c8..f4c91664bcd 100644
--- a/gdb/testsuite/gdb.dwarf2/fortran-var-string.exp
+++ b/gdb/testsuite/gdb.dwarf2/fortran-var-string.exp
@@ -137,7 +137,7 @@ Dwarf::assemble $asm_file {
 # the compiler.
 
 if { [prepare_for_testing "failed to prepare" ${testfile} \
-	  [list $srcfile $asm_file] {nodebug}] } {
+	  [list $srcfile $asm_file] {symtab}] } {
     return
 }
 
diff --git a/gdb/testsuite/gdb.dwarf2/forward-spec-inter-cu.exp b/gdb/testsuite/gdb.dwarf2/forward-spec-inter-cu.exp
index eb1d8a2df58..2fd72594b62 100644
--- a/gdb/testsuite/gdb.dwarf2/forward-spec-inter-cu.exp
+++ b/gdb/testsuite/gdb.dwarf2/forward-spec-inter-cu.exp
@@ -74,7 +74,7 @@ Dwarf::assemble $asm_file {
 }
 
 if {[build_executable "failed to build executable" ${testfile} \
-	 [list $srcfile $asm_file] {nodebug}]} {
+	 [list $srcfile $asm_file] {symtab}]} {
     return
 }
 
diff --git a/gdb/testsuite/gdb.dwarf2/forward-spec.exp b/gdb/testsuite/gdb.dwarf2/forward-spec.exp
index fd7d008adb3..1609f3cc0e1 100644
--- a/gdb/testsuite/gdb.dwarf2/forward-spec.exp
+++ b/gdb/testsuite/gdb.dwarf2/forward-spec.exp
@@ -70,7 +70,7 @@ Dwarf::assemble $asm_file {
 }
 
 if {[prepare_for_testing "failed to prepare" ${testfile} \
-	 [list $srcfile $asm_file] {nodebug}]} {
+	 [list $srcfile $asm_file] {symtab}]} {
     return
 }
 
diff --git a/gdb/testsuite/gdb.dwarf2/gdb-index-nodebug.exp b/gdb/testsuite/gdb.dwarf2/gdb-index-nodebug.exp
index 50f08b59e28..2c29da34288 100644
--- a/gdb/testsuite/gdb.dwarf2/gdb-index-nodebug.exp
+++ b/gdb/testsuite/gdb.dwarf2/gdb-index-nodebug.exp
@@ -18,7 +18,7 @@ load_lib dwarf.exp
 standard_testfile main.c
 
 if {[prepare_for_testing "failed to prepare" "${testfile}" \
-	 [list ${srcfile}] {nodebug}]} {
+	 [list ${srcfile}] {symtab}]} {
     return
 }
 
diff --git a/gdb/testsuite/gdb.dwarf2/implptrconst.exp b/gdb/testsuite/gdb.dwarf2/implptrconst.exp
index 49684e3ec0c..d5aebcc55ed 100644
--- a/gdb/testsuite/gdb.dwarf2/implptrconst.exp
+++ b/gdb/testsuite/gdb.dwarf2/implptrconst.exp
@@ -84,7 +84,7 @@ Dwarf::assemble $asm_file {
 }
 
 if { [prepare_for_testing "failed to prepare" ${testfile} \
-	  [list $srcfile $asm_file] {nodebug}] } {
+	  [list $srcfile $asm_file] {symtab}] } {
     return
 }
 
diff --git a/gdb/testsuite/gdb.dwarf2/implptrpiece.exp b/gdb/testsuite/gdb.dwarf2/implptrpiece.exp
index 9211cf6d24a..05b255816f5 100644
--- a/gdb/testsuite/gdb.dwarf2/implptrpiece.exp
+++ b/gdb/testsuite/gdb.dwarf2/implptrpiece.exp
@@ -102,7 +102,7 @@ Dwarf::assemble $asm_file {
 }
 
 if { [prepare_for_testing "failed to prepare" ${testfile} \
-	  [list $srcfile $asm_file] {nodebug}] } {
+	  [list $srcfile $asm_file] {symtab}] } {
     return
 }
 
diff --git a/gdb/testsuite/gdb.dwarf2/imported-unit-abstract-const-value.exp b/gdb/testsuite/gdb.dwarf2/imported-unit-abstract-const-value.exp
index 1bd00fc9713..42948d528e8 100644
--- a/gdb/testsuite/gdb.dwarf2/imported-unit-abstract-const-value.exp
+++ b/gdb/testsuite/gdb.dwarf2/imported-unit-abstract-const-value.exp
@@ -80,7 +80,7 @@ Dwarf::assemble $asm_file {
 }
 
 if { [prepare_for_testing "failed to prepare" ${testfile} \
-	  [list $srcfile $asm_file] {nodebug}] } {
+	  [list $srcfile $asm_file] {symtab}] } {
     return
 }
 
diff --git a/gdb/testsuite/gdb.dwarf2/imported-unit-bp.exp.tcl b/gdb/testsuite/gdb.dwarf2/imported-unit-bp.exp.tcl
index f9cc72c7172..9f0b3212cdf 100644
--- a/gdb/testsuite/gdb.dwarf2/imported-unit-bp.exp.tcl
+++ b/gdb/testsuite/gdb.dwarf2/imported-unit-bp.exp.tcl
@@ -25,7 +25,7 @@ require is_c_compiler_gcc
 
 standard_testfile imported-unit-bp-alt.c .S imported-unit-bp-main.c
 
-set build_options {nodebug optimize=-O1}
+set build_options {symtab optimize=-O1}
 
 set asm_file [standard_output_file $srcfile2]
 Dwarf::assemble $asm_file {
diff --git a/gdb/testsuite/gdb.dwarf2/imported-unit-c.exp b/gdb/testsuite/gdb.dwarf2/imported-unit-c.exp
index c81b489878c..b7f8142d591 100644
--- a/gdb/testsuite/gdb.dwarf2/imported-unit-c.exp
+++ b/gdb/testsuite/gdb.dwarf2/imported-unit-c.exp
@@ -93,7 +93,7 @@ Dwarf::assemble $asm_file {
 }
 
 if { [prepare_for_testing "failed to prepare" ${testfile} \
-	  [list $srcfile $asm_file] {nodebug}] } {
+	  [list $srcfile $asm_file] {symtab}] } {
     return
 }
 
diff --git a/gdb/testsuite/gdb.dwarf2/imported-unit-runto-main.exp b/gdb/testsuite/gdb.dwarf2/imported-unit-runto-main.exp
index 51f26dd6d41..7ea01ec41c1 100644
--- a/gdb/testsuite/gdb.dwarf2/imported-unit-runto-main.exp
+++ b/gdb/testsuite/gdb.dwarf2/imported-unit-runto-main.exp
@@ -68,7 +68,7 @@ Dwarf::assemble $asm_file {
 }
 
 if { [prepare_for_testing "failed to prepare" ${testfile} \
-	  [list $srcfile $asm_file] {nodebug}] } {
+	  [list $srcfile $asm_file] {symtab}] } {
     return
 }
 
diff --git a/gdb/testsuite/gdb.dwarf2/imported-unit.exp b/gdb/testsuite/gdb.dwarf2/imported-unit.exp
index bd8694a872d..b02b3292c3d 100644
--- a/gdb/testsuite/gdb.dwarf2/imported-unit.exp
+++ b/gdb/testsuite/gdb.dwarf2/imported-unit.exp
@@ -124,7 +124,7 @@ Dwarf::assemble $asm_file {
 }
 
 if { [prepare_for_testing "failed to prepare" ${testfile} \
-	  [list $srcfile $asm_file] {nodebug}] } {
+	  [list $srcfile $asm_file] {symtab}] } {
     return
 }
 
diff --git a/gdb/testsuite/gdb.dwarf2/info-locals-optimized-out.exp b/gdb/testsuite/gdb.dwarf2/info-locals-optimized-out.exp
index 8932cbf5109..da756fa989d 100644
--- a/gdb/testsuite/gdb.dwarf2/info-locals-optimized-out.exp
+++ b/gdb/testsuite/gdb.dwarf2/info-locals-optimized-out.exp
@@ -64,7 +64,7 @@ Dwarf::assemble $asm_file {
 }
 
 if { [prepare_for_testing ${testfile}.exp ${testfile} \
-	  [list $srcfile $asm_file] {nodebug}] } {
+	  [list $srcfile $asm_file] {symtab}] } {
     return
 }
 
diff --git a/gdb/testsuite/gdb.dwarf2/loc-sec-offset.exp b/gdb/testsuite/gdb.dwarf2/loc-sec-offset.exp
index edfcb8842d1..5eb03108e95 100644
--- a/gdb/testsuite/gdb.dwarf2/loc-sec-offset.exp
+++ b/gdb/testsuite/gdb.dwarf2/loc-sec-offset.exp
@@ -96,7 +96,7 @@ foreach_with_prefix is_64 {false true} {
     }
 
     if { [prepare_for_testing "failed to prepare" ${testfile} \
-	      [list $srcfile $asm_file] {nodebug}] } {
+	      [list $srcfile $asm_file] {symtab}] } {
 	return
     }
 
diff --git a/gdb/testsuite/gdb.dwarf2/locexpr-data-member-location.exp b/gdb/testsuite/gdb.dwarf2/locexpr-data-member-location.exp
index 14f0ca8e44a..72bf5754227 100644
--- a/gdb/testsuite/gdb.dwarf2/locexpr-data-member-location.exp
+++ b/gdb/testsuite/gdb.dwarf2/locexpr-data-member-location.exp
@@ -321,11 +321,11 @@ Dwarf::assemble ${asm_file} {
 }
 
 # Compile the shared object again, but this time include / use the
-# DWARF info that we've created above.  Note the use of the "nodebug" option.
-# Any debugging information that we need will be provided by the DWARF info
-# created above.
+# DWARF info that we've created above.  Note we don't use the "debug"
+# option.  Any debugging information that we need will be provided by
+# the DWARF info created above.
 if {[gdb_compile_shlib [list $libsrc $asm_file] $lib_so \
-		       {nodebug}] != ""} {
+		       {symtab}] != ""} {
     untested "failed to compile shared library"
     return
 }
diff --git a/gdb/testsuite/gdb.dwarf2/loclists-multiple-cus.exp b/gdb/testsuite/gdb.dwarf2/loclists-multiple-cus.exp
index e2bacbcb8dc..3a2dc6f2329 100644
--- a/gdb/testsuite/gdb.dwarf2/loclists-multiple-cus.exp
+++ b/gdb/testsuite/gdb.dwarf2/loclists-multiple-cus.exp
@@ -123,7 +123,7 @@ foreach_with_prefix is_64 {false true} {
     }
 
     if { [prepare_for_testing "failed to prepare" ${testfile} \
-	      [list $srcfile $asm_file] {nodebug}] } {
+	      [list $srcfile $asm_file] {symtab}] } {
 	return
     }
 
diff --git a/gdb/testsuite/gdb.dwarf2/loclists-sec-offset.exp b/gdb/testsuite/gdb.dwarf2/loclists-sec-offset.exp
index bc64b7adabd..c3b74e8b5d1 100644
--- a/gdb/testsuite/gdb.dwarf2/loclists-sec-offset.exp
+++ b/gdb/testsuite/gdb.dwarf2/loclists-sec-offset.exp
@@ -211,7 +211,7 @@ foreach_with_prefix is_64 {false true} {
     }
 
     if { [prepare_for_testing "failed to prepare" ${testfile} \
-	      [list $srcfile $asm_file] {nodebug}] } {
+	      [list $srcfile $asm_file] {symtab}] } {
 	return
     }
 
diff --git a/gdb/testsuite/gdb.dwarf2/loclists-start-end.exp b/gdb/testsuite/gdb.dwarf2/loclists-start-end.exp
index c8d9f123625..6a6e3408724 100644
--- a/gdb/testsuite/gdb.dwarf2/loclists-start-end.exp
+++ b/gdb/testsuite/gdb.dwarf2/loclists-start-end.exp
@@ -114,7 +114,7 @@ foreach_with_prefix is_64 {false true} {
     }
 
     if { [prepare_for_testing "failed to prepare" ${testfile} \
-	      [list $srcfile $asm_file] {nodebug}] } {
+	      [list $srcfile $asm_file] {symtab}] } {
 	return
     }
 
diff --git a/gdb/testsuite/gdb.dwarf2/macro-complaints.exp b/gdb/testsuite/gdb.dwarf2/macro-complaints.exp
index 0fd514ac85d..12ce8236888 100644
--- a/gdb/testsuite/gdb.dwarf2/macro-complaints.exp
+++ b/gdb/testsuite/gdb.dwarf2/macro-complaints.exp
@@ -99,7 +99,7 @@ Dwarf::assemble $asm_file {
 }
 
 if { [build_executable "failed to prepare" $testfile \
-	  [list $srcfile $asm_file] {nodebug}] } {
+	  [list $srcfile $asm_file] {symtab}] } {
     return
 }
 
diff --git a/gdb/testsuite/gdb.dwarf2/macro-source-path.exp.tcl b/gdb/testsuite/gdb.dwarf2/macro-source-path.exp.tcl
index 123e565666c..83286c44e39 100644
--- a/gdb/testsuite/gdb.dwarf2/macro-source-path.exp.tcl
+++ b/gdb/testsuite/gdb.dwarf2/macro-source-path.exp.tcl
@@ -134,7 +134,7 @@ proc do_test { test_name lines_version DW_AT_name main_file_idx directories
 	    }
 
 	    if { [prepare_for_testing "failed to prepare" ${::testfile}-${test_name}-${32_or_64} \
-		      [list $::srcfile $asm_file] {nodebug}] } {
+		      [list $::srcfile $asm_file] {symtab}] } {
 		return
 	    }
 
diff --git a/gdb/testsuite/gdb.dwarf2/main-subprogram.exp b/gdb/testsuite/gdb.dwarf2/main-subprogram.exp
index bb2219412d6..7d3caa3222c 100644
--- a/gdb/testsuite/gdb.dwarf2/main-subprogram.exp
+++ b/gdb/testsuite/gdb.dwarf2/main-subprogram.exp
@@ -54,7 +54,7 @@ Dwarf::assemble $asm_file {
 }
 
 if {[prepare_for_testing "failed to prepare" ${testfile} \
-	 [list $srcfile $asm_file] {nodebug}]} {
+	 [list $srcfile $asm_file] {symtab}]} {
     return
 }
 
diff --git a/gdb/testsuite/gdb.dwarf2/malformed-line-header.exp b/gdb/testsuite/gdb.dwarf2/malformed-line-header.exp
index 8b549b2d447..6f09bea1f82 100644
--- a/gdb/testsuite/gdb.dwarf2/malformed-line-header.exp
+++ b/gdb/testsuite/gdb.dwarf2/malformed-line-header.exp
@@ -47,7 +47,7 @@ Dwarf::assemble $asm_file {
 }
 
 if { [prepare_for_testing "failed to prepare" ${testfile} \
-	  [list $srcfile $asm_file] {nodebug}] } {
+	  [list $srcfile $asm_file] {symtab}] } {
     return
 }
 
diff --git a/gdb/testsuite/gdb.dwarf2/mega-enum.exp b/gdb/testsuite/gdb.dwarf2/mega-enum.exp
index d550a2b464a..3bacf42e529 100644
--- a/gdb/testsuite/gdb.dwarf2/mega-enum.exp
+++ b/gdb/testsuite/gdb.dwarf2/mega-enum.exp
@@ -58,7 +58,7 @@ Dwarf::assemble $asm_file {
 }
 
 if {[prepare_for_testing "failed to prepare" ${testfile} \
-	 [list $srcfile $asm_file] {nodebug}]} {
+	 [list $srcfile $asm_file] {symtab}]} {
     return
 }
 
diff --git a/gdb/testsuite/gdb.dwarf2/method-ptr.exp b/gdb/testsuite/gdb.dwarf2/method-ptr.exp
index 42cb93330a5..0c6eb0d920a 100644
--- a/gdb/testsuite/gdb.dwarf2/method-ptr.exp
+++ b/gdb/testsuite/gdb.dwarf2/method-ptr.exp
@@ -78,7 +78,7 @@ Dwarf::assemble $asm_file {
 }
 
 if { [prepare_for_testing "failed to prepare" ${testfile} \
-	  [list $srcfile $asm_file] {nodebug c++}] } {
+	  [list $srcfile $asm_file] {symtab c++}] } {
     return
 }
 
diff --git a/gdb/testsuite/gdb.dwarf2/missing-line-table.exp b/gdb/testsuite/gdb.dwarf2/missing-line-table.exp
index 40e527b4844..ff4c0c12cf4 100644
--- a/gdb/testsuite/gdb.dwarf2/missing-line-table.exp
+++ b/gdb/testsuite/gdb.dwarf2/missing-line-table.exp
@@ -79,7 +79,7 @@ Dwarf::assemble $asm_file {
 }
 
 if { [prepare_for_testing "failed to prepare" ${testfile} \
-	  [list $srcfile $asm_file] {nodebug}] } {
+	  [list $srcfile $asm_file] {symtab}] } {
     return
 }
 
diff --git a/gdb/testsuite/gdb.dwarf2/missing-sig-type.exp b/gdb/testsuite/gdb.dwarf2/missing-sig-type.exp
index aa47a704cc3..aef7ae8dbac 100644
--- a/gdb/testsuite/gdb.dwarf2/missing-sig-type.exp
+++ b/gdb/testsuite/gdb.dwarf2/missing-sig-type.exp
@@ -48,7 +48,7 @@ Dwarf::assemble $asm_file {
 }
 
 if { [prepare_for_testing "failed to prepare" ${testfile} \
-	  [list $srcfile $asm_file] {nodebug}] } {
+	  [list $srcfile $asm_file] {symtab}] } {
     return
 }
 
diff --git a/gdb/testsuite/gdb.dwarf2/missing-type-name-for-templates.exp b/gdb/testsuite/gdb.dwarf2/missing-type-name-for-templates.exp
index bf9e9258c0a..d1d1d91df22 100644
--- a/gdb/testsuite/gdb.dwarf2/missing-type-name-for-templates.exp
+++ b/gdb/testsuite/gdb.dwarf2/missing-type-name-for-templates.exp
@@ -30,7 +30,7 @@ lappend debug_flags debug
 lappend debug_flags c++
 
 set nodebug_flags {}
-lappend nodebug_flags nodebug
+lappend nodebug_flags symtab
 lappend nodebug_flags c++
 
 get_func_info main $debug_flags
diff --git a/gdb/testsuite/gdb.dwarf2/missing-type-name.exp b/gdb/testsuite/gdb.dwarf2/missing-type-name.exp
index 530e0c79b0f..4af80bec165 100644
--- a/gdb/testsuite/gdb.dwarf2/missing-type-name.exp
+++ b/gdb/testsuite/gdb.dwarf2/missing-type-name.exp
@@ -96,7 +96,7 @@ Dwarf::assemble $asm_file {
 }
 
 if { [prepare_for_testing "failed to prepare" ${testfile} \
-	  [list $srcfile $asm_file] {nodebug}] } {
+	  [list $srcfile $asm_file] {symtab}] } {
     return
 }
 
diff --git a/gdb/testsuite/gdb.dwarf2/nameless-enum.exp b/gdb/testsuite/gdb.dwarf2/nameless-enum.exp
index b523ae6d6ae..8c0e00a5e3a 100644
--- a/gdb/testsuite/gdb.dwarf2/nameless-enum.exp
+++ b/gdb/testsuite/gdb.dwarf2/nameless-enum.exp
@@ -53,7 +53,7 @@ Dwarf::assemble $asm_file {
 }
 
 if {[prepare_for_testing "failed to prepare" ${testfile} \
-	 [list $srcfile $asm_file] {nodebug}]} {
+	 [list $srcfile $asm_file] {symtab}]} {
     return
 }
 
diff --git a/gdb/testsuite/gdb.dwarf2/negative-data-member-location.exp b/gdb/testsuite/gdb.dwarf2/negative-data-member-location.exp
index 9baa51f70ee..20fb2ccd7f6 100644
--- a/gdb/testsuite/gdb.dwarf2/negative-data-member-location.exp
+++ b/gdb/testsuite/gdb.dwarf2/negative-data-member-location.exp
@@ -65,7 +65,7 @@ Dwarf::assemble ${asm_file} {
     }
 }
 
-if { [prepare_for_testing "failed to prepare" ${testfile} [list $srcfile $asm_file] {nodebug}] } {
+if { [prepare_for_testing "failed to prepare" ${testfile} [list $srcfile $asm_file] {symtab}] } {
     return
 }
 
diff --git a/gdb/testsuite/gdb.dwarf2/nonvar-access.exp b/gdb/testsuite/gdb.dwarf2/nonvar-access.exp
index 8e673bbade5..25a435907cb 100644
--- a/gdb/testsuite/gdb.dwarf2/nonvar-access.exp
+++ b/gdb/testsuite/gdb.dwarf2/nonvar-access.exp
@@ -197,7 +197,7 @@ Dwarf::assemble $asm_file {
 }
 
 if { [prepare_for_testing "failed to prepare" ${testfile} \
-	  [list $srcfile $asm_file] {nodebug}] } {
+	  [list $srcfile $asm_file] {symtab}] } {
     return
 }
 
diff --git a/gdb/testsuite/gdb.dwarf2/nostaticblock.exp b/gdb/testsuite/gdb.dwarf2/nostaticblock.exp
index e9be5b8b555..37308195549 100644
--- a/gdb/testsuite/gdb.dwarf2/nostaticblock.exp
+++ b/gdb/testsuite/gdb.dwarf2/nostaticblock.exp
@@ -34,7 +34,7 @@ Dwarf::assemble $asm_file {
 }
 
 if { [build_executable ${testfile}.exp ${testfile} \
-	  [list $srcfile $asm_file] {nodebug}] } {
+	  [list $srcfile $asm_file] {symtab}] } {
     return
 }
 
diff --git a/gdb/testsuite/gdb.dwarf2/opaque-type-lookup.exp b/gdb/testsuite/gdb.dwarf2/opaque-type-lookup.exp
index 119203308a7..befe356baf7 100644
--- a/gdb/testsuite/gdb.dwarf2/opaque-type-lookup.exp
+++ b/gdb/testsuite/gdb.dwarf2/opaque-type-lookup.exp
@@ -183,7 +183,7 @@ Dwarf::assemble $asm_file {
     }
 }
 
-if {[prepare_for_testing "failed to prepare" $testfile "${asm_file} ${srcfile} ${srcfile3}" {nodebug}]} {
+if {[prepare_for_testing "failed to prepare" $testfile "${asm_file} ${srcfile} ${srcfile3}" {symtab}]} {
     return
 }
 
diff --git a/gdb/testsuite/gdb.dwarf2/opt-out-not-implptr.exp b/gdb/testsuite/gdb.dwarf2/opt-out-not-implptr.exp
index 64a3a1e393b..5b15103e7a1 100644
--- a/gdb/testsuite/gdb.dwarf2/opt-out-not-implptr.exp
+++ b/gdb/testsuite/gdb.dwarf2/opt-out-not-implptr.exp
@@ -87,7 +87,7 @@ Dwarf::assemble $asm_file {
 }
 
 if {[build_executable ${testfile}.exp ${testfile} \
-	 [list $srcfile $asm_file] {nodebug}]} {
+	 [list $srcfile $asm_file] {symtab}]} {
     return
 }
 
diff --git a/gdb/testsuite/gdb.dwarf2/rnglists-multiple-cus.exp b/gdb/testsuite/gdb.dwarf2/rnglists-multiple-cus.exp
index e48eb39f3a5..be74c4fc7a4 100644
--- a/gdb/testsuite/gdb.dwarf2/rnglists-multiple-cus.exp
+++ b/gdb/testsuite/gdb.dwarf2/rnglists-multiple-cus.exp
@@ -91,7 +91,7 @@ foreach_with_prefix is_64 {false true} {
     }
 
     if { [prepare_for_testing "failed to prepare" ${testfile} \
-	      [list $srcfile $asm_file] {nodebug}] } {
+	      [list $srcfile $asm_file] {symtab}] } {
 	return
     }
 
diff --git a/gdb/testsuite/gdb.dwarf2/rnglists-sec-offset.exp b/gdb/testsuite/gdb.dwarf2/rnglists-sec-offset.exp
index 6207e31b9d0..c892f6aaf58 100644
--- a/gdb/testsuite/gdb.dwarf2/rnglists-sec-offset.exp
+++ b/gdb/testsuite/gdb.dwarf2/rnglists-sec-offset.exp
@@ -130,7 +130,7 @@ foreach_with_prefix is_64 {false true} {
     }
 
     if { [prepare_for_testing "failed to prepare" ${testfile} \
-	      [list $srcfile $asm_file] {nodebug}] } {
+	      [list $srcfile $asm_file] {symtab}] } {
 	return
     }
 
diff --git a/gdb/testsuite/gdb.dwarf2/rust-enum.exp b/gdb/testsuite/gdb.dwarf2/rust-enum.exp
index 19c9bcacff5..3b8970bbcb4 100644
--- a/gdb/testsuite/gdb.dwarf2/rust-enum.exp
+++ b/gdb/testsuite/gdb.dwarf2/rust-enum.exp
@@ -110,7 +110,7 @@ Dwarf::assemble $asm_file {
 }
 
 if { [prepare_for_testing "failed to prepare" ${testfile} \
-	  [list $srcfile $asm_file] {nodebug}] } {
+	  [list $srcfile $asm_file] {symtab}] } {
     return
 }
 
diff --git a/gdb/testsuite/gdb.dwarf2/shortpiece.exp b/gdb/testsuite/gdb.dwarf2/shortpiece.exp
index bb37541ff07..137199135ac 100644
--- a/gdb/testsuite/gdb.dwarf2/shortpiece.exp
+++ b/gdb/testsuite/gdb.dwarf2/shortpiece.exp
@@ -120,7 +120,7 @@ Dwarf::assemble $asm_file {
 }
 
 if { [prepare_for_testing "failed to prepare" ${testfile} \
-			  [list $srcfile $asm_file] {nodebug}] } {
+			  [list $srcfile $asm_file] {symtab}] } {
     return
 }
 
diff --git a/gdb/testsuite/gdb.dwarf2/static-const-member.exp b/gdb/testsuite/gdb.dwarf2/static-const-member.exp
index 2b1c513c62c..7681ac4fc0b 100644
--- a/gdb/testsuite/gdb.dwarf2/static-const-member.exp
+++ b/gdb/testsuite/gdb.dwarf2/static-const-member.exp
@@ -90,7 +90,7 @@ Dwarf::assemble ${asm_file} {
 }
 
 if { [prepare_for_testing "failed to prepare" $testfile \
-	  [list $asm_file $srcfile] {nodebug}] } {
+	  [list $asm_file $srcfile] {symtab}] } {
     return
 }
 
diff --git a/gdb/testsuite/gdb.dwarf2/static-optimized-out.exp b/gdb/testsuite/gdb.dwarf2/static-optimized-out.exp
index 1ac48f5b31c..8b21040f660 100644
--- a/gdb/testsuite/gdb.dwarf2/static-optimized-out.exp
+++ b/gdb/testsuite/gdb.dwarf2/static-optimized-out.exp
@@ -47,7 +47,7 @@ Dwarf::assemble $asm_file {
 }
 
 if { [prepare_for_testing "failed to prepare" ${testfile} \
-	  [list $srcfile $asm_file] {nodebug}] } {
+	  [list $srcfile $asm_file] {symtab}] } {
     return
 }
 
diff --git a/gdb/testsuite/gdb.dwarf2/staticvirtual.exp b/gdb/testsuite/gdb.dwarf2/staticvirtual.exp
index 90ae120b79c..b9b3a79e072 100644
--- a/gdb/testsuite/gdb.dwarf2/staticvirtual.exp
+++ b/gdb/testsuite/gdb.dwarf2/staticvirtual.exp
@@ -48,7 +48,7 @@ Dwarf::assemble $asm_file {
 }
 
 if { [prepare_for_testing "failed to prepare" ${testfile} \
-	  [list $srcfile $asm_file] {nodebug}] } {
+	  [list $srcfile $asm_file] {symtab}] } {
     return
 }
 
diff --git a/gdb/testsuite/gdb.dwarf2/struct-decl.exp b/gdb/testsuite/gdb.dwarf2/struct-decl.exp
index d10eac0bffc..e995df01161 100644
--- a/gdb/testsuite/gdb.dwarf2/struct-decl.exp
+++ b/gdb/testsuite/gdb.dwarf2/struct-decl.exp
@@ -65,7 +65,7 @@ Dwarf::assemble $asm_file {
 }
 
 if {[prepare_for_testing "failed to prepare" ${testfile} \
-	 [list $srcfile $asm_file] {nodebug}]} {
+	 [list $srcfile $asm_file] {symtab}]} {
     return
 }
 
diff --git a/gdb/testsuite/gdb.dwarf2/struct-with-sig-2.exp b/gdb/testsuite/gdb.dwarf2/struct-with-sig-2.exp
index 82ced20d162..7034e2fd2bf 100644
--- a/gdb/testsuite/gdb.dwarf2/struct-with-sig-2.exp
+++ b/gdb/testsuite/gdb.dwarf2/struct-with-sig-2.exp
@@ -123,7 +123,7 @@ save_vars { GDBFLAGS } {
     append GDBFLAGS " -iex \"maint set dwarf synchronous on\""
 
     if { [prepare_for_testing "failed to prepare" ${testfile} \
-	      [list $srcfile $asm_file] {nodebug}] } {
+	      [list $srcfile $asm_file] {symtab}] } {
 	return
     }
 }
diff --git a/gdb/testsuite/gdb.dwarf2/struct-with-sig.exp b/gdb/testsuite/gdb.dwarf2/struct-with-sig.exp
index 5a3e5a77dca..261c0289bdf 100644
--- a/gdb/testsuite/gdb.dwarf2/struct-with-sig.exp
+++ b/gdb/testsuite/gdb.dwarf2/struct-with-sig.exp
@@ -98,7 +98,7 @@ Dwarf::assemble $asm_file {
 }
 
 if { [prepare_for_testing "failed to prepare" ${testfile} \
-	  [list $srcfile $asm_file] {nodebug}] } {
+	  [list $srcfile $asm_file] {symtab}] } {
     return
 }
 
diff --git a/gdb/testsuite/gdb.dwarf2/subrange-enum.exp b/gdb/testsuite/gdb.dwarf2/subrange-enum.exp
index a4cfab746db..411995d2f5f 100644
--- a/gdb/testsuite/gdb.dwarf2/subrange-enum.exp
+++ b/gdb/testsuite/gdb.dwarf2/subrange-enum.exp
@@ -71,7 +71,7 @@ Dwarf::assemble $asm_file {
 }
 
 if { [prepare_for_testing "failed to prepare" ${testfile} \
-	  [list $srcfile $asm_file] {nodebug}] } {
+	  [list $srcfile $asm_file] {symtab}] } {
     return
 }
 
diff --git a/gdb/testsuite/gdb.dwarf2/subrange.exp b/gdb/testsuite/gdb.dwarf2/subrange.exp
index 71e88f43353..d9b318fb135 100644
--- a/gdb/testsuite/gdb.dwarf2/subrange.exp
+++ b/gdb/testsuite/gdb.dwarf2/subrange.exp
@@ -104,7 +104,7 @@ Dwarf::assemble $asm_file {
 }
 
 if { [prepare_for_testing "failed to prepare" ${testfile} \
-	  [list $srcfile $asm_file] {nodebug c++}] } {
+	  [list $srcfile $asm_file] {symtab c++}] } {
     return
 }
 
diff --git a/gdb/testsuite/gdb.dwarf2/symbol_needs_eval_fail.exp b/gdb/testsuite/gdb.dwarf2/symbol_needs_eval_fail.exp
index 27763beee3a..dfa12b258fa 100644
--- a/gdb/testsuite/gdb.dwarf2/symbol_needs_eval_fail.exp
+++ b/gdb/testsuite/gdb.dwarf2/symbol_needs_eval_fail.exp
@@ -99,7 +99,7 @@ Dwarf::assemble $asm_file {
 }
 
 if { [prepare_for_testing ${testfile}.exp ${testfile} \
-     [list $srcfile $asm_file] {nodebug}] } {
+     [list $srcfile $asm_file] {symtab}] } {
     return
 }
 
diff --git a/gdb/testsuite/gdb.dwarf2/symbol_needs_eval_timeout.exp b/gdb/testsuite/gdb.dwarf2/symbol_needs_eval_timeout.exp
index a72cdc8f55f..325ca3b2fd1 100644
--- a/gdb/testsuite/gdb.dwarf2/symbol_needs_eval_timeout.exp
+++ b/gdb/testsuite/gdb.dwarf2/symbol_needs_eval_timeout.exp
@@ -121,7 +121,7 @@ Dwarf::assemble $asm_file {
 }
 
 if { [prepare_for_testing ${testfile}.exp ${testfile} \
-	  [list $srcfile $asm_file] {nodebug}] } {
+	  [list $srcfile $asm_file] {symtab}] } {
     return
 }
 
diff --git a/gdb/testsuite/gdb.dwarf2/symtab-producer.exp b/gdb/testsuite/gdb.dwarf2/symtab-producer.exp
index c90bf77518c..22d5f7070fa 100644
--- a/gdb/testsuite/gdb.dwarf2/symtab-producer.exp
+++ b/gdb/testsuite/gdb.dwarf2/symtab-producer.exp
@@ -72,7 +72,7 @@ Dwarf::assemble $asm_file {
 }
 
 if { [prepare_for_testing "failed to prepare" ${testfile} \
-	  [list $srcfile $asm_file] {nodebug}] } {
+	  [list $srcfile $asm_file] {symtab}] } {
     return
 }
 
diff --git a/gdb/testsuite/gdb.dwarf2/symtab-sorting.exp b/gdb/testsuite/gdb.dwarf2/symtab-sorting.exp
index 738e9e191e6..31041be795b 100644
--- a/gdb/testsuite/gdb.dwarf2/symtab-sorting.exp
+++ b/gdb/testsuite/gdb.dwarf2/symtab-sorting.exp
@@ -69,7 +69,7 @@ Dwarf::assemble $asm_file {
 }
 
 if { [prepare_for_testing "failed to prepare" ${testfile} \
-	  [list $srcfile $asm_file] {nodebug}] } {
+	  [list $srcfile $asm_file] {symtab}] } {
     return
 }
 
diff --git a/gdb/testsuite/gdb.dwarf2/template-specification-full-name.exp b/gdb/testsuite/gdb.dwarf2/template-specification-full-name.exp
index f5a919cb747..ded9fec15d7 100644
--- a/gdb/testsuite/gdb.dwarf2/template-specification-full-name.exp
+++ b/gdb/testsuite/gdb.dwarf2/template-specification-full-name.exp
@@ -72,7 +72,7 @@ Dwarf::assemble $asm_file {
 }
 
 if { [prepare_for_testing "failed to prepare" ${testfile} \
-	  [list $srcfile $asm_file] {nodebug}] } {
+	  [list $srcfile $asm_file] {symtab}] } {
     return
 }
 
diff --git a/gdb/testsuite/gdb.dwarf2/trace-crash.exp b/gdb/testsuite/gdb.dwarf2/trace-crash.exp
index 2df9bfa861b..d296d013677 100644
--- a/gdb/testsuite/gdb.dwarf2/trace-crash.exp
+++ b/gdb/testsuite/gdb.dwarf2/trace-crash.exp
@@ -25,7 +25,7 @@ require is_x86_64_m64_target
 standard_testfile .S
 
 if {[prepare_for_testing "failed to prepare" "${testfile}" ${testfile}.S \
-	 nodebug]} {
+	 symtab]} {
     return
 }
 
diff --git a/gdb/testsuite/gdb.dwarf2/typeddwarf.exp b/gdb/testsuite/gdb.dwarf2/typeddwarf.exp
index 00c8bd13009..92dbfc6ce66 100644
--- a/gdb/testsuite/gdb.dwarf2/typeddwarf.exp
+++ b/gdb/testsuite/gdb.dwarf2/typeddwarf.exp
@@ -30,7 +30,7 @@ if { [is_x86_like_target] } {
 }
 
 set opts {}
-lappend opts nodebug
+lappend opts symtab
 lappend opts nopie
 
 if { [prepare_for_testing "failed to prepare" "${test}" ${sfile} $opts] } {
diff --git a/gdb/testsuite/gdb.dwarf2/typedef-void-finish.exp b/gdb/testsuite/gdb.dwarf2/typedef-void-finish.exp
index 507e698916a..981c859b72e 100644
--- a/gdb/testsuite/gdb.dwarf2/typedef-void-finish.exp
+++ b/gdb/testsuite/gdb.dwarf2/typedef-void-finish.exp
@@ -60,7 +60,7 @@ Dwarf::assemble $asm_file {
 }
 
 if { [prepare_for_testing "failed to prepare" ${testfile} \
-	  [list $srcfile $asm_file] {nodebug}] } {
+	  [list $srcfile $asm_file] {symtab}] } {
     return
 }
 
diff --git a/gdb/testsuite/gdb.dwarf2/var-access.exp b/gdb/testsuite/gdb.dwarf2/var-access.exp
index 6719784f230..d0c0c8081f9 100644
--- a/gdb/testsuite/gdb.dwarf2/var-access.exp
+++ b/gdb/testsuite/gdb.dwarf2/var-access.exp
@@ -249,7 +249,7 @@ Dwarf::assemble $asm_file {
 }
 
 if { [prepare_for_testing ${testfile}.exp ${testfile} \
-	  [list $srcfile $asm_file] {nodebug}] } {
+	  [list $srcfile $asm_file] {symtab}] } {
     return
 }
 
diff --git a/gdb/testsuite/gdb.dwarf2/void-type.exp b/gdb/testsuite/gdb.dwarf2/void-type.exp
index ee5d16e1ea0..19a39970699 100644
--- a/gdb/testsuite/gdb.dwarf2/void-type.exp
+++ b/gdb/testsuite/gdb.dwarf2/void-type.exp
@@ -92,7 +92,7 @@ Dwarf::assemble $asm_file {
 }
 
 if { [prepare_for_testing "failed to prepare" ${testfile} \
-	  [list $srcfile $asm_file] {nodebug}] } {
+	  [list $srcfile $asm_file] {symtab}] } {
     return
 }
 
diff --git a/gdb/testsuite/gdb.dwarf2/watch-notconst.exp b/gdb/testsuite/gdb.dwarf2/watch-notconst.exp
index c8fb0a955f8..94198581ba4 100644
--- a/gdb/testsuite/gdb.dwarf2/watch-notconst.exp
+++ b/gdb/testsuite/gdb.dwarf2/watch-notconst.exp
@@ -21,7 +21,7 @@ set test "watch-notconst"
 require dwarf2_support is_x86_like_target
 
 if { [prepare_for_testing "failed to prepare" "${test}" \
-      {watch-notconst.c watch-notconst2.S} {nodebug}] } {
+      {watch-notconst.c watch-notconst2.S} {symtab}] } {
     return
 }
 
diff --git a/gdb/testsuite/gdb.opt/break-on-_exit.exp b/gdb/testsuite/gdb.opt/break-on-_exit.exp
index fa7cd96d61d..f44188957d7 100644
--- a/gdb/testsuite/gdb.opt/break-on-_exit.exp
+++ b/gdb/testsuite/gdb.opt/break-on-_exit.exp
@@ -44,7 +44,7 @@ if {[readnow]} {
 save_vars { GDBFLAGS } {
     append GDBFLAGS " -readnever"
 
-    if {[prepare_for_testing "failed to prepare" $testfile $srcfile nodebug]} {
+    if {[prepare_for_testing "failed to prepare" $testfile $srcfile symtab]} {
 	return
     }
 }
diff --git a/gdb/testsuite/gdb.perf/skip-prologue.exp b/gdb/testsuite/gdb.perf/skip-prologue.exp
index 7810be8a0c0..02525d2e0a9 100644
--- a/gdb/testsuite/gdb.perf/skip-prologue.exp
+++ b/gdb/testsuite/gdb.perf/skip-prologue.exp
@@ -38,7 +38,7 @@ PerfTest::assemble {
     if [info exists COMPILE] {
 	set opts {debug}
     } else {
-	set opts {nodebug}
+	set opts {symtab}
     }
 
     if { [gdb_compile "$srcdir/$subdir/$srcfile" ${binfile} executable $opts] != "" } {
diff --git a/gdb/testsuite/gdb.python/make-visualizer.exp b/gdb/testsuite/gdb.python/make-visualizer.exp
index 098a7531bda..67c7eeb109b 100644
--- a/gdb/testsuite/gdb.python/make-visualizer.exp
+++ b/gdb/testsuite/gdb.python/make-visualizer.exp
@@ -115,7 +115,7 @@ Dwarf::assemble $asm_file {
 }
 
 if {[prepare_for_testing "failed to prepare" ${testfile} \
-	 [list $srcfile $asm_file] {nodebug}]} {
+	 [list $srcfile $asm_file] {symtab}]} {
     return
 }
 
diff --git a/gdb/testsuite/gdb.python/py-framefilter.exp b/gdb/testsuite/gdb.python/py-framefilter.exp
index a62ee30081f..632460ebc02 100644
--- a/gdb/testsuite/gdb.python/py-framefilter.exp
+++ b/gdb/testsuite/gdb.python/py-framefilter.exp
@@ -282,7 +282,7 @@ gdb_test "bt 1" "Quit" "bt 1 with KeyboardInterrupt"
 
 # We cannot use prepare_for_testing as we have to set the safe-patch
 # to check objfile and progspace printers.
-if {[build_executable $testfile.exp $testfile $srcfile {nodebug}] == -1} {
+if {[build_executable $testfile.exp $testfile $srcfile {symtab}] == -1} {
     return
 }
 
diff --git a/gdb/testsuite/gdb.python/py-linetable-empty.exp b/gdb/testsuite/gdb.python/py-linetable-empty.exp
index 3244d88a936..e94e5c00c6d 100644
--- a/gdb/testsuite/gdb.python/py-linetable-empty.exp
+++ b/gdb/testsuite/gdb.python/py-linetable-empty.exp
@@ -38,7 +38,7 @@ Dwarf::assemble $asm_file {
 }
 
 if { [prepare_for_testing "failed to prepare" ${testfile} \
-	  [list $srcfile $asm_file] {nodebug}] } {
+	  [list $srcfile $asm_file] {symtab}] } {
     return
 }
 
diff --git a/gdb/testsuite/gdb.python/py-objfile.exp b/gdb/testsuite/gdb.python/py-objfile.exp
index 64c62602930..5e71f958383 100644
--- a/gdb/testsuite/gdb.python/py-objfile.exp
+++ b/gdb/testsuite/gdb.python/py-objfile.exp
@@ -115,7 +115,7 @@ gdb_test "python print(objfile.username)" "None" \
 
 # Now build another copy of the testcase, this time without debug info.
 
-if { [prepare_for_testing "failed to prepare" ${testfile}2 ${srcfile} {nodebug ldflags=-Wl,--strip-debug}] } {
+if { [prepare_for_testing "failed to prepare" ${testfile}2 ${srcfile} {symtab ldflags=-Wl,--strip-debug}] } {
     return
 }
 
diff --git a/gdb/testsuite/gdb.python/py-sym-artificial.exp b/gdb/testsuite/gdb.python/py-sym-artificial.exp
index 1ea2ea4a13f..001ab98bbe6 100644
--- a/gdb/testsuite/gdb.python/py-sym-artificial.exp
+++ b/gdb/testsuite/gdb.python/py-sym-artificial.exp
@@ -48,7 +48,7 @@ Dwarf::assemble $asm_file {
 }
 
 if {[prepare_for_testing "failed to prepare" ${testfile} \
-	 [list $srcfile $asm_file] {nodebug}]} {
+	 [list $srcfile $asm_file] {symtab}]} {
     return
 }
 
diff --git a/gdb/testsuite/gdb.reverse/map-to-same-line.exp b/gdb/testsuite/gdb.reverse/map-to-same-line.exp
index 1cfb060dfaa..917494c7986 100644
--- a/gdb/testsuite/gdb.reverse/map-to-same-line.exp
+++ b/gdb/testsuite/gdb.reverse/map-to-same-line.exp
@@ -108,7 +108,7 @@ Dwarf::assemble $asm_file {
 }
 
 if { [prepare_for_testing "failed to prepare" ${testfile} \
-	[list $srcfile $asm_file] {nodebug} ] } {
+	[list $srcfile $asm_file] {symtab} ] } {
     return
 }
 
diff --git a/gdb/testsuite/gdb.rocm/break-kernel-no-debug-info.exp b/gdb/testsuite/gdb.rocm/break-kernel-no-debug-info.exp
index d9e35d36d3d..173da01497d 100644
--- a/gdb/testsuite/gdb.rocm/break-kernel-no-debug-info.exp
+++ b/gdb/testsuite/gdb.rocm/break-kernel-no-debug-info.exp
@@ -28,7 +28,7 @@ standard_testfile .cpp
 require allow_hipcc_tests
 
 # Build for hip, explicitly without debug infos
-if {[build_executable "failed to prepare" $testfile $srcfile {hip nodebug}]} {
+if {[build_executable "failed to prepare" $testfile $srcfile {hip symtab}]} {
     return
 }
 
diff --git a/gdb/testsuite/gdb.tui/tailcall-debug.exp b/gdb/testsuite/gdb.tui/tailcall-debug.exp
index c9e671510d1..70fe140e657 100644
--- a/gdb/testsuite/gdb.tui/tailcall-debug.exp
+++ b/gdb/testsuite/gdb.tui/tailcall-debug.exp
@@ -104,7 +104,7 @@ Dwarf::assemble $asm_file {
 
 # Build the actual test executable.
 if { [build_executable ${testfile}.exp ${testfile} \
-	  [list ${srcfile} ${asm_file}] {nodebug}] } {
+	  [list ${srcfile} ${asm_file}] {symtab}] } {
     return
 }
 
diff --git a/gdb/testsuite/gdb.tui/tailcall-msym.exp b/gdb/testsuite/gdb.tui/tailcall-msym.exp
index 81b52355c01..01621c239aa 100644
--- a/gdb/testsuite/gdb.tui/tailcall-msym.exp
+++ b/gdb/testsuite/gdb.tui/tailcall-msym.exp
@@ -130,7 +130,7 @@ close $fd
 # Rebuild the test executable from the modified assembler file.  Don't
 # include debug as we want GDB to use the msymbols.
 set real_testfile ${testfile}-updated
-if { [build_executable "build" $real_testfile $asm_file {nodebug}] } {
+if { [build_executable "build" $real_testfile $asm_file {symtab}] } {
     return
 }
 
diff --git a/gdb/testsuite/lib/gdb.exp b/gdb/testsuite/lib/gdb.exp
index b268152bdb7..084f6ff8358 100644
--- a/gdb/testsuite/lib/gdb.exp
+++ b/gdb/testsuite/lib/gdb.exp
@@ -6540,6 +6540,8 @@ proc gdb_windows_manifest_obj {} {
 #   - column-info/no-column-info: Enable/Disable generation of column table
 #     information.
 #   - dwarf5: Force compilation with dwarf-5 debug information.
+#   - symtab: Ensure the final binary includes a (COFF/ELF/etc.)
+#     symbol table (minsyms).
 #
 # And here are some of the not too obscure options understood by DejaGnu that
 # influence the compilation:
@@ -6573,8 +6575,8 @@ proc gdb_compile {source dest type options} {
     }
 
     # 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} {
+    # if symtab is requested for an AIX target.
+    if { [istarget *-*-aix*] && [lsearch -exact $options symtab] != -1} {
 	return "minsyms not supported in AIX"
     }
 
-- 
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.