llvm-project/lldb/source/Target
Pavel Labath 50251fc715 Make sure DataBufferLLVM contents are writable
Summary:
We sometimes need to write to the object file we've mapped into memory,
generally to apply relocations to debug info sections. We've had that
ability before, but with the introduction of DataBufferLLVM, we have
lost it, as the underlying llvm class (MemoryBuffer) only supports
read-only mappings.

This switches DataBufferLLVM to use the new llvm::WritableMemoryBuffer
class as a back-end, as this one guarantees to return a writable buffer.

This removes the need for the "Private" flag to the DataBufferLLVM
creation functions, as it was really used to mean "writable". The LLVM
function also does not have the NullTerminate flag, so I've modified our
clients to not require this feature and removed that flag as well.

Reviewers: zturner, clayborg, jingham

Subscribers: emaste, aprantl, arichardson, krytarowski, lldb-commits

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

llvm-svn: 321255
2017-12-21 10:54:30 +00:00
..
ABI.cpp Change the ABI class to have a weak pointer to its Process; 2017-06-29 02:57:03 +00:00
CMakeLists.txt Delete some more dead includes. 2017-03-22 23:33:16 +00:00
CPPLanguageRuntime.cpp *** This commit represents a complete reformatting of the LLDB source code 2016-09-06 20:57:50 +00:00
ExecutionContext.cpp *** This commit represents a complete reformatting of the LLDB source code 2016-09-06 20:57:50 +00:00
FileAction.cpp Move classes from Core -> Utility. 2017-02-02 21:39:50 +00:00
InstrumentationRuntime.cpp Move classes from Core -> Utility. 2017-02-02 21:39:50 +00:00
InstrumentationRuntimeStopInfo.cpp *** This commit represents a complete reformatting of the LLDB source code 2016-09-06 20:57:50 +00:00
JITLoader.cpp *** This commit represents a complete reformatting of the LLDB source code 2016-09-06 20:57:50 +00:00
JITLoaderList.cpp [lldb] Fix typos in file headers 2016-11-26 05:23:44 +00:00
Language.cpp Rename Error -> Status. 2017-05-12 04:51:55 +00:00
LanguageRuntime.cpp Rename Error -> Status. 2017-05-12 04:51:55 +00:00
Memory.cpp Rename Error -> Status. 2017-05-12 04:51:55 +00:00
MemoryHistory.cpp *** This commit represents a complete reformatting of the LLDB source code 2016-09-06 20:57:50 +00:00
ModuleCache.cpp Rename Error -> Status. 2017-05-12 04:51:55 +00:00
ObjCLanguageRuntime.cpp Move Timer and TraceOptions from Core to Utility 2017-06-29 14:32:17 +00:00
OperatingSystem.cpp *** This commit represents a complete reformatting of the LLDB source code 2016-09-06 20:57:50 +00:00
PathMappingList.cpp Fix some warnings found by ToT clang 2017-11-02 21:35:26 +00:00
Platform.cpp Move PseudoTerminal to the lldb_private namespace 2017-12-11 10:09:14 +00:00
Process.cpp Add target.process.stop-on-exec setting, and obey it. 2017-12-05 02:50:45 +00:00
ProcessInfo.cpp Move classes from Core -> Utility. 2017-02-02 21:39:50 +00:00
ProcessLaunchInfo.cpp Move PseudoTerminal to the lldb_private namespace 2017-12-11 10:09:14 +00:00
Queue.cpp *** This commit represents a complete reformatting of the LLDB source code 2016-09-06 20:57:50 +00:00
QueueItem.cpp *** This commit represents a complete reformatting of the LLDB source code 2016-09-06 20:57:50 +00:00
QueueList.cpp *** This commit represents a complete reformatting of the LLDB source code 2016-09-06 20:57:50 +00:00
RegisterContext.cpp [Target] Remove commented out code. Found by inspection. NFCI. 2017-12-07 17:05:56 +00:00
RegisterNumber.cpp Remove dependencies from Utility to Core and Target. 2017-02-14 19:06:07 +00:00
SectionLoadHistory.cpp Move classes from Core -> Utility. 2017-02-02 21:39:50 +00:00
SectionLoadList.cpp Fix backtrace of noreturn functions situated at the end of a module 2017-06-08 13:26:35 +00:00
StackFrame.cpp Remove the DWARFExpression -> Clang ExpressionParser dependency 2017-08-16 11:45:10 +00:00
StackFrameList.cpp Introduce new command: thread backtrace unique 2017-06-12 16:25:24 +00:00
StackID.cpp Move classes from Core -> Utility. 2017-02-02 21:39:50 +00:00
StopInfo.cpp Add target.process.stop-on-exec setting, and obey it. 2017-12-05 02:50:45 +00:00
StructuredDataPlugin.cpp *** This commit represents a complete reformatting of the LLDB source code 2016-09-06 20:57:50 +00:00
SystemRuntime.cpp *** This commit represents a complete reformatting of the LLDB source code 2016-09-06 20:57:50 +00:00
Target.cpp Make sure DataBufferLLVM contents are writable 2017-12-21 10:54:30 +00:00
TargetList.cpp Move Timer and TraceOptions from Core to Utility 2017-06-29 14:32:17 +00:00
Thread.cpp Move StopInfoOverride callback to the new architecture plugin 2017-10-25 21:05:31 +00:00
ThreadCollection.cpp *** This commit represents a complete reformatting of the LLDB source code 2016-09-06 20:57:50 +00:00
ThreadList.cpp Move Log from Core -> Utility. 2017-03-03 20:56:28 +00:00
ThreadPlan.cpp Move Log from Core -> Utility. 2017-03-03 20:56:28 +00:00
ThreadPlanBase.cpp Move Log from Core -> Utility. 2017-03-03 20:56:28 +00:00
ThreadPlanCallFunction.cpp Rename Error -> Status. 2017-05-12 04:51:55 +00:00
ThreadPlanCallFunctionUsingABI.cpp Move Log from Core -> Utility. 2017-03-03 20:56:28 +00:00
ThreadPlanCallOnFunctionExit.cpp *** This commit represents a complete reformatting of the LLDB source code 2016-09-06 20:57:50 +00:00
ThreadPlanCallUserExpression.cpp Add DidStartExecuting/WillFinishExecuting methods to Expression. 2017-05-05 22:42:13 +00:00
ThreadPlanPython.cpp Move Log from Core -> Utility. 2017-03-03 20:56:28 +00:00
ThreadPlanRunToAddress.cpp Move Log from Core -> Utility. 2017-03-03 20:56:28 +00:00
ThreadPlanShouldStopHere.cpp Move Log from Core -> Utility. 2017-03-03 20:56:28 +00:00
ThreadPlanStepInRange.cpp Log whether we found a step out plan or not. 2017-08-23 19:40:21 +00:00
ThreadPlanStepInstruction.cpp Move Log from Core -> Utility. 2017-03-03 20:56:28 +00:00
ThreadPlanStepOut.cpp Move Log from Core -> Utility. 2017-03-03 20:56:28 +00:00
ThreadPlanStepOverBreakpoint.cpp Move Log from Core -> Utility. 2017-03-03 20:56:28 +00:00
ThreadPlanStepOverRange.cpp Move Log from Core -> Utility. 2017-03-03 20:56:28 +00:00
ThreadPlanStepRange.cpp Move Log from Core -> Utility. 2017-03-03 20:56:28 +00:00
ThreadPlanStepThrough.cpp Move Log from Core -> Utility. 2017-03-03 20:56:28 +00:00
ThreadPlanStepUntil.cpp iwyu fixes for lldbCore. 2017-04-06 21:28:29 +00:00
ThreadPlanTracer.cpp Move ArchSpec to the Utility module 2017-11-13 16:16:33 +00:00
ThreadSpec.cpp Move StructuredData from Core to Utility 2017-06-27 10:45:31 +00:00
UnixSignals.cpp Move ArchSpec to the Utility module 2017-11-13 16:16:33 +00:00
UnwindAssembly.cpp *** This commit represents a complete reformatting of the LLDB source code 2016-09-06 20:57:50 +00:00