> On Jan 25, 2016, at 3:20 PM, Vadim Chugunov <vadi...@gmail.com> wrote:
> 
> On Mon, Jan 25, 2016 at 11:04 AM, Enrico Granata <egran...@apple.com 
> <mailto:egran...@apple.com>> wrote:
> 
>> On Jan 25, 2016, at 12:23 AM, Vadim Chugunov via lldb-dev 
>> <lldb-dev@lists.llvm.org <mailto:lldb-dev@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.
>  

That’s fair. Can you at least try to describe what you’re trying to do and the 
data types involved in this?

> 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? 
>  

What do you mean with this?
The model is that you have an SBValue, and that SBValue could be backed by a 
synthetic value. If you want, you can LLDB not to prefer synthetic values - 
which changes the way the current SBValue works - or for the same backing 
variable, give you a non-synthetic SBValue, which is what 
GetNonSyntheticValue() does

Parent/child should have nothing to do with this, unless I am misunderstanding 
you

> And on which object should I be calling GetNonSyntheticValue()?  (I assume on 
> the parent?)
> 
> Vadim


Thanks,
- Enrico
📩 egranata@.com ☎️ 27683

_______________________________________________
lldb-dev mailing list
lldb-dev@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-dev

Reply via email to