This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [patch] testsuite: Fix "ERROR: no fileid for"


On Thu, 06 Feb 2014 23:09:25 +0100, Maciej W. Rozycki wrote:
> Can you provide a more elaborate log of your test session?

$ echo 'set gdbserver_reconnect_p 1' >test.exp;runtest test.exp

> What are the exact conditions for this problem to trigger?

If GDB does not run and the testsuite tries to close down it errors.


>  I'm asking because I fear your change could defeat the purpose of the 
> commit you referred to if there's a catastrophic failure causing GDB to 
> crash while running gdb.base/solib-disc.exp -- in such a case an instance 
> of gdbserver would stay behind running, ruining the remaining part of the 
> test suite in environments where only a single TCP port is available for 
> the RSP connection.

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.


Thanks,
Jan


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]