Re: pr 11067 patch

Jan Kratochvil
2010-02-19T20:11:50Z

On Fri, 19 Feb 2010 20:51:36 +0100, Chris Moller wrote:
> That limited the format change to unsummarised top-level "p <enum
> thingy>" circumstances. If I make that test
>
> if (options->summary || recurse != 0 ||
> ui_out_is_mi_like_p (interp_ui_out
> (top_level_interpreter ())))
>
> i.e., checking if the print is to an MI whatever-it-is, the MI tests
> that failed under the original patch (mi-var-display and
> mi2-var-display) run okay as they originally were, which suggests to
> me that MI will go on getting enums formatted the way it expects
> them. Will that work?

I would prefer the value_print_options way but rather:

Vladimir, if CLI start print instead of
(gdb) p enum_var
$1 = enumerator2
now:
(gdb) p enum_var
$1 = enumerator2 = (enum uenum) 2

should MI also print this "pretty printed" enum syntax or should it stick with
the original one? Therefore should be made this change?

mi_gdb_test "-var-evaluate-expression anone" \
- "\\^done,value=\"A\"" \
+ "\\^done,value=\"A = \\(enum <anonymous>\\)0\"" \
"eval variable anone"

Thanks,
Jan