summaryrefslogtreecommitdiffstats
path: root/lldb/include
diff options
context:
space:
mode:
Diffstat (limited to 'lldb/include')
-rw-r--r--lldb/include/lldb/Core/ValueObject.h10
-rw-r--r--lldb/include/lldb/Core/ValueObjectSyntheticFilter.h13
-rw-r--r--lldb/include/lldb/DataFormatters/TypeSynthetic.h14
-rw-r--r--lldb/include/lldb/DataFormatters/ValueObjectPrinter.h2
-rw-r--r--lldb/include/lldb/Interpreter/ScriptInterpreter.h9
-rw-r--r--lldb/include/lldb/Interpreter/ScriptInterpreterPython.h4
6 files changed, 45 insertions, 7 deletions
diff --git a/lldb/include/lldb/Core/ValueObject.h b/lldb/include/lldb/Core/ValueObject.h
index 18844318c08..d9d6b78d301 100644
--- a/lldb/include/lldb/Core/ValueObject.h
+++ b/lldb/include/lldb/Core/ValueObject.h
@@ -88,6 +88,7 @@ public:
{
eExpressionPathScanEndReasonEndOfString = 1, // out of data to parse
eExpressionPathScanEndReasonNoSuchChild, // child element not found
+ eExpressionPathScanEndReasonNoSuchSyntheticChild, // (synthetic) child element not found
eExpressionPathScanEndReasonEmptyRangeNotAllowed, // [] only allowed for arrays
eExpressionPathScanEndReasonDotInsteadOfArrow, // . used when -> should be used
eExpressionPathScanEndReasonArrowInsteadOfDot, // -> used when . should be used
@@ -379,6 +380,9 @@ public:
// this vends a TypeImpl that is useful at the SB API layer
virtual TypeImpl
GetTypeImpl ();
+
+ virtual bool
+ CanProvideValue ();
//------------------------------------------------------------------
// Subclasses must implement the functions below.
@@ -756,6 +760,12 @@ public:
return false;
}
+ virtual bool
+ DoesProvideSyntheticValue ()
+ {
+ return false;
+ }
+
virtual SymbolContextScope *
GetSymbolContextScope();
diff --git a/lldb/include/lldb/Core/ValueObjectSyntheticFilter.h b/lldb/include/lldb/Core/ValueObjectSyntheticFilter.h
index e12698f49bb..9846ae6e247 100644
--- a/lldb/include/lldb/Core/ValueObjectSyntheticFilter.h
+++ b/lldb/include/lldb/Core/ValueObjectSyntheticFilter.h
@@ -132,11 +132,12 @@ public:
GetNonSyntheticValue ();
virtual bool
- ResolveValue (Scalar &scalar)
+ CanProvideValue ();
+
+ virtual bool
+ DoesProvideSyntheticValue ()
{
- if (m_parent)
- return m_parent->ResolveValue(scalar);
- return false;
+ return (UpdateValueIfNeeded(), m_provides_value == eLazyBoolYes);
}
protected:
@@ -167,12 +168,14 @@ protected:
LazyBool m_might_have_children;
+ LazyBool m_provides_value;
+
private:
friend class ValueObject;
ValueObjectSynthetic (ValueObject &parent, lldb::SyntheticChildrenSP filter);
void
- CopyParentData ();
+ CopyValueData (ValueObject *source);
//------------------------------------------------------------------
// For ValueObject only
diff --git a/lldb/include/lldb/DataFormatters/TypeSynthetic.h b/lldb/include/lldb/DataFormatters/TypeSynthetic.h
index a25f11d6439..9c4f77cdecb 100644
--- a/lldb/include/lldb/DataFormatters/TypeSynthetic.h
+++ b/lldb/include/lldb/DataFormatters/TypeSynthetic.h
@@ -81,6 +81,11 @@ namespace lldb_private {
virtual bool
MightHaveChildren () = 0;
+ // if this function returns a non-null ValueObject, then the returned ValueObject will stand
+ // for this ValueObject whenever a "value" request is made to this ValueObject
+ virtual lldb::ValueObjectSP
+ GetSyntheticValue () { return nullptr; }
+
typedef std::shared_ptr<SyntheticChildrenFrontEnd> SharedPointer;
typedef std::unique_ptr<SyntheticChildrenFrontEnd> AutoPointer;
@@ -593,6 +598,15 @@ namespace lldb_private {
return m_interpreter->GetIndexOfChildWithName(m_wrapper_sp, name.GetCString());
}
+ virtual lldb::ValueObjectSP
+ GetSyntheticValue ()
+ {
+ if (!m_wrapper_sp || m_interpreter == NULL)
+ return nullptr;
+
+ return m_interpreter->GetSyntheticValue(m_wrapper_sp);
+ }
+
typedef std::shared_ptr<SyntheticChildrenFrontEnd> SharedPointer;
private:
diff --git a/lldb/include/lldb/DataFormatters/ValueObjectPrinter.h b/lldb/include/lldb/DataFormatters/ValueObjectPrinter.h
index 327ebd137db..cc8b198f038 100644
--- a/lldb/include/lldb/DataFormatters/ValueObjectPrinter.h
+++ b/lldb/include/lldb/DataFormatters/ValueObjectPrinter.h
@@ -295,7 +295,7 @@ protected:
uint32_t curr_depth);
bool
- GetDynamicValueIfNeeded ();
+ GetMostSpecializedValue ();
const char*
GetDescriptionForDisplay ();
diff --git a/lldb/include/lldb/Interpreter/ScriptInterpreter.h b/lldb/include/lldb/Interpreter/ScriptInterpreter.h
index 2fbc57a7a32..e7a456df029 100644
--- a/lldb/include/lldb/Interpreter/ScriptInterpreter.h
+++ b/lldb/include/lldb/Interpreter/ScriptInterpreter.h
@@ -121,7 +121,7 @@ public:
typedef lldb::ValueObjectSP (*SWIGPythonGetValueObjectSPFromSBValue) (void* data);
typedef bool (*SWIGPythonUpdateSynthProviderInstance) (void* data);
typedef bool (*SWIGPythonMightHaveChildrenSynthProviderInstance) (void* data);
-
+ typedef void* (*SWIGPythonGetValueSynthProviderInstance) (void *implementor);
typedef bool (*SWIGPythonCallCommand) (const char *python_function_name,
const char *session_dictionary_name,
@@ -498,6 +498,12 @@ public:
return true;
}
+ virtual lldb::ValueObjectSP
+ GetSyntheticValue (const lldb::ScriptInterpreterObjectSP& implementor)
+ {
+ return nullptr;
+ }
+
virtual bool
RunScriptBasedCommand (const char* impl_function,
const char* args,
@@ -607,6 +613,7 @@ public:
SWIGPythonGetValueObjectSPFromSBValue swig_get_valobj_sp_from_sbvalue,
SWIGPythonUpdateSynthProviderInstance swig_update_provider,
SWIGPythonMightHaveChildrenSynthProviderInstance swig_mighthavechildren_provider,
+ SWIGPythonGetValueSynthProviderInstance swig_getvalue_provider,
SWIGPythonCallCommand swig_call_command,
SWIGPythonCallModuleInit swig_call_module_init,
SWIGPythonCreateOSPlugin swig_create_os_plugin,
diff --git a/lldb/include/lldb/Interpreter/ScriptInterpreterPython.h b/lldb/include/lldb/Interpreter/ScriptInterpreterPython.h
index 92fc0328959..2cdb839196b 100644
--- a/lldb/include/lldb/Interpreter/ScriptInterpreterPython.h
+++ b/lldb/include/lldb/Interpreter/ScriptInterpreterPython.h
@@ -141,6 +141,9 @@ public:
virtual bool
MightHaveChildrenSynthProviderInstance (const lldb::ScriptInterpreterObjectSP& implementor);
+ virtual lldb::ValueObjectSP
+ GetSyntheticValue (const lldb::ScriptInterpreterObjectSP& implementor);
+
virtual bool
RunScriptBasedCommand(const char* impl_function,
const char* args,
@@ -285,6 +288,7 @@ public:
SWIGPythonGetValueObjectSPFromSBValue swig_get_valobj_sp_from_sbvalue,
SWIGPythonUpdateSynthProviderInstance swig_update_provider,
SWIGPythonMightHaveChildrenSynthProviderInstance swig_mighthavechildren_provider,
+ SWIGPythonGetValueSynthProviderInstance swig_getvalue_provider,
SWIGPythonCallCommand swig_call_command,
SWIGPythonCallModuleInit swig_call_module_init,
SWIGPythonCreateOSPlugin swig_create_os_plugin,
OpenPOWER on IntegriCloud