This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [patch] testsuite: Fix "ERROR: no fileid for"
- From: "Maciej W. Rozycki" <macro at codesourcery dot com>
- To: Jan Kratochvil <jan dot kratochvil at redhat dot com>
- Cc: <gdb-patches at sourceware dot org>
- Date: Sun, 16 Feb 2014 20:45:06 +0000
- Subject: Re: [patch] testsuite: Fix "ERROR: no fileid for"
- Authentication-results: sourceware.org; auth=none
- References: <20140206205814 dot GA18495 at host2 dot jankratochvil dot net> <alpine dot DEB dot 1 dot 10 dot 1402062122440 dot 18199 at tp dot orcam dot me dot uk> <20140207151018 dot GA20010 at host2 dot jankratochvil dot net> <20140216181018 dot GA20118 at host2 dot jankratochvil dot net>
Hi Jan,
> ping: I expect you are fine with this "incomplete" fix so I will check it in.
Yes, I am.
> > > 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.
Correct. I wasn't sure of the spawn ID situation, thanks for the
clarification.
> > 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.
I'm still curious as to the actual use for such a scenario, but from the
corectness POV your fix is valid indeed.
> > 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.
So do I. Thanks for your fix and apologies for the delay.
Maciej