llvm-project/lldb/source/Utility
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
..
ARM64_DWARF_Registers.h Break some dependencies in lldbUtility. 2017-02-01 19:45:14 +00:00
ARM64_ehframe_Registers.h *** This commit represents a complete reformatting of the LLDB source code 2016-09-06 20:57:50 +00:00
ARM_DWARF_Registers.h Break some dependencies in lldbUtility. 2017-02-01 19:45:14 +00:00
ARM_ehframe_Registers.h *** This commit represents a complete reformatting of the LLDB source code 2016-09-06 20:57:50 +00:00
ArchSpec.cpp Move ArchSpec to the Utility module 2017-11-13 16:16:33 +00:00
Baton.cpp iwyu fixes on lldbUtility. 2017-04-06 18:12:24 +00:00
CMakeLists.txt Move ArchSpec to the Utility module 2017-11-13 16:16:33 +00:00
Connection.cpp Move Connection and IOObject interfaces to Utility module 2017-06-27 10:33:14 +00:00
ConstString.cpp Remove lock from ConstString::GetLength 2017-04-28 12:08:28 +00:00
DataBufferHeap.cpp Move DataBuffer / DataExtractor and friends from Core -> Utility. 2017-03-04 01:30:05 +00:00
DataBufferLLVM.cpp Make sure DataBufferLLVM contents are writable 2017-12-21 10:54:30 +00:00
DataEncoder.cpp [DataEncoder] Replace buggy versions of write functions. 2017-12-13 01:41:16 +00:00
DataExtractor.cpp Fix dumping of characters with non-standard sizes 2017-10-11 08:48:18 +00:00
FastDemangle.cpp iwyu fixes on lldbUtility. 2017-04-06 18:12:24 +00:00
FileSpec.cpp Support: Have directory_iterator::status() return FindFirstFileEx/FindNextFile results on Windows. 2017-10-10 22:19:46 +00:00
History.cpp Move many other files from Core -> Utility. 2017-03-06 18:34:25 +00:00
IOObject.cpp Move Connection and IOObject interfaces to Utility module 2017-06-27 10:33:14 +00:00
JSON.cpp [lldb] Correctly escape newlines and backslashes in the JSON serializer 2017-08-22 18:36:12 +00:00
LLDBAssert.cpp iwyu fixes on lldbUtility. 2017-04-06 18:12:24 +00:00
Log.cpp Log: delimit thread name in log message 2017-11-08 10:48:54 +00:00
Logging.cpp Logging: Disable logging after fork() 2017-10-23 19:41:17 +00:00
NameMatches.cpp Fix a couple of corner cases in NameMatches 2017-02-20 11:35:33 +00:00
PPC64LE_DWARF_Registers.h Add float/vector registers for ppc64le 2017-11-03 15:22:36 +00:00
PPC64LE_ehframe_Registers.h Add float/vector registers for ppc64le 2017-11-03 15:22:36 +00:00
Range.cpp iwyu fixes on lldbUtility. 2017-04-06 18:12:24 +00:00
RegularExpression.cpp iwyu fixes on lldbUtility. 2017-04-06 18:12:24 +00:00
SelectHelper.cpp Add an #include to appease an older clang, NFC 2017-12-12 20:19:40 +00:00
SharingPtr.cpp *** This commit represents a complete reformatting of the LLDB source code 2016-09-06 20:57:50 +00:00
Status.cpp Remove uint32_t assignment operator from Status 2017-11-01 15:00:58 +00:00
Stream.cpp iwyu fixes on lldbUtility. 2017-04-06 18:12:24 +00:00
StreamCallback.cpp iwyu fixes on lldbUtility. 2017-04-06 18:12:24 +00:00
StreamGDBRemote.cpp iwyu fixes on lldbUtility. 2017-04-06 18:12:24 +00:00
StreamString.cpp iwyu fixes on lldbUtility. 2017-04-06 18:12:24 +00:00
StringExtractor.cpp Implementation of remote packets for Trace data. 2017-05-26 11:46:27 +00:00
StringExtractorGDBRemote.cpp Added a missing "break;" after seeing a clang warning about potential fall through annotation. 2017-07-21 20:20:25 +00:00
StringExtractorGDBRemote.h Adding Support for Error Strings in Remote Packets 2017-07-12 11:15:34 +00:00
StringLexer.cpp [Utility/StringLexer] Remove dead code. 2017-04-19 18:18:25 +00:00
StringList.cpp iwyu fixes on lldbUtility. 2017-04-06 18:12:24 +00:00
StructuredData.cpp Fix LLDB build. 2017-11-17 03:28:58 +00:00
TildeExpressionResolver.cpp iwyu fixes on lldbUtility. 2017-04-06 18:12:24 +00:00
Timer.cpp Move Timer and TraceOptions from Core to Utility 2017-06-29 14:32:17 +00:00
UUID.cpp Simplify UUID constructors 2017-11-28 17:50:31 +00:00
UriParser.cpp Fix some warnings found by ToT clang 2017-11-02 21:35:26 +00:00
UserID.cpp Move many other files from Core -> Utility. 2017-03-06 18:34:25 +00:00
UuidCompatibility.h
VASprintf.cpp iwyu fixes on lldbUtility. 2017-04-06 18:12:24 +00:00
VMRange.cpp [VMRange] Remove unused FindRangeIndexThatContainsValue(). 2017-06-09 21:01:55 +00:00