labath added a comment.

In D62503#1519179 <https://reviews.llvm.org/D62503#1519179>, @aadsm wrote:

> Regarding changing the ReadMemory, yes, I was going to submit another patch 
> with it. I was going to do it in a different way though, where I would read 
> as much as possible with the process_vm_readv (fwiw, this function does not 
> fail when it tries to read cross page, it will just partial read) and then 
> read the rest with ptrace.


I think this is fine too, probably even better. I was going to suggest the same 
thing, but then I convinced myself that this wouldn't work in case the read 
*starts* in the unreadable memory region.

However, now that I think about it, that is nonsense, because there is no way 
for us to say to the user that "we failed to read some initial bytes, but this 
is the memory contents after that". So just using process_vm_readv, and 
finishing up with ptrace sounds fine to me.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D62503/new/

https://reviews.llvm.org/D62503



_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to