llvm-project/lldb/source/API
Pavel Labath 4bc0500635 Make operator==s consistent between c++ and python APIs
Summary:
modify-python-lldb.py had code to insert python equality operators to
some classes. Some of those classes already had c++ equality operators,
and some didn't.

This makes the situation more consistent, by removing all equality
handilng from modify-python-lldb. Instead, I add c++ operators to
classes where they were missing, and expose them in the swig interface
files so that they are available to python too.

The only tricky case was the SBAddress class, which had an operator==
defined as a free function, which is not handled by swig. This function
cannot be removed without breaking ABI, and we cannot add an extra
operator== member, as that would make equality comparisons ambiguous.
For this class, I define a python __eq__ function by hand and have it
delegate to the operator!=, which I have defined as a member function.

This isn't fully NFC, as the semantics of some equality functions in
python changes slightly, but I believe it changes for the better (e.g.,
previously SBBreakpoint.__eq__ would consider two breakpoints with the
same ID as equal, even if they belonged to different targets; now they
are only equal if they belong to the same target).

Reviewers: jingham, clayborg, zturner

Subscribers: jdoerfert, JDevlieghere, lldb-commits

Differential Revision: https://reviews.llvm.org/D59819

llvm-svn: 357463
2019-04-02 10:18:46 +00:00
..
CMakeLists.txt [Python] Define empty SWIG wrapper for unit testin" 2019-03-26 01:11:15 +00:00
SBAddress.cpp Make operator==s consistent between c++ and python APIs 2019-04-02 10:18:46 +00:00
SBAttachInfo.cpp [lldb] [Reproducer] Move SBRegistry registration into declaring files 2019-03-19 17:13:13 +00:00
SBBlock.cpp [lldb] [Reproducer] Move SBRegistry registration into declaring files 2019-03-19 17:13:13 +00:00
SBBreakpoint.cpp [lldb] [Reproducer] Move SBRegistry registration into declaring files 2019-03-19 17:13:13 +00:00
SBBreakpointLocation.cpp [lldb] [Reproducer] Move SBRegistry registration into declaring files 2019-03-19 17:13:13 +00:00
SBBreakpointName.cpp [lldb] [Reproducer] Move SBRegistry registration into declaring files 2019-03-19 17:13:13 +00:00
SBBreakpointOptionCommon.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
SBBreakpointOptionCommon.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
SBBroadcaster.cpp [lldb] [Reproducer] Move SBRegistry registration into declaring files 2019-03-19 17:13:13 +00:00
SBCommandInterpreter.cpp [lldb] [Reproducer] Move SBRegistry registration into declaring files 2019-03-19 17:13:13 +00:00
SBCommandReturnObject.cpp [lldb] [Reproducer] Move SBRegistry registration into declaring files 2019-03-19 17:13:13 +00:00
SBCommunication.cpp [lldb] [Reproducer] Move SBRegistry registration into declaring files 2019-03-19 17:13:13 +00:00
SBCompileUnit.cpp [lldb] [Reproducer] Move SBRegistry registration into declaring files 2019-03-19 17:13:13 +00:00
SBData.cpp [lldb] [Reproducer] Move SBRegistry registration into declaring files 2019-03-19 17:13:13 +00:00
SBDebugger.cpp [lldb] [Reproducer] Move SBRegistry registration into declaring files 2019-03-19 17:13:13 +00:00
SBDeclaration.cpp [lldb] [Reproducer] Move SBRegistry registration into declaring files 2019-03-19 17:13:13 +00:00
SBError.cpp [lldb] [Reproducer] Move SBRegistry registration into declaring files 2019-03-19 17:13:13 +00:00
SBEvent.cpp [lldb] [Reproducer] Move SBRegistry registration into declaring files 2019-03-19 17:13:13 +00:00
SBExecutionContext.cpp [lldb] [Reproducer] Move SBRegistry registration into declaring files 2019-03-19 17:13:13 +00:00
SBExpressionOptions.cpp [lldb] [Reproducer] Move SBRegistry registration into declaring files 2019-03-19 17:13:13 +00:00
SBFileSpec.cpp Make operator==s consistent between c++ and python APIs 2019-04-02 10:18:46 +00:00
SBFileSpecList.cpp [lldb] [Reproducer] Move SBRegistry registration into declaring files 2019-03-19 17:13:13 +00:00
SBFrame.cpp [lldb] [Reproducer] Move SBRegistry registration into declaring files 2019-03-19 17:13:13 +00:00
SBFunction.cpp [lldb] [Reproducer] Move SBRegistry registration into declaring files 2019-03-19 17:13:13 +00:00
SBHostOS.cpp [Python] Remove Python include from ScriptInterpreterPython.h 2019-03-29 20:17:20 +00:00
SBInstruction.cpp [lldb] [Reproducer] Move SBRegistry registration into declaring files 2019-03-19 17:13:13 +00:00
SBInstructionList.cpp [lldb] [Reproducer] Move SBRegistry registration into declaring files 2019-03-19 17:13:13 +00:00
SBLanguageRuntime.cpp [lldb] [Reproducer] Move SBRegistry registration into declaring files 2019-03-19 17:13:13 +00:00
SBLaunchInfo.cpp [lldb] [Reproducer] Move SBRegistry registration into declaring files 2019-03-19 17:13:13 +00:00
SBLineEntry.cpp [lldb] [Reproducer] Move SBRegistry registration into declaring files 2019-03-19 17:13:13 +00:00
SBListener.cpp [lldb] [Reproducer] Move SBRegistry registration into declaring files 2019-03-19 17:13:13 +00:00
SBMemoryRegionInfo.cpp [lldb] [Reproducer] Move SBRegistry registration into declaring files 2019-03-19 17:13:13 +00:00
SBMemoryRegionInfoList.cpp [lldb] [Reproducer] Move SBRegistry registration into declaring files 2019-03-19 17:13:13 +00:00
SBModule.cpp [lldb] [Reproducer] Move SBRegistry registration into declaring files 2019-03-19 17:13:13 +00:00
SBModuleSpec.cpp [lldb] [Reproducer] Move SBRegistry registration into declaring files 2019-03-19 17:13:13 +00:00
SBPlatform.cpp [lldb] [Reproducer] Move SBRegistry registration into declaring files 2019-03-19 17:13:13 +00:00
SBProcess.cpp [lldb] [Reproducer] Move SBRegistry registration into declaring files 2019-03-19 17:13:13 +00:00
SBProcessInfo.cpp [lldb] [Reproducer] Move SBRegistry registration into declaring files 2019-03-19 17:13:13 +00:00
SBQueue.cpp [lldb] [Reproducer] Move SBRegistry registration into declaring files 2019-03-19 17:13:13 +00:00
SBQueueItem.cpp [lldb] [Reproducer] Move SBRegistry registration into declaring files 2019-03-19 17:13:13 +00:00
SBReproducer.cpp [lldb] [Reproducer] Move SBRegistry registration into declaring files 2019-03-19 17:13:13 +00:00
SBReproducerPrivate.h [lldb] [Reproducer] Move SBRegistry registration into declaring files 2019-03-19 17:13:13 +00:00
SBSection.cpp [lldb] [Reproducer] Move SBRegistry registration into declaring files 2019-03-19 17:13:13 +00:00
SBSourceManager.cpp [lldb] [Reproducer] Move SBRegistry registration into declaring files 2019-03-19 17:13:13 +00:00
SBStream.cpp [lldb] [Reproducer] Move SBRegistry registration into declaring files 2019-03-19 17:13:13 +00:00
SBStringList.cpp [lldb] [Reproducer] Move SBRegistry registration into declaring files 2019-03-19 17:13:13 +00:00
SBStructuredData.cpp [lldb] [Reproducer] Move SBRegistry registration into declaring files 2019-03-19 17:13:13 +00:00
SBSymbol.cpp [lldb] [Reproducer] Move SBRegistry registration into declaring files 2019-03-19 17:13:13 +00:00
SBSymbolContext.cpp [lldb] [Reproducer] Move SBRegistry registration into declaring files 2019-03-19 17:13:13 +00:00
SBSymbolContextList.cpp [lldb] [Reproducer] Move SBRegistry registration into declaring files 2019-03-19 17:13:13 +00:00
SBTarget.cpp [lldb] [Reproducer] Move SBRegistry registration into declaring files 2019-03-19 17:13:13 +00:00
SBThread.cpp [lldb] [Reproducer] Move SBRegistry registration into declaring files 2019-03-19 17:13:13 +00:00
SBThreadCollection.cpp [lldb] [Reproducer] Move SBRegistry registration into declaring files 2019-03-19 17:13:13 +00:00
SBThreadPlan.cpp [lldb] [Reproducer] Move SBRegistry registration into declaring files 2019-03-19 17:13:13 +00:00
SBTrace.cpp [lldb] [Reproducer] Move SBRegistry registration into declaring files 2019-03-19 17:13:13 +00:00
SBTraceOptions.cpp [lldb] [Reproducer] Move SBRegistry registration into declaring files 2019-03-19 17:13:13 +00:00
SBType.cpp [lldb] [Reproducer] Move SBRegistry registration into declaring files 2019-03-19 17:13:13 +00:00
SBTypeCategory.cpp [lldb] [Reproducer] Move SBRegistry registration into declaring files 2019-03-19 17:13:13 +00:00
SBTypeEnumMember.cpp [lldb] [Reproducer] Move SBRegistry registration into declaring files 2019-03-19 17:13:13 +00:00
SBTypeFilter.cpp [lldb] [Reproducer] Move SBRegistry registration into declaring files 2019-03-19 17:13:13 +00:00
SBTypeFormat.cpp [lldb] [Reproducer] Move SBRegistry registration into declaring files 2019-03-19 17:13:13 +00:00
SBTypeNameSpecifier.cpp [lldb] [Reproducer] Move SBRegistry registration into declaring files 2019-03-19 17:13:13 +00:00
SBTypeSummary.cpp [lldb] [Reproducer] Move SBRegistry registration into declaring files 2019-03-19 17:13:13 +00:00
SBTypeSynthetic.cpp [lldb] [Reproducer] Move SBRegistry registration into declaring files 2019-03-19 17:13:13 +00:00
SBUnixSignals.cpp [lldb] [Reproducer] Move SBRegistry registration into declaring files 2019-03-19 17:13:13 +00:00
SBValue.cpp [lldb] [Reproducer] Move SBRegistry registration into declaring files 2019-03-19 17:13:13 +00:00
SBValueList.cpp [lldb] [Reproducer] Move SBRegistry registration into declaring files 2019-03-19 17:13:13 +00:00
SBVariablesOptions.cpp [lldb] [Reproducer] Move SBRegistry registration into declaring files 2019-03-19 17:13:13 +00:00
SBWatchpoint.cpp Make operator==s consistent between c++ and python APIs 2019-04-02 10:18:46 +00:00
SystemInitializerFull.cpp [Python] Remove Python include from ScriptInterpreterPython.h 2019-03-29 20:17:20 +00:00
SystemInitializerFull.h [Python] Remove dynamic indirection 2019-03-26 21:57:02 +00:00
Utils.h [SBAPI] Don't check IsValid in constructor 2019-03-06 00:05:55 +00:00
liblldb-private.exports Limit LLDB_EXPORT_ALL_SYMBOLS to lldb symbols 2016-10-29 00:29:15 +00:00
liblldb.exports Fix OSX cmake build 2016-02-18 17:01:40 +00:00
liblldb.xcode.exports Only export public symbols with the cmake build. 2015-09-04 00:00:41 +00:00