lib/gdb.exp: Don't loop infinitly on download attempts
Stan Shebs
shebs@cygnus.com
Thu Oct 7 19:13:00 GMT 1999
Date: Fri, 08 Oct 1999 11:58:50 +1000
From: Andrew Cagney <ac131313@cygnus.com>
> I think the right thing to do is to start the countdown in gdb_load
> and then count down/fail on the error returns in gdb_run_cmd rather
> than the continues.
Unfortunatly, what I saw was the testsuite repeatedly trying ``jump
*_start'' from within that expect statement. The expect never
terminated and gdb_run_cmd never returned.
Actually, this may be only indirectly related to loading.
The other options are to eliminate the exp_continue and replace the
entire thing with a loop. Counters on each expect statement may also be
applicable - two ``jump *'' attempts are illegal while N of something
else are valid.
The structure of this bit is really strange - I had to go back and
look at the Expect book, and I'm still not 100% sure of what's going
on. exp_continue restarts matching, which is fine, and we're inside
an expect statement, which is fine, but we've done another send in
between the first match and the exp_continue - so what does the
restarted matching see exactly? If we need to do retries, I'd rather
write each one as a separate expect statement, rather than be punished
for trying to get too clever with expect's pattern matching.
Stan
More information about the Gdb-patches
mailing list