llvm-project/lldb/source/Target
Jonas Devlieghere 948786c929 File::SetDescriptor() should require options
lvm_private::File::GetStream() can fail if m_options == 0

It's not clear from the header a File created with a descriptor will be
not be usable by many parts of LLDB unless SetOptions is also called,
but it is.

This is because those parts of LLDB rely on GetStream() to use the
file, and that in turn relies on calling fdopen on the descriptor. When
calling fdopen, GetStream relies on m_options to determine the access
mode. If m_options has never been set, GetStream() will fail.

This patch adds options as a required argument to File::SetDescriptor
and the corresponding constructor.

Patch by: Lawrence D'Anna

Differential revision: https://reviews.llvm.org/D67792

llvm-svn: 372652
2019-09-23 20:36:46 +00:00
..
ABI.cpp [Target][NFCI] Rename variable 2019-07-17 07:03:17 +00:00
CMakeLists.txt [lldb] Qualify includes of Properties[Enum].inc files. NFC 2019-07-29 17:22:10 +00:00
ExecutionContext.cpp [ExecutionContext] Return the target/process byte order. 2019-08-07 16:09:35 +00:00
InstrumentationRuntime.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
InstrumentationRuntimeStopInfo.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
JITLoader.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
JITLoaderList.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
Language.cpp Extend FindTypes with CompilerContext to allow filtering by language. 2019-08-22 21:45:58 +00:00
LanguageRuntime.cpp [Target] Decouple ObjCLanguageRuntime from LanguageRuntime 2019-06-21 19:43:07 +00:00
Memory.cpp [Logging] Replace Log::Printf with LLDB_LOG macro (NFC) 2019-07-24 17:56:10 +00:00
MemoryHistory.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
ModuleCache.cpp [Logging] Replace Log::Printf with LLDB_LOG macro (NFC) 2019-07-24 17:56:10 +00:00
OperatingSystem.cpp Replace 'ap' with 'up' suffix in variable names. (NFC) 2019-02-13 06:25:41 +00:00
PathMappingList.cpp [NFC] Remove ASCII lines from comments 2019-04-10 20:48:55 +00:00
Platform.cpp [LLDB] Migrate llvm::make_unique to std::make_unique 2019-08-14 22:19:23 +00:00
Process.cpp File::SetDescriptor() should require options 2019-09-23 20:36:46 +00:00
Queue.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
QueueItem.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
QueueList.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
RegisterContext.cpp DWARFExpression: Simplify class interface 2019-08-27 07:49:41 +00:00
RegisterNumber.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
RemoteAwarePlatform.cpp Refactor user/group name resolving code 2019-03-04 18:48:00 +00:00
SectionLoadHistory.cpp [lldb] NFC modernize codebase with modernize-use-nullptr 2019-05-23 11:14:47 +00:00
SectionLoadList.cpp [Logging] Replace Log::Printf with LLDB_LOG macro (NFC) 2019-07-24 17:56:10 +00:00
StackFrame.cpp Fix PC adjustment in StackFrame::GetSymbolContext 2019-08-02 16:53:42 +00:00
StackFrameList.cpp [Function] Factor out GetCallEdgeForReturnAddress, NFC 2019-09-10 18:36:50 +00:00
StackFrameRecognizer.cpp [StackFrameRecognizer] Remove unneeded LLDB_DISABLE_PYTHON. 2019-03-19 17:35:37 +00:00
StackID.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
StopInfo.cpp Stop-hooks weren't getting called on step-out. Fix that. 2019-08-15 21:37:52 +00:00
StructuredDataPlugin.cpp C.128 override, virtual keyword handling 2019-05-03 10:03:28 +00:00
SystemRuntime.cpp [NFC] Remove ASCII lines from comments 2019-04-10 20:48:55 +00:00
Target.cpp [lldb] Limit the amount of zeroes we use for padding when printing small floats 2019-09-04 11:41:23 +00:00
TargetList.cpp Lock accesses to OptionValueFileSpecList objects 2019-04-23 20:17:04 +00:00
TargetProperties.td [lldb] Limit the amount of zeroes we use for padding when printing small floats 2019-09-04 11:41:23 +00:00
Thread.cpp Stop-hooks weren't getting called on step-out. Fix that. 2019-08-15 21:37:52 +00:00
ThreadCollection.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
ThreadList.cpp [Logging] Replace Log::Printf with LLDB_LOG macro (NFC) 2019-07-24 17:56:10 +00:00
ThreadPlan.cpp [Logging] Replace Log::Printf with LLDB_LOG macro (NFC) 2019-07-24 17:56:10 +00:00
ThreadPlanBase.cpp [Logging] Replace Log::Printf with LLDB_LOG macro (NFC) 2019-07-24 17:56:10 +00:00
ThreadPlanCallFunction.cpp [Logging] Replace Log::Printf with LLDB_LOG macro (NFC) 2019-07-24 17:56:10 +00:00
ThreadPlanCallFunctionUsingABI.cpp [NFC] Remove ASCII lines from comments 2019-04-10 20:48:55 +00:00
ThreadPlanCallOnFunctionExit.cpp [NFC] Remove ASCII lines from comments 2019-04-10 20:48:55 +00:00
ThreadPlanCallUserExpression.cpp [Logging] Replace Log::Printf with LLDB_LOG macro (NFC) 2019-07-24 17:56:10 +00:00
ThreadPlanPython.cpp [Logging] Replace Log::Printf with LLDB_LOG macro (NFC) 2019-07-24 17:56:10 +00:00
ThreadPlanRunToAddress.cpp [Logging] Replace Log::Printf with LLDB_LOG macro (NFC) 2019-07-24 17:56:10 +00:00
ThreadPlanShouldStopHere.cpp [Logging] Replace Log::Printf with LLDB_LOG macro (NFC) 2019-07-24 17:56:10 +00:00
ThreadPlanStepInRange.cpp [lldb] D66174 `RegularExpression` cleanup 2019-08-20 09:24:20 +00:00
ThreadPlanStepInstruction.cpp [Logging] Replace Log::Printf with LLDB_LOG macro (NFC) 2019-07-24 17:56:10 +00:00
ThreadPlanStepOut.cpp [Logging] Replace Log::Printf with LLDB_LOG macro (NFC) 2019-07-24 17:56:10 +00:00
ThreadPlanStepOverBreakpoint.cpp [Logging] Replace Log::Printf with LLDB_LOG macro (NFC) 2019-07-24 17:56:10 +00:00
ThreadPlanStepOverRange.cpp [Logging] Replace Log::Printf with LLDB_LOG macro (NFC) 2019-07-24 17:56:10 +00:00
ThreadPlanStepRange.cpp [Logging] Replace Log::Printf with LLDB_LOG macro (NFC) 2019-07-24 17:56:10 +00:00
ThreadPlanStepThrough.cpp [Logging] Replace Log::Printf with LLDB_LOG macro (NFC) 2019-07-24 17:56:10 +00:00
ThreadPlanStepUntil.cpp [Logging] Replace Log::Printf with LLDB_LOG macro (NFC) 2019-07-24 17:56:10 +00:00
ThreadPlanTracer.cpp [Symbol] Use llvm::Expected when getting TypeSystems 2019-07-30 22:12:34 +00:00
ThreadSpec.cpp Delete unnecessary copy ctors/copy assignment operators 2019-05-15 11:23:54 +00:00
UnixSignals.cpp [NFC] Remove ASCII lines from comments 2019-04-10 20:48:55 +00:00
UnwindAssembly.cpp Replace 'ap' with 'up' suffix in variable names. (NFC) 2019-02-13 06:25:41 +00:00