This is the mail archive of the
gdb-patches@sourceware.cygnus.com
mailing list for the GDB project.
Re: lib/gdb.exp: Don't loop infinitly on download attempts
- To: Stan Shebs <shebs at cygnus dot com>
- Subject: Re: lib/gdb.exp: Don't loop infinitly on download attempts
- From: Michael Snyder <msnyder at cygnus dot com>
- Date: Fri, 08 Oct 1999 07:34:44 -0700
- CC: cagney at cygnus dot com, gdb-patches at sourceware dot cygnus dot com
- Organization: Cygnus Solutions
- References: <199910080213.TAA15896@andros.cygnus.com>
- Reply-To: msnyder at cygnus dot com
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.