This is the mail archive of the gdb@sources.redhat.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: gdb_expect and default{} vs timeout{}


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


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