[Lldb-commits] [PATCH] D40079: Make sure DataBufferLLVM contents are writable
Greg Clayton via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Tue Dec 19 09:05:00 PST 2017
clayborg requested changes to this revision.
clayborg added a comment.
This revision now requires changes to proceed.
See inlined comment. Quick fix and this will be good to go.
================
Comment at: source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp:409-410
if (!data_sp) {
- data_sp =
- DataBufferLLVM::CreateSliceFromPath(file->GetPath(), length, file_offset, true);
+ data_sp = DataBufferLLVM::CreateSliceFromPath(file->GetPath(), length,
+ file_offset);
if (!data_sp)
----------------
We should put the DataBufferLLVM::CreateSliceFromPath() call into a new static function in ObjectFile:
```
static DataBufferSP ObjectFile::MapFileData(FileSpec file, uint64_t Size, uint64_t Offset);
```
Then when we need to make fixes, we change just one place instead of all of them. We should add this new function and switch all ObjectFile subclasses over to using it.
https://reviews.llvm.org/D40079
More information about the lldb-commits
mailing list