From: Tom Tromey Date: Tue, 27 Jan 2026 02:27:01 +0000 (-0700) Subject: Remove "readnow" from two tests X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=fc27cc66655ed24dad6ef7a866de5fc28af68d7e;p=thirdparty%2Fbinutils-gdb.git Remove "readnow" from two tests These tests both claim that -readnow is needed for proper operation, but (1) this isn't true, and (2) if it were true it would be a bug in gdb. So, remove the use of readnow. Approved-by: Kevin Buettner --- diff --git a/gdb/testsuite/gdb.dwarf2/opt-out-not-implptr.exp b/gdb/testsuite/gdb.dwarf2/opt-out-not-implptr.exp index 5057ff2c2d8..5bfd0099b11 100644 --- a/gdb/testsuite/gdb.dwarf2/opt-out-not-implptr.exp +++ b/gdb/testsuite/gdb.dwarf2/opt-out-not-implptr.exp @@ -91,12 +91,7 @@ if {[build_executable ${testfile}.exp ${testfile} \ return -1 } -# We need --readnow because otherwise we never read in the CU we -# created above. -save_vars { GDBFLAGS } { - append set GDBFLAGS " -readnow" - clean_restart ${testfile} -} +clean_restart ${testfile} if {![runto_main]} { return -1 diff --git a/gdb/testsuite/gdb.dwarf2/symtab-producer.exp b/gdb/testsuite/gdb.dwarf2/symtab-producer.exp index 49bc2c25635..c90bf77518c 100644 --- a/gdb/testsuite/gdb.dwarf2/symtab-producer.exp +++ b/gdb/testsuite/gdb.dwarf2/symtab-producer.exp @@ -71,15 +71,9 @@ Dwarf::assemble $asm_file { } } -# We need --readnow because otherwise we never read in the CUs we -# created above. -save_vars { GDBFLAGS } { - set GDBFLAGS "$GDBFLAGS -readnow" - - if { [prepare_for_testing "failed to prepare" ${testfile} \ - [list $srcfile $asm_file] {nodebug}] } { - return -1 - } +if { [prepare_for_testing "failed to prepare" ${testfile} \ + [list $srcfile $asm_file] {nodebug}] } { + return } gdb_py_test_silent_cmd "python with_producer = gdb.lookup_global_symbol(\"with_producer\")" \