llvm-project/lldb/source/API
Lawrence D'Anna 7ca15ba73f remove File::SetStream(), make new files instead.
Summary:
This patch removes File::SetStream() and File::SetDescriptor(),
and replaces most direct uses of File with pointers to File.
Instead of calling SetStream() on a file, we make a new file and
replace it.

My ultimate goal here is to introduce a new API class SBFile, which
has full support for python io.IOStream file objects.   These can
redirect read() and write() to python code, so lldb::Files will
need a way to dispatch those methods.   Additionally it will need some
form of sharing and assigning files, as a SBFile will be passed in and
assigned to the main IO streams of the debugger.

In my prototype patch queue, I make File itself copyable and add a
secondary class FileOps to manage the sharing and dispatch.  In that
case SBFile was a unique_ptr<File>.
(here: https://github.com/smoofra/llvm-project/tree/files)

However in review, Pavel Labath suggested that it be shared_ptr instead.
(here: https://reviews.llvm.org/D67793)

In order for SBFile to use shared_ptr<File>, everything else should
as well.

If this patch is accepted, I will make SBFile use a shared_ptr
I will remove FileOps from future patches and use subclasses of File
instead.

Reviewers: JDevlieghere, jasonmolenda, zturner, jingham, labath

Reviewed By: labath

Subscribers: lldb-commits

Tags: #lldb

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

llvm-svn: 373090
2019-09-27 14:33:35 +00:00
..
CMakeLists.txt SystemInitializer: Use Targets.def to selectively initialize ABI plugins 2019-09-26 09:47:32 +00: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 [ScriptInterpreter] Move ownership into debugger (NFC) 2019-04-26 22:43:16 +00:00
SBBreakpointLocation.cpp [lldb] NFC modernize codebase with modernize-use-nullptr 2019-05-23 11:14:47 +00:00
SBBreakpointName.cpp [ScriptInterpreter] Move ownership into debugger (NFC) 2019-04-26 22:43:16 +00: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][NFC] Make ArgEntry::quote private and provide a getter 2019-09-13 08:26:00 +00:00
SBCommandReturnObject.cpp [lldb] Code cleanup: Simplify SBCommandReturnObject 2019-09-26 13:31:59 +00:00
SBCommunication.cpp [lldb] NFC modernize codebase with modernize-use-nullptr 2019-05-23 11:14:47 +00:00
SBCompileUnit.cpp SymbolVendor: Remove passthrough methods 2019-08-06 09:12:42 +00:00
SBData.cpp [lldb] NFC modernize codebase with modernize-use-nullptr 2019-05-23 11:14:47 +00:00
SBDebugger.cpp remove File::SetStream(), make new files instead. 2019-09-27 14:33:35 +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
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] Migrate llvm::make_unique to std::make_unique 2019-08-14 22:19:23 +00: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 [lldb] NFC modernize codebase with modernize-use-nullptr 2019-05-23 11:14:47 +00:00
SBInstructionList.cpp [lldb] NFC modernize codebase with modernize-use-nullptr 2019-05-23 11:14:47 +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 SymbolVendor: Remove passthrough methods 2019-08-06 09:12:42 +00: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 [lldb] NFC modernize codebase with modernize-use-nullptr 2019-05-23 11:14:47 +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 [Reproducers] Simplify providers with nested Info struct (NFC) 2019-06-12 22:17:38 +00: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 Convert FileSystem::Open() to return Expected<FileUP> 2019-09-26 17:54:59 +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 Code cleanup: Change FormattersContainer::KeyType from SP to rvalue 2019-09-04 09:47:18 +00:00
SBThread.cpp [lldb] NFC modernize codebase with modernize-use-nullptr 2019-05-23 11:14:47 +00:00
SBThreadCollection.cpp [lldb] NFC modernize codebase with modernize-use-nullptr 2019-05-23 11:14:47 +00:00
SBThreadPlan.cpp [lldb] NFC modernize codebase with modernize-use-nullptr 2019-05-23 11:14:47 +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] NFC modernize codebase with modernize-use-nullptr 2019-05-23 11:14:47 +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 SystemInitializer: Define macros for experimental targets too 2019-09-26 17:15:18 +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 Limit LLDB_EXPORT_ALL_SYMBOLS to lldb symbols 2016-10-29 00:29:15 +00:00
liblldb.exports
liblldb.xcode.exports