summaryrefslogtreecommitdiffstats
path: root/lldb/scripts/Python
diff options
context:
space:
mode:
authorJim Ingham <jingham@apple.com>2019-09-28 00:53:45 +0000
committerJim Ingham <jingham@apple.com>2019-09-28 00:53:45 +0000
commit93c98346e98a50e481efda95c9b095bf2b1c8a73 (patch)
tree33f73ad36543390ff4e5e27414861d259e26026c /lldb/scripts/Python
parent92f151738bfe739a874d8a98a2f2a40b5dd02daa (diff)
downloadbcm5719-llvm-93c98346e98a50e481efda95c9b095bf2b1c8a73.tar.gz
bcm5719-llvm-93c98346e98a50e481efda95c9b095bf2b1c8a73.zip
Give an error when StepUsingScriptedThreadPlan is passed a bad classname.
Differential Revision: https://reviews.llvm.org/D68173 llvm-svn: 373135
Diffstat (limited to 'lldb/scripts/Python')
-rw-r--r--lldb/scripts/Python/python-wrapper.swig6
1 files changed, 5 insertions, 1 deletions
diff --git a/lldb/scripts/Python/python-wrapper.swig b/lldb/scripts/Python/python-wrapper.swig
index 8509899df27..8a99daa90c8 100644
--- a/lldb/scripts/Python/python-wrapper.swig
+++ b/lldb/scripts/Python/python-wrapper.swig
@@ -250,6 +250,7 @@ LLDBSwigPythonCreateScriptedThreadPlan
(
const char *python_class_name,
const char *session_dictionary_name,
+ std::string &error_string,
const lldb::ThreadPlanSP& thread_plan_sp
)
{
@@ -267,8 +268,11 @@ LLDBSwigPythonCreateScriptedThreadPlan
auto dict = PythonModule::MainModule().ResolveName<PythonDictionary>(session_dictionary_name);
auto pfunc = PythonObject::ResolveNameWithDictionary<PythonCallable>(python_class_name, dict);
- if (!pfunc.IsAllocated())
+ if (!pfunc.IsAllocated()) {
+ error_string.append("could not find script class: ");
+ error_string.append(python_class_name);
return nullptr;
+ }
PythonObject tp_arg(PyRefType::Owned, SBTypeToSWIGWrapper(tp_value));
OpenPOWER on IntegriCloud