From: Tom de Vries Date: Tue, 2 Jun 2020 12:20:25 +0000 (+0200) Subject: [gdb/testsuite] Fix scrolling in gdb.dwarf2/multidictionary.exp X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=621eacdfb42f9deba559ea0bada70f6ca2367f5f;p=binutils-gdb.git [gdb/testsuite] Fix scrolling in gdb.dwarf2/multidictionary.exp Consider a gdb_load patch to call the gdb_file_cmd twice: ... proc gdb_load { arg } { if { $arg != "" } { + set res [gdb_file_cmd $arg] + if { $res != 0 } { + return $res + } return [gdb_file_cmd $arg] } return 0 } ... With this patch, I run into: ... (gdb) kill^M The program is not being run.^M (gdb) ^M * gdb.dwarf2/multidictionary.exp: Don't use gdb_spawn_with_cmdline_opts. --- diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog index ec6b24a0183..ec6878fdb95 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2020-06-02 Tom de Vries + + * gdb.dwarf2/multidictionary.exp: Don't use + gdb_spawn_with_cmdline_opts. + 2020-06-01 Andrew Burgess * gdb.cp/step-and-next-inline.exp (do_test): Skip all tests in the diff --git a/gdb/testsuite/gdb.dwarf2/multidictionary.exp b/gdb/testsuite/gdb.dwarf2/multidictionary.exp index 01e5a0de455..45ba1ed99b4 100644 --- a/gdb/testsuite/gdb.dwarf2/multidictionary.exp +++ b/gdb/testsuite/gdb.dwarf2/multidictionary.exp @@ -147,12 +147,9 @@ if {[build_executable $testfile.exp $testfile [list $asm_file $srcfile] {}] \ } # We force the DIEs above to be read in via "-readnow". -gdb_spawn_with_cmdline_opts "-readnow" -set test "initial prompt" -gdb_test_multiple "" $test { - -re ".*$gdb_prompt $" { - pass "$test" - } +save_vars { GDBFLAGS } { + set GDBFLAGS "$GDBFLAGS -readnow" + clean_restart } gdb_load $binfile