This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
Re: Missing requirement in pretty-printer + MI specs?
- From: Doug Evans <dje at google dot com>
- To: gdb <gdb at sourceware dot org>
- Date: Wed, 29 Oct 2014 15:32:21 -0700
- Subject: Re: Missing requirement in pretty-printer + MI specs?
- Authentication-results: sourceware.org; auth=none
- References: <yjt28ujyo82f dot fsf at ruffy2 dot mtv dot corp dot google dot com>
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).