[Lldb-commits] [PATCH] D60119: modify-python-lldb.py: clean up __iter__ and __len__ support

Pavel Labath via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Tue Apr 2 04:25:58 PDT 2019


labath created this revision.
labath added reviewers: zturner, jingham, amccarth.
Herald added a subscriber: jdoerfert.

Instead of modifying the swig-generated code, just add the appropriate
methods to the interface files in order to get the swig to do the
generation for us.

This is a straight-forward move from the python script to the interface
files. The single class which has nontrivial handling in the script
(SBModule) has been left for a separate patch.

For the cases where I did not find any tests exercising the
iteration/length methods (i.e., no tests failed after I stopped emitting
them), I tried to add basic tests for that functionality.


https://reviews.llvm.org/D60119

Files:
  packages/Python/lldbsuite/test/python_api/debugger/TestDebuggerAPI.py
  packages/Python/lldbsuite/test/python_api/default-constructor/sb_compileunit.py
  packages/Python/lldbsuite/test/python_api/default-constructor/sb_process.py
  packages/Python/lldbsuite/test/python_api/default-constructor/sb_section.py
  packages/Python/lldbsuite/test/python_api/default-constructor/sb_thread.py
  packages/Python/lldbsuite/test/python_api/symbol-context/TestSymbolContext.py
  scripts/Python/modify-python-lldb.py
  scripts/interface/SBBreakpoint.i
  scripts/interface/SBCompileUnit.i
  scripts/interface/SBDebugger.i
  scripts/interface/SBInstructionList.i
  scripts/interface/SBProcess.i
  scripts/interface/SBSection.i
  scripts/interface/SBStringList.i
  scripts/interface/SBSymbolContextList.i
  scripts/interface/SBTarget.i
  scripts/interface/SBThread.i
  scripts/interface/SBType.i
  scripts/interface/SBValue.i
  scripts/interface/SBValueList.i

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D60119.193253.patch
Type: text/x-patch
Size: 16172 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20190402/141975cb/attachment-0001.bin>


More information about the lldb-commits mailing list