From e3e91517ffd7e63bcb5b9d196f85e2b09802b414 Mon Sep 17 00:00:00 2001 From: Enrico Granata Date: Mon, 22 Oct 2012 18:18:36 +0000 Subject: Given our implementation of ValueObjects we could have a scenario where a ValueObject has a dynamic type of Foo* at one point, and then its dynamic type changes to Bar* If Bar* has synthetic children enabled, by the time we figure that out, our public API is already vending SBValues wrapping a DynamicVO, instead of a SyntheticVO and there was no trivial way for us to change the SP inside an SBValue on the fly This checkin reimplements SBValue in terms of a wrapper, ValueImpl, that allows this substitutions on-the-fly by overriding GetSP() to do The Right Thing (TM) As an additional bonus, GetNonSyntheticValue() now works, and we can get rid of the ForceDisableSyntheticChildren idiom in ScriptInterpreterPython Lastly, this checkin makes sure the synthetic VOs get the correct m_value and m_data from their parents (prevented summaries from working in some cases) llvm-svn: 166426 --- lldb/scripts/Python/interface/SBValue.i | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'lldb/scripts/Python/interface') diff --git a/lldb/scripts/Python/interface/SBValue.i b/lldb/scripts/Python/interface/SBValue.i index 70c3d807453..00d9b567d83 100644 --- a/lldb/scripts/Python/interface/SBValue.i +++ b/lldb/scripts/Python/interface/SBValue.i @@ -129,9 +129,24 @@ public: lldb::SBValue GetNonSyntheticValue (); + + lldb::DynamicValueType + GetPreferDynamicValue (); + + void + SetPreferDynamicValue (lldb::DynamicValueType use_dynamic); + + bool + GetPreferSyntheticValue (); + + void + SetPreferSyntheticValue (bool use_synthetic); bool IsDynamic(); + + bool + IsSynthetic (); const char * GetLocation (); -- cgit v1.2.3