clayborg added a comment.

In https://reviews.llvm.org/D42145#991459, @owenpshaw wrote:

> Thanks.  What I'm struggling to reconcile are your statements that users 
> should not have to know how things must happen, but then that we should make 
> ObjectFile::Load smart so it doesn't result in an unnecessary amount of 
> reads/writes.  If writing to flash memory effectively requires some smarts on 
> the caller's part, then how have we made things easier for the callers?


We don't have to, we can let them submit each memory write and do things 
inefficiently. I am just saying it isn't too hard in ObjectFile::Load to gather 
large contiguous writes and submit them as one Process::WriteMemory. Pavel's 
suggestion that we send an array of regions would allow us to do this 
internally in the Process::WriteMemory(regions) call.

> And at that point isn't start/end a lot simpler than requiring callers to 
> worry about block sizes themselves?

There are no block size requirements here, WriteMemory can either do the write 
memory or error out. Just submit the largest contiguous write possible. Not 
sure what the issue is here?


https://reviews.llvm.org/D42145



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

Reply via email to