summaryrefslogtreecommitdiffstats
path: root/lldb/source/API
diff options
context:
space:
mode:
Diffstat (limited to 'lldb/source/API')
-rw-r--r--lldb/source/API/SBCommandInterpreter.cpp12
-rw-r--r--lldb/source/API/SBValue.cpp22
2 files changed, 33 insertions, 1 deletions
diff --git a/lldb/source/API/SBCommandInterpreter.cpp b/lldb/source/API/SBCommandInterpreter.cpp
index 0f1914b6f95..97b93141e7d 100644
--- a/lldb/source/API/SBCommandInterpreter.cpp
+++ b/lldb/source/API/SBCommandInterpreter.cpp
@@ -314,6 +314,15 @@ LLDBSwigPythonBreakpointCallbackFunction
const lldb::BreakpointLocationSP& sb_bp_loc
);
+extern "C" std::string
+LLDBSwigPythonCallTypeScript
+(
+ const char *python_function_name,
+ const char *session_dictionary_name,
+ const lldb::ValueObjectSP& valobj_sp
+);
+
+
extern "C" void init_lldb(void);
void
@@ -324,6 +333,7 @@ SBCommandInterpreter::InitializeSWIG ()
{
g_initialized = true;
ScriptInterpreter::InitializeInterpreter (init_lldb,
- LLDBSwigPythonBreakpointCallbackFunction);
+ LLDBSwigPythonBreakpointCallbackFunction,
+ LLDBSwigPythonCallTypeScript);
}
}
diff --git a/lldb/source/API/SBValue.cpp b/lldb/source/API/SBValue.cpp
index e51919cacca..aeabb1740bf 100644
--- a/lldb/source/API/SBValue.cpp
+++ b/lldb/source/API/SBValue.cpp
@@ -472,6 +472,28 @@ SBValue::GetChildMemberWithName (const char *name, lldb::DynamicValueType use_dy
return sb_value;
}
+lldb::SBValue
+SBValue::GetValueForExpressionPath(const char* expr_path)
+{
+ lldb::ValueObjectSP child_sp;
+ if (m_opaque_sp)
+ {
+ if (m_opaque_sp->GetUpdatePoint().GetTarget())
+ {
+ Mutex::Locker api_locker (m_opaque_sp->GetUpdatePoint().GetTarget()->GetAPIMutex());
+ // using default values for all the fancy options, just do it if you can
+ child_sp = m_opaque_sp->GetValueForExpressionPath(expr_path);
+ }
+ }
+
+ SBValue sb_value (child_sp);
+
+ LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
+ if (log)
+ log->Printf ("SBValue(%p)::GetValueForExpressionPath (expr_path=\"%s\") => SBValue(%p)", m_opaque_sp.get(), expr_path, sb_value.get());
+
+ return sb_value;
+}
uint32_t
SBValue::GetNumChildren ()
OpenPOWER on IntegriCloud