owenpshaw added a comment.

This discussion has got me questioning if WriteMemory is even the best place to 
put the flash commands.  It seems like some of the concern here is around the 
behavior of arbitrary memory writes to flash regions, which isn't really the 
main objective of this patch (supporting object file loading into flash).

I did a little testing with gdb, and it doesn't do arbitrary memory writes to 
flash regions.  Using the set command on a flash address, for example, just 
gives an error that flash writes are not allowed.  Perhaps that's a better way 
to go than worrying about supporting one-off flash writes.

----

> I still like my WriteMemory(ArrayRef<MemoryWriteDescriptor>) proposal the 
> best.

The one difference I see between a single function and begin/end is that 
begin/end doesn't require all the bytes to be read into host memory up front, 
and can instead read the source bytes in chunks.  Perhaps that's not really a 
reason for concern, though.


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