[lldb-dev] VMRange merging in ProcessElfCore and DoReadMemory
tfiala at google.com
Wed Feb 19 15:16:06 PST 2014
[Moving LLVM to BCC and adding lldb-dev]
Thanks for the note.
On Wed, Feb 19, 2014 at 2:54 PM, Piotr Rak <piotr.rak at gmail.com> wrote:
> But when we are requested to do read at boundary of two such not merged
> VMRanges, we will read correct data from from file to the end of
> 'last_entry->data.GetRangeEnd()' and then we fill rest with '\0'.
> I think that we should split our requested read operation, to all such
> ranges in this case.
> Is that correct?
For the elf core file support, each of those memory regions represent a
memory segment of the elf file. I don't *think* you should be having any
memory objects which span across segments. So while it might be true that
a request for a contiguous range of VM memory starts off in one segment's
VM map entry and might zero fill if it would cover multiple segments that
were not merged, I'm not sure what would be driving the need to do that.
What is the scenario where the need to read memory over multiple segments
is showing up?
If we did need to do it, I think you are right in that we'd need to merge
reads from each of the VM regions that overlapped with the read request.
Let me know what you find!
Todd Fiala | Software Engineer | tfiala at google.com | 650-943-3180
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the lldb-dev