gdb_expect and default{} vs timeout{}

Andrew Cagney ac131313@cygnus.com
Fri Feb 16 08:45:00 GMT 2001


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



More information about the Gdb mailing list