Re: Missing requirement in pretty-printer + MI specs?

Doug Evans <[email protected]>
Newsgroups gmane.comp.gdb.devel
Message-ID <CADPb22R1DDPw6COZ3z0w53P+-Uw4FnPMwjTFuHDD4tObNh3PTQ@mail.gmail.com>
On Wed, Oct 29, 2014 at 2:54 PM, Doug Evans <[email protected]> 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).
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.