[Lldb-commits] [PATCH] D42145: [lldb] Use vFlash commands when writing to target's flash memory regions

Owen Shaw via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Tue Jan 30 09:53:26 PST 2018

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.


More information about the lldb-commits mailing list