llvm-project/lldb/source/Symbol
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
..
ArmUnwindInfo.cpp Improve FreeBSD kernel debugging 2017-10-02 14:35:07 +00:00
Block.cpp Move Log from Core -> Utility. 2017-03-03 20:56:28 +00:00
CMakeLists.txt Remove dead include from GoASTContext.cpp. 2017-03-22 19:24:17 +00:00
ClangASTContext.cpp [ClangASTContext] Remove dead stuff found fixing something else. 2017-12-14 23:03:35 +00:00
ClangASTImporter.cpp Move Log from Core -> Utility. 2017-03-03 20:56:28 +00:00
ClangExternalASTSourceCallbacks.cpp Move Log from Core -> Utility. 2017-03-03 20:56:28 +00:00
ClangExternalASTSourceCommon.cpp [TypeSystem] Guard the global `ASTSourceMap` with a mutex 2017-07-25 17:33:37 +00:00
ClangUtil.cpp *** This commit represents a complete reformatting of the LLDB source code 2016-09-06 20:57:50 +00:00
CompactUnwindInfo.cpp Move ArchSpec to the Utility module 2017-11-13 16:16:33 +00:00
CompileUnit.cpp *** This commit represents a complete reformatting of the LLDB source code 2016-09-06 20:57:50 +00:00
CompilerDecl.cpp *** This commit represents a complete reformatting of the LLDB source code 2016-09-06 20:57:50 +00:00
CompilerDeclContext.cpp *** This commit represents a complete reformatting of the LLDB source code 2016-09-06 20:57:50 +00:00
CompilerType.cpp Fix assertion in ClangASTContext 2017-11-30 10:16:54 +00:00
DWARFCallFrameInfo.cpp Move ArchSpec to the Utility module 2017-11-13 16:16:33 +00:00
DebugMacros.cpp *** This commit represents a complete reformatting of the LLDB source code 2016-09-06 20:57:50 +00:00
Declaration.cpp Move classes from Core -> Utility. 2017-02-02 21:39:50 +00:00
FuncUnwinders.cpp Add debug_frame section support 2017-06-27 11:16:26 +00:00
Function.cpp Fix the lldb_private::Function::GetDescription to print out the name and mangled name correctly. Previously this was getting the function type's name which was not correct. 2017-02-10 23:32:06 +00:00
GoASTContext.cpp Change UniqueCStringMap to use ConstString as the key 2017-05-02 10:17:30 +00:00
JavaASTContext.cpp Move ArchSpec to the Utility module 2017-11-13 16:16:33 +00:00
LineEntry.cpp *** This commit represents a complete reformatting of the LLDB source code 2016-09-06 20:57:50 +00:00
LineTable.cpp Fix a problem with line tables & .o files that start with code with no line table entries. 2017-03-20 19:19:03 +00:00
OCamlASTContext.cpp Isolate Target-specific functionality of DataExtractor. 2017-03-03 20:57:05 +00:00
ObjectFile.cpp Make sure DataBufferLLVM contents are writable 2017-12-21 10:54:30 +00:00
Symbol.cpp Move classes from Core -> Utility. 2017-02-02 21:39:50 +00:00
SymbolContext.cpp [Expression parser] Look up module symbols before hunting globally 2017-05-16 23:46:13 +00:00
SymbolFile.cpp Provide a mechanism to do some pre-loading of symbols up front. 2017-04-28 00:51:06 +00:00
SymbolVendor.cpp Move classes from Core -> Utility. 2017-02-02 21:39:50 +00:00
Symtab.cpp [Symbol] Remove dead code. NFCI. 2017-10-23 23:14:17 +00:00
Type.cpp Fix some warnings found by ToT clang 2017-11-02 21:35:26 +00:00
TypeList.cpp Improve Type::GetTypeScopeAndBasenameHelper and add unit tests 2017-01-10 11:13:59 +00:00
TypeMap.cpp Improve Type::GetTypeScopeAndBasenameHelper and add unit tests 2017-01-10 11:13:59 +00:00
TypeSystem.cpp Fix assertion in ClangASTContext 2017-11-30 10:16:54 +00:00
UnwindPlan.cpp Move Log from Core -> Utility. 2017-03-03 20:56:28 +00:00
UnwindTable.cpp [DWARFCallFrameInfo] Add Type enum to differentiate eh/debug_frame sections 2017-06-28 09:09:19 +00:00
Variable.cpp Variable: Fix usage of uninitialised value 2017-12-07 10:38:22 +00:00
VariableList.cpp Move classes from Core -> Utility. 2017-02-02 21:39:50 +00:00
VerifyDecl.cpp *** This commit represents a complete reformatting of the LLDB source code 2016-09-06 20:57:50 +00:00