[Lldb-commits] [PATCH] D68173: Report a useful error when a the user mistypes a class name in making a script ThreadPlan

Jim Ingham via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Fri Sep 27 17:27:23 PDT 2019


jingham created this revision.
Herald added subscribers: lldb-commits, JDevlieghere, abidh.
Herald added a project: LLDB.

Before this patch if you used SBThread.StepUsingScriptedThreadPlan but mistyped the Python ThreadPlan class name, you wouldn't get any error, and a bogus ThreadPlan would get executed.  This patch adds an error string and plumbs it through to where we look up the Python class, so now you get a decent error string.  We also tell ourselves the plan has failed (by returning an empty StructuredObject) so that the plan will fail the IsValid check and so not get pushed.


Repository:
  rLLDB LLDB

https://reviews.llvm.org/D68173

Files:
  lldb/include/lldb/Interpreter/ScriptInterpreter.h
  lldb/include/lldb/Target/ThreadPlanPython.h
  lldb/packages/Python/lldbsuite/test/functionalities/step_scripted/TestStepScripted.py
  lldb/scripts/Python/python-wrapper.swig
  lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp
  lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPythonImpl.h
  lldb/source/Target/ThreadPlanPython.cpp
  lldb/unittests/ScriptInterpreter/Python/PythonTestSuite.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D68173.222271.patch
Type: text/x-patch
Size: 6717 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20190928/13e06f29/attachment.bin>


More information about the lldb-commits mailing list