llvm-project/lldb/source/Plugins/ObjectFile/PECOFF
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
..
CMakeLists.txt Move Object format code to lib/BinaryFormat. 2017-06-07 03:48:56 +00:00
ObjectFilePECOFF.cpp Make sure DataBufferLLVM contents are writable 2017-12-21 10:54:30 +00:00
ObjectFilePECOFF.h Rename Error -> Status. 2017-05-12 04:51:55 +00:00
WindowsMiniDump.cpp Rename Error -> Status. 2017-05-12 04:51:55 +00:00
WindowsMiniDump.h Rename Error -> Status. 2017-05-12 04:51:55 +00:00