[lldb-dev] SBValue defined vs runtime type

Enrico Granata egranata at apple.com
Tue Feb 10 13:36:29 PST 2015


> On Feb 10, 2015, at 1:24 PM, Carlo Kok <ck at remobjects.com> wrote:
> 
> 
> 
> jingham at apple.com schreef op 2/10/2015 om 10:18 PM:
>> You can call:
>> 
>> my_value.SetPreferDynamicValue(eNoDynamicValues)
>> 
>> before fetching the type or value from an SBValue.
>> 
> 
> Won't that make me unable to get the dynamic type afterwrds? The type seems to be cached
> 

Not at the SBValue level

The way this works is that you set the SBValue not to prefer the dynamic value - that changes the underlying ValueObject that we ask questions of from the dynamic value to the static value
When you flip the setting, we’ll try asking the dynamic value instead of the static one

Refer to ValueImpl in SBValue.cpp to see how this works

> 
> -- 
> Carlo Kok
> RemObjects Software
> _______________________________________________
> lldb-dev mailing list
> lldb-dev at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/lldb-dev

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




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


More information about the lldb-dev mailing list