[Lldb-commits] [PATCH] D40079: Make sure DataBufferLLVM contents are writable
Greg Clayton via lldb-commits
lldb-commits at lists.llvm.org
Wed Nov 15 10:12:53 PST 2017
> On Nov 15, 2017, at 10:11 AM, Zachary Turner <zturner at google.com> wrote:
>
>
>
> On Wed, Nov 15, 2017 at 9:51 AM Pavel Labath <labath at google.com <mailto:labath at google.com>> wrote:
> On 15 November 2017 at 17:42, Zachary Turner <zturner at google.com <mailto:zturner at google.com>> wrote:
> > Can we just extend llvm's mapped_file_region to support a boolean Writable
> > flag?
> >
> mapped_file_region already can be writable. The feature it is missing
> is the ability to *not* use mmap. And that's not a good idea, as the
> whole purpose of that class is to mmap things.
>
>
> We could theoretically add a writable flag to llvm::MemoryBuffer,
> but's its header says:
> /// This interface provides simple ***read-only*** access to a block
> of memory, and ...
>
> To be quite honest I've been annoyed by MemoryBuffer's lack of mutability on many different occasions. It's something I've wanted to fix for a long time anyway.
>
> If this patch isn't super time-critical, I can actually volunteer to go make a writable version of MemoryBuffer, and then we can use that instead. I could probably be done in a day or two. Thoughts?
The more we can push down into llvm the better IMHO. I wouldn't have any problem with it.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20171115/f1cd4768/attachment.html>
More information about the lldb-commits
mailing list