This is the mail archive of the gdb-patches@sourceware.cygnus.com 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]

Re: lib/gdb.exp: Don't loop infinitly on download attempts


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.

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