[lldb-dev] Selectively disabling value formatter
Enrico Granata via lldb-dev
lldb-dev at lists.llvm.org
Mon Jan 25 11:04:18 PST 2016
> On Jan 25, 2016, at 12:23 AM, Vadim Chugunov via lldb-dev <lldb-dev at lists.llvm.org> wrote:
> 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)
> 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?
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
> lldb-dev mailing list
> lldb-dev at lists.llvm.org
📩 egranata@.com ☎️ 27683
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the lldb-dev