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

Greg Clayton via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Mon Jan 29 15:48:59 PST 2018

clayborg added a comment.

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

> I'm not envisioning that anything else needs to change to use begin/end or care it's there.  I guess the way I look at it, having ObjectFile::LoadInMemory do begin/end is basically the same as what you're saying about having it be more process aware.
> If Process is going to introduce new concepts for ObjectFile to use either way, isn't a high level of abstraction (batched writes) preferable to ObjectFile needing to know the fine details of flash memory blocks or that flash is even used?  And doesn't keeping the heavy lifting in ProcessGDB make it reusable should another case come along?
> Hope you don't mind the pushback.  I think we're looking at this from different angles, and I'm genuinely asking to help my understanding of your thinking so hopefully we can converge on the same view.

I really would like users to not have to know how things must happen and that they must use a batch start and batch end. I strongly believe we should have Process::WriteMemory just do the right thing. We can make ObjectFile::Load() be smart and make sure to batch all consecutive writes to avoid unnecessary erases. I just really want memory write to just work. No questions.


More information about the lldb-commits mailing list