llvm-project/lldb/source
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
..
API [SBBreakpointOptionCommon] Give this class an explicit destructor. 2017-12-07 18:06:06 +00:00
Breakpoint Move ArchSpec to the Utility module 2017-11-13 16:16:33 +00:00
Commands Remove custom TimePoint-formatting code 2017-11-27 17:06:42 +00:00
Core [Module] Throw away some more commented code. NFCI. 2017-11-18 00:52:29 +00:00
DataFormatters Use exact equality for category language matching, for all languages, except those specifically mentioned. 2017-06-06 20:40:24 +00:00
Expression Do not use default arguments of DataLayout::getPointer*. NFC 2017-12-06 01:32:06 +00:00
Host Move PseudoTerminal to the lldb_private namespace 2017-12-11 10:09:14 +00:00
Initialization Don't use llvm::EnablePrettyStackTrace on macOS. 2017-12-02 00:11:18 +00:00
Interpreter Make sure DataBufferLLVM contents are writable 2017-12-21 10:54:30 +00:00
Plugins Make sure DataBufferLLVM contents are writable 2017-12-21 10:54:30 +00:00
Symbol Make sure DataBufferLLVM contents are writable 2017-12-21 10:54:30 +00:00
Target Make sure DataBufferLLVM contents are writable 2017-12-21 10:54:30 +00:00
Utility Make sure DataBufferLLVM contents are writable 2017-12-21 10:54:30 +00:00
CMakeLists.txt Remove Plugins/Process/POSIX from include_directories 2017-04-11 12:26:25 +00:00
lldb.cpp Run clang-format on lldb.cpp 2017-11-02 16:56:52 +00:00