Re: gdb_expect and default{} vs timeout{}

Andrew Cagney
2001-02-16T08:45:00Z

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