[lldb-dev] Selectively disabling value formatter

Vadim Chugunov via lldb-dev lldb-dev at lists.llvm.org
Mon Jan 25 15:20:56 PST 2016


On Mon, Jan 25, 2016 at 11:04 AM, Enrico Granata <egranata at apple.com> wrote:

>
> On Jan 25, 2016, at 12:23 AM, Vadim Chugunov via lldb-dev <
> lldb-dev at lists.llvm.org> wrote:
>
> Hi,
> If I have an SBValue for an object whose type has a formatter enabled for
> it, is there a way to detect this via the Python API, and if so, request an
> "unmodified" view of the object?
>
>
> There definitely is a way for synthetic children, as you discovered below
> For type formats, you can simply set the format on the SBValue on an
> individual basis (SBValue::SetFormat)
> As for summaries, no, there is no way, as that would be nonsensical (don’t
> like the summary? just don’t ask for it - but there’s no meaning to getting
> the summary of a value once you disabled its summary)
>

Yes, this is about synthetic children.  Summaries are not a problem.


>
> I've experimented with value.IsSynthetic() and
> value.GetNonSyntheticValue(), but the former seems to always return false,
> and the latter gives me the same list of children as the original value.
>
>
> Do you have a reproduction case I can look at?
>

My setup is kinda complicated, I want to make sure I am using the API
correctly before attempting to create a self-contained repro case.


> GetNonSyntheticValue() returning self is correct behavior if IsSynthetic()
> == False; but if there really is a synthetic provider attached to the
> object, IsSynthetic() should definitely return True
>
>
Whose IsSynthetic() is supposed to return True,- the parent's or the
child's?
And on which object should I be calling GetNonSyntheticValue()?  (I assume
on the parent?)

Vadim
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/lldb-dev/attachments/20160125/ccc79a4a/attachment.html>


More information about the lldb-dev mailing list