On Wed, Nov 15, 2017 at 9:51 AM Pavel Labath <lab...@google.com> wrote:

> On 15 November 2017 at 17:42, Zachary Turner <ztur...@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?
_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to