[Lldb-commits] [PATCH] Make SBValue::GetNonSyntheticValue return really that.

Enrico Granata egranata at apple.com
Wed Jun 24 19:21:05 PDT 2015


> On Jun 24, 2015, at 6:08 PM, Siva Chandra <sivachandra at google.com> wrote:
> 
> On Wed, Jun 24, 2015 at 12:58 PM, Enrico Granata <egranata at apple.com> wrote:
>> 
>> Try this:
>> Sending        source/API/SBValue.cpp
>> Transmitting file data .
>> Committed revision 240578.
>> 
>> It seems to fix your issue for me
> 
> Yes, it works. Thanks for looking into it promptly.

Awesome!
I would like for your repro case to be added as a test case, so that we can catch any future regressions in this area
If you have a few spare minutes and want to handle that, great; if not I’ll gladly do it tomorrow morning.

> 
> The change makes me think that we always want non-dynamic,
> non-synthetic ValueObject to back a SBValue object while the "flavor"
> of the SBValue is per the user settings.

Yes, exactly.
The invariant is that ValueImpl stores a root ValueObjectSP that is neither dynamic nor synthetic
This is why I am hesitant to take your other patch - because, yes, it will fix the specific case, but I’d rather much ensure that ValueImpl does the right thing internally.
Now, it should Just Work in all cases - as the invariant is enforced at construction time.

> This seems meaningful now; if
> we are holding on to a SBValue object and change settings, we want the
> behavior of that SBValue object to change according to the settings.


Exactly. That’s the whole reason to have ValueImpl in the first place.

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

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20150624/5c1884ff/attachment.html>


More information about the lldb-commits mailing list