Re: [PATCH] MI: Add value field to output of -var-create

Daniel Jacobowitz
2007-01-04T23:24:56Z

On Fri, Jan 05, 2007 at 12:22:15PM +1300, Nick Roberts wrote:
> > I think this is a good change in general. However, the problem is that
> > a lot of tests hardcode the output from -var-create, and are broken with
> > this change. I think that instead of adding more hardcoding, we'd
> > need to replace all creation of varobjs with calls to mi_create_varobj.
> > Would you be willing to do that?
>
> It seems unfortunate to me that the output from -var-create gets tested so many
> times but Daniel has just said that mi_gdb_test should really should used even
> if you don't care about the result.

The reason for that advice was the same problem I found with your test;
mi_gdb_test knows how to handle unexpected output and is always careful
to consume a prompt. If you have a helper function that does something
sufficiently carefully without making it a test, that's fine too!

--
Daniel Jacobowitz
CodeSourcery