Missing requirement in pretty-printer + MI specs?

Doug Evans dje@google.com
Wed Oct 29 22:32:00 GMT 2014


On Wed, Oct 29, 2014 at 2:54 PM, Doug Evans <dje@google.com> wrote:
> [...]
> There's nothing in the pretty_printer.children spec that says the name
> returned has to be a c++ class member name (and thus the frontend could
> pass *&class_var.child_name or some such).
> And there's nothing in the pretty_printer.children spec that says the
> result has to be an lvalue (and thus gdb could pass the location of
> the value to -var-create from that).

Hi.  A followup question.

If I have a pretty-printer that is returning a string as the value
of a particular child, say because the prettied contents of that value
is a string (could be an integer of error codes or whatever),
I see Eclipse showing the value as

child_name     char [18]      0x7fffffffd5f0

Not helpful.
The type isn't char array, though the prettied representation
of the value has 18 characters.

How is this supposed to work?

One thought is to pass back a display hint with the result
of the children iterator, but the result is just a tuple of (name, value).



More information about the Gdb mailing list