From: Jan Kratochvil Date: Sun, 16 Feb 2014 20:49:40 +0000 (+0100) Subject: Fix "ERROR: no fileid for" in the testsuite. X-Git-Tag: gdb-7.8-release~1315 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=0b10be4faf97396c88746f932b55bc3d2fb2d907;p=platform%2Fupstream%2Fbinutils.git Fix "ERROR: no fileid for" in the testsuite. If GDB has crashed then gdb_spawn_id still exists (although it does not work). So my patch does not change anything. And also currently it will leave the stale gdbserver running anyway. In general if gdb_spawn_id does not exist then send_gdb + gdb_expect just do not make sense anyway. So this patch just prevents the error in such case. The killing of stale gdbserver could be improved multiple ways (also as suggested by Pedro in the original thread) but that is IMO outside of the scope of this patch. Apparently if there is no good response from GDB then gdb_finish() should try to call gdb_start just to kill that gdbserver, IIUC. gdb/testsuite/ 2014-02-16 Jan Kratochvil Fix "ERROR: no fileid for" in the testsuite. * lib/gdb.exp (gdb_finish): Check gdb_spawn_id. Message-ID: <20140206205814.GA18495@host2.jankratochvil.net> --- diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog index 682ac2f..33788ad 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2014-02-16 Jan Kratochvil + + Fix "ERROR: no fileid for" in the testsuite. + * lib/gdb.exp (gdb_finish): Check gdb_spawn_id. + 2014-02-12 Doug Evans * gdb.dwarf2/Makefile.in (EXECUTABLES): Add dwp-symlink. diff --git a/gdb/testsuite/lib/gdb.exp b/gdb/testsuite/lib/gdb.exp index 66dc8f7..9e14da9 100644 --- a/gdb/testsuite/lib/gdb.exp +++ b/gdb/testsuite/lib/gdb.exp @@ -3711,7 +3711,8 @@ proc gdb_finish { } { global cleanfiles # Give persistent gdbserver a chance to terminate before GDB is killed. - if {[info exists gdbserver_reconnect_p] && $gdbserver_reconnect_p} { + if {[info exists gdbserver_reconnect_p] && $gdbserver_reconnect_p + && [info exists gdb_spawn_id]} { send_gdb "kill\n"; gdb_expect 10 { -re "y or n" {