This is the mail archive of the
gdb@sources.redhat.com
mailing list for the GDB project.
Re: gdb_expect and default{} vs timeout{}
- To: Fernando Nasser <fnasser at redhat dot com>
- Subject: Re: gdb_expect and default{} vs timeout{}
- From: Andrew Cagney <ac131313 at cygnus dot com>
- Date: Fri, 16 Feb 2001 11:40:16 -0500
- Cc: GDB Discussion <gdb at sources dot redhat dot com>
- References: <3A8B69C1.D059D535@cygnus.com> <3A8CCDD5.32AF948D@redhat.com>
Fernando Nasser wrote:
> Sorry for the delay.
This is definitly far from urgent. Thanks for the answer :-)
> You are right, this is sort of weird.
>
> "default" is equivalent to `"eof" or "timeout"'.
>
> If you want to do the same thing in both "eof" and "timeout" conditions,
> then use "default" instead (just to save typing).
Ah! OK.
> I don't think the code above, although redundant, will cause any harm.
> Probably the default clause will take precedence for being specified
> first, so the timeout clause is never used.
Yes, that is what I saw. I was getting the default case rather than
timeout case printed when a timeout occured.
Andrew