llvm-project/lldb/source/API
Joseph Tremoulet 95b2e516bd Change Target::FindBreakpointsByName to return Expected<vector>
Summary:
Using a BreakpointList corrupts the breakpoints' IDs because
BreakpointList::Add sets the ID, so use a vector instead, and
update the signature to return the vector wrapped in an
llvm::Expected which can propagate any error from the inner
call to StringIsBreakpointName.

Note that, despite the similar name, SBTarget::FindBreakpointsByName
doesn't suffer the same problem, because it uses a SBBreakpointList,
which is more like a BreakpointIDList than a BreakpointList under the
covers.

Add a check to TestBreakpointNames that, without this fix, notices the
ID getting mutated and fails.

Reviewers: jingham, JDevlieghere

Reviewed By: JDevlieghere

Subscribers: lldb-commits

Tags: #lldb

Differential Revision: https://reviews.llvm.org/D70907
2019-12-04 09:57:15 -05:00
..
CMakeLists.txt [LLDB] Only set FRAMEWORK when we're actually building a framework. 2019-11-12 15:42:07 -08:00
SBAddress.cpp [lldb][NFC] Remove dead code in SBAddress::GetDescription 2019-09-11 13:57:41 +00:00
SBAttachInfo.cpp [Reproducers] Capture return values of functions returning by ptr/ref 2019-04-03 21:31:22 +00:00
SBBlock.cpp [lldb] NFC modernize codebase with modernize-use-nullptr 2019-05-23 11:14:47 +00:00
SBBreakpoint.cpp Add the ability to pass extra args to a Python breakpoint callback. 2019-10-25 14:05:07 -07:00
SBBreakpointLocation.cpp Add the ability to pass extra args to a Python breakpoint callback. 2019-10-25 14:05:07 -07:00
SBBreakpointName.cpp Add the ability to pass extra args to a Python breakpoint callback. 2019-10-25 14:05:07 -07:00
SBBreakpointOptionCommon.cpp [LLDB] Migrate llvm::make_unique to std::make_unique 2019-08-14 22:19:23 +00:00
SBBreakpointOptionCommon.h C.128 override, virtual keyword handling 2019-05-03 10:03:28 +00:00
SBBroadcaster.cpp [lldb] NFC modernize codebase with modernize-use-nullptr 2019-05-23 11:14:47 +00:00
SBCommandInterpreter.cpp [lldb] Fix crash on SBCommandReturnObject & assignment 2019-10-04 19:32:57 +00:00
SBCommandReturnObject.cpp SBCommandReturnObject: change LLDB_RECORD_METHOD(..., FILE *, ...) to use LLDB_RECORD_DUMMY 2019-10-17 01:28:07 +00:00
SBCommunication.cpp [lldb] NFC modernize codebase with modernize-use-nullptr 2019-05-23 11:14:47 +00:00
SBCompileUnit.cpp [lldb] Remove FileSpec->CompileUnit inheritance 2019-11-29 11:44:45 +01:00
SBData.cpp [lldb] NFC modernize codebase with modernize-use-nullptr 2019-05-23 11:14:47 +00:00
SBDebugger.cpp remove FILE* usage from ReportEventState() and HandleProcessEvent() 2019-10-14 20:15:28 +00:00
SBDeclaration.cpp [LLDB] Migrate llvm::make_unique to std::make_unique 2019-08-14 22:19:23 +00:00
SBError.cpp [lldb] NFC modernize codebase with modernize-use-nullptr 2019-05-23 11:14:47 +00:00
SBEvent.cpp [lldb] NFC modernize codebase with modernize-use-nullptr 2019-05-23 11:14:47 +00:00
SBExecutionContext.cpp [Reproducers] Capture return values of functions returning by ptr/ref 2019-04-03 21:31:22 +00:00
SBExpressionOptions.cpp [Reproducers] Capture return values of functions returning by ptr/ref 2019-04-03 21:31:22 +00:00
SBFile.cpp SBFile::GetFile: convert SBFile back into python native files. 2019-10-15 16:46:27 +00:00
SBFileSpec.cpp [Reproducers] Capture return values of functions returning by ptr/ref 2019-04-03 21:31:22 +00:00
SBFileSpecList.cpp [Reproducers] Capture return values of functions returning by ptr/ref 2019-04-03 21:31:22 +00:00
SBFrame.cpp [lldb][NFC] Allow range-based for-loops on VariableList 2019-11-25 15:03:46 +01:00
SBFunction.cpp [lldb] NFC modernize codebase with modernize-use-nullptr 2019-05-23 11:14:47 +00:00
SBHostOS.cpp Change LaunchThread interface to return an expected. 2019-07-05 17:42:08 +00:00
SBInstruction.cpp build fix for SBInstruction. 2019-10-14 21:51:02 +00:00
SBInstructionList.cpp build fix for SBInstruction. 2019-10-14 21:51:02 +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] Migrate llvm::make_unique to std::make_unique 2019-08-14 22:19:23 +00:00
SBListener.cpp [lldb] NFC modernize codebase with modernize-use-nullptr 2019-05-23 11:14:47 +00:00
SBMemoryRegionInfo.cpp [Reproducers] Capture return values of functions returning by ptr/ref 2019-04-03 21:31:22 +00:00
SBMemoryRegionInfoList.cpp [Reproducers] Capture return values of functions returning by ptr/ref 2019-04-03 21:31:22 +00:00
SBModule.cpp [lldb][NFC] Migrate to raw_ostream in Module::GetDescription 2019-12-04 09:35:50 +01:00
SBModuleSpec.cpp [Reproducers] Capture return values of functions returning by ptr/ref 2019-04-03 21:31:22 +00:00
SBPlatform.cpp [lldb] NFC modernize codebase with modernize-use-nullptr 2019-05-23 11:14:47 +00:00
SBProcess.cpp remove FILE* usage from ReportEventState() and HandleProcessEvent() 2019-10-14 20:15:28 +00:00
SBProcessInfo.cpp [Reproducers] Capture return values of functions returning by ptr/ref 2019-04-03 21:31:22 +00:00
SBQueue.cpp [lldb] NFC modernize codebase with modernize-use-nullptr 2019-05-23 11:14:47 +00:00
SBQueueItem.cpp [lldb] NFC modernize codebase with modernize-use-nullptr 2019-05-23 11:14:47 +00:00
SBReproducer.cpp [lldb/Reproducer] Add version check 2019-12-03 07:54:42 -08:00
SBReproducerPrivate.h Rename F_{None,Text,Append} to OF_{None,Text,Append}. NFC 2019-08-05 05:43:48 +00:00
SBSection.cpp [lldb] NFC modernize codebase with modernize-use-nullptr 2019-05-23 11:14:47 +00:00
SBSourceManager.cpp [lldb] NFC modernize codebase with modernize-use-nullptr 2019-05-23 11:14:47 +00:00
SBStream.cpp remove FILE* usage from SBStream.i 2019-10-15 17:41:40 +00:00
SBStringList.cpp [LLDB] Migrate llvm::make_unique to std::make_unique 2019-08-14 22:19:23 +00:00
SBStructuredData.cpp [Reproducers] Capture return values of functions returning by ptr/ref 2019-04-03 21:31:22 +00:00
SBSymbol.cpp [lldb] NFC modernize codebase with modernize-use-nullptr 2019-05-23 11:14:47 +00:00
SBSymbolContext.cpp [LLDB] Migrate llvm::make_unique to std::make_unique 2019-08-14 22:19:23 +00:00
SBSymbolContextList.cpp [lldb] NFC modernize codebase with modernize-use-nullptr 2019-05-23 11:14:47 +00:00
SBTarget.cpp Change Target::FindBreakpointsByName to return Expected<vector> 2019-12-04 09:57:15 -05:00
SBThread.cpp [lldb] Remove FileSpec(FileSpec*) constructor 2019-12-04 10:49:25 +01:00
SBThreadCollection.cpp [lldb] NFC modernize codebase with modernize-use-nullptr 2019-05-23 11:14:47 +00:00
SBThreadPlan.cpp Pass an SBStructuredData to scripted ThreadPlans on use. 2019-10-03 22:50:18 +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 Remove the is_mangled flag from Mangled and Symbol 2019-10-09 16:22:14 +00:00
SBTypeCategory.cpp Code cleanup: Change FormattersContainer::KeyType from SP to rvalue 2019-09-04 09:47:18 +00:00
SBTypeEnumMember.cpp [lldb] NFC modernize codebase with modernize-use-nullptr 2019-05-23 11:14:47 +00:00
SBTypeFilter.cpp [lldb] NFC modernize codebase with modernize-use-nullptr 2019-05-23 11:14:47 +00:00
SBTypeFormat.cpp [lldb] NFC modernize codebase with modernize-use-nullptr 2019-05-23 11:14:47 +00:00
SBTypeNameSpecifier.cpp [lldb] NFC modernize codebase with modernize-use-nullptr 2019-05-23 11:14:47 +00:00
SBTypeSummary.cpp [lldb] NFC modernize codebase with modernize-use-nullptr 2019-05-23 11:14:47 +00:00
SBTypeSynthetic.cpp [lldb] NFC modernize codebase with modernize-use-nullptr 2019-05-23 11:14:47 +00:00
SBUnixSignals.cpp [Reproducers] Capture return values of functions returning by ptr/ref 2019-04-03 21:31:22 +00:00
SBValue.cpp [lldb] NFC modernize codebase with modernize-use-nullptr 2019-05-23 11:14:47 +00:00
SBValueList.cpp [lldb] NFC modernize codebase with modernize-use-nullptr 2019-05-23 11:14:47 +00:00
SBVariablesOptions.cpp [Reproducers] Capture return values of functions returning by ptr/ref 2019-04-03 21:31:22 +00:00
SBWatchpoint.cpp [lldb] NFC modernize codebase with modernize-use-nullptr 2019-05-23 11:14:47 +00:00
SystemInitializerFull.cpp [ARC] Add SystemV ABI 2019-10-17 15:18:03 +00:00
SystemInitializerFull.h [NFC] Remove ASCII lines from comments 2019-04-10 20:48:55 +00:00
Utils.h [LLDB] Migrate llvm::make_unique to std::make_unique 2019-08-14 22:19:23 +00:00
liblldb-private.exports
liblldb.exports
liblldb.xcode.exports