[Lldb-commits] [PATCH] D150157: [lldb] Mark most SBAPI methods involving private types as protected or private

Alex Langford via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Mon May 8 16:42:17 PDT 2023


bulbazord created this revision.
bulbazord added reviewers: mib, JDevlieghere, jingham, labath, kastiglione, aprantl.
Herald added a project: All.
bulbazord requested review of this revision.
Herald added a project: LLDB.
Herald added a subscriber: lldb-commits.

Many SB classes have public constructors or methods involving types that
are private. Some are more obvious (e.g. containing lldb_private in the
name) than others (lldb::FooSP is usually std::shared_pointer<lldb_private::Foo>).

This commit explicitly does not address FileSP, so I'm leaving that one
alone for now.

Some of these were for other SB classes to use and should have been made
protected/private with a friend class entry added. Some of these were
public for some of the swig python helpers to use. I put all of those
functions into a class and made them static methods. The relevant SB
classes mark that class as a friend so they can access those
private/protected members.

I've also removed an outdated SBStructuredData test (can you guess which
constructor it was using?) and updated the other relevant tests.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D150157

Files:
  lldb/bindings/python/python-swigsafecast.swig
  lldb/bindings/python/python-wrapper.swig
  lldb/include/lldb/API/SBBreakpoint.h
  lldb/include/lldb/API/SBBreakpointLocation.h
  lldb/include/lldb/API/SBCommandInterpreter.h
  lldb/include/lldb/API/SBCommandReturnObject.h
  lldb/include/lldb/API/SBDebugger.h
  lldb/include/lldb/API/SBError.h
  lldb/include/lldb/API/SBEvent.h
  lldb/include/lldb/API/SBExecutionContext.h
  lldb/include/lldb/API/SBFrame.h
  lldb/include/lldb/API/SBProcess.h
  lldb/include/lldb/API/SBQueue.h
  lldb/include/lldb/API/SBQueueItem.h
  lldb/include/lldb/API/SBStructuredData.h
  lldb/include/lldb/API/SBSymbolContext.h
  lldb/include/lldb/API/SBTarget.h
  lldb/include/lldb/API/SBThread.h
  lldb/include/lldb/API/SBThreadPlan.h
  lldb/include/lldb/API/SBTrace.h
  lldb/include/lldb/API/SBTraceCursor.h
  lldb/include/lldb/API/SBType.h
  lldb/include/lldb/API/SBTypeSummary.h
  lldb/include/lldb/API/SBValue.h
  lldb/include/lldb/API/SBWatchpoint.h
  lldb/source/API/SBCommandInterpreter.cpp
  lldb/source/API/SBDebugger.cpp
  lldb/source/Plugins/ScriptInterpreter/Python/SWIGPythonBridge.h
  lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp
  lldb/source/Plugins/ScriptInterpreter/Python/ScriptedPlatformPythonInterface.cpp
  lldb/source/Plugins/ScriptInterpreter/Python/ScriptedProcessPythonInterface.cpp
  lldb/source/Plugins/ScriptInterpreter/Python/ScriptedPythonInterface.h
  lldb/source/Plugins/ScriptInterpreter/Python/ScriptedThreadPythonInterface.cpp
  lldb/unittests/API/CMakeLists.txt
  lldb/unittests/API/SBCommandInterpreterTest.cpp
  lldb/unittests/API/SBStructuredDataTest.cpp
  lldb/unittests/ScriptInterpreter/Python/PythonTestSuite.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D150157.520517.patch
Type: text/x-patch
Size: 111732 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20230508/6e602472/attachment-0001.bin>


More information about the lldb-commits mailing list