Re: [RFC/RFA] add struct parse_context to all command functions

Tom Tromey
2008-10-25T16:05:48Z

Ulrich> Thanks! The patch looks good to me now, so if testing goes well,
Ulrich> this is OK.

Just FYI -- it will be a while longer.

I realized today that the treatment of output_format is different with
the patch. In particular, the old code distinguishes between the
format that is passed in and the global output_format in some places,
but the new code does not.

One way to see this is by setting output-radix. Before the patch:

(gdb) set output-radix 8
(gdb) print enum_constant
$1 = enum_constant

But after:

(gdb) set output-radix 8
(gdb) print enum_constant
$1 = 01

I'll go back and introduce a second 'format' field in
value_print_options, unless someone has a better idea.

This behavior is not tested for. So, I'll also add some test cases.

I can send the current patch if you want it for something more
immediate. Relative to the previous one it has some bug fixes plus a
ChangeLog entry.

Tom