summaryrefslogtreecommitdiffstats
path: root/lldb/source/Interpreter/OptionGroupPythonClassWithDict.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Clear out the python class name in OptionParsingStarted for the ↵Jim Ingham2019-12-041-0/+1
| | | | | | | | OptionGroupPythonClassWithDict options class. This value was hanging around so for instance if you made a scripted breakpoint resolver, then went to set another breakpoint, it would still think you had passed in a class name and the breakpoint wouldn't do what you expected.
* Add the ability to pass extra args to a Python breakpoint callback.Jim Ingham2019-10-251-21/+40
| | | | | | | | | | | | | | | | | For example, it is pretty easy to write a breakpoint command that implements "stop when my caller is Foo", and it is pretty easy to write a breakpoint command that implements "stop when my caller is Bar". But there's no way to write a generic "stop when my caller is..." function, and then specify the caller when you add the command to a breakpoint. With this patch, you can pass this data in a SBStructuredData dictionary. That will get stored in the PythonCommandBaton for the breakpoint, and passed to the implementation function (if it has the right signature) when the breakpoint is hit. Then in lldb, you can say: (lldb) break com add -F caller_is -k caller_name -v Foo More generally this will allow us to write reusable Python breakpoint commands. Differential Revision: https://reviews.llvm.org/D68671
* Python3 doesn't seem to allow you to tell whether an object is a classJim Ingham2019-10-031-2/+1
| | | | | | | | | PyClass_Check and everything it relied on seems gone from Python3.7. So I won't check whether it is a class first... Also cleaned up a couple of warnings. llvm-svn: 373679
* Forgot to change the header guards on OptionGroupPythonClassWithDict.Jim Ingham2019-10-031-1/+1
| | | | | | I think that's what is confusing the modules build on the bots. llvm-svn: 373677
* Break out the Python class & key/value options into a separate OptionGroup.Jim Ingham2019-10-031-0/+124
Use this in the scripted breakpoint command. Added some tests for parsing the key/value options. This uncovered a bug in handling parsing errors mid-line. I also fixed that bug. Differential Revision: https://reviews.llvm.org/D68363 llvm-svn: 373673
OpenPOWER on IntegriCloud