aboutsummaryrefslogtreecommitdiff
path: root/lldb/source/Plugins/ScriptInterpreter/Python/ScriptedProcessPythonInterface.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lldb/source/Plugins/ScriptInterpreter/Python/ScriptedProcessPythonInterface.cpp')
-rw-r--r--lldb/source/Plugins/ScriptInterpreter/Python/ScriptedProcessPythonInterface.cpp21
1 files changed, 13 insertions, 8 deletions
diff --git a/lldb/source/Plugins/ScriptInterpreter/Python/ScriptedProcessPythonInterface.cpp b/lldb/source/Plugins/ScriptInterpreter/Python/ScriptedProcessPythonInterface.cpp
index 6f087e8..3a1db7f 100644
--- a/lldb/source/Plugins/ScriptInterpreter/Python/ScriptedProcessPythonInterface.cpp
+++ b/lldb/source/Plugins/ScriptInterpreter/Python/ScriptedProcessPythonInterface.cpp
@@ -56,6 +56,17 @@ StructuredData::GenericSP ScriptedProcessPythonInterface::CreatePluginObject(
return m_object_instance_sp;
}
+StructuredData::DictionarySP ScriptedProcessPythonInterface::GetCapabilities() {
+ Status error;
+ StructuredData::DictionarySP dict =
+ Dispatch<StructuredData::DictionarySP>("get_capabilities", error);
+
+ if (!CheckStructuredDataObject(LLVM_PRETTY_FUNCTION, dict, error))
+ return {};
+
+ return dict;
+}
+
Status ScriptedProcessPythonInterface::Launch() {
return GetStatusFromMethod("launch");
}
@@ -140,14 +151,8 @@ StructuredData::ArraySP ScriptedProcessPythonInterface::GetLoadedImages() {
StructuredData::ArraySP array =
Dispatch<StructuredData::ArraySP>("get_loaded_images", error);
- if (!array || !array->IsValid() || error.Fail()) {
- return ScriptedInterface::ErrorWithMessage<StructuredData::ArraySP>(
- LLVM_PRETTY_FUNCTION,
- llvm::Twine("Null or invalid object (" +
- llvm::Twine(error.AsCString()) + llvm::Twine(")."))
- .str(),
- error);
- }
+ if (!CheckStructuredDataObject(LLVM_PRETTY_FUNCTION, array, error))
+ return {};
return array;
}