lib/gdb.exp: Don't loop infinitly on download attempts
Michael Snyder
msnyder@cygnus.com
Fri Oct 8 07:39:00 GMT 1999
Stan Shebs wrote:
> 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?
Oh. Yeah, that's death, I think.
> 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.
I agree. I got into nothing but trouble trying to do
things like this when I wrote the trace tests. You just
can't get very clever inside one of these things. It's
better to break them down into simpler structures.
More information about the Gdb-patches
mailing list