[Lldb-commits] [PATCH] D39967: Refactoring of MemoryWrite function
Greg Clayton via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Tue Jan 23 08:28:58 PST 2018
clayborg added a comment.
In https://reviews.llvm.org/D39967#985181, @labath wrote:
> In https://reviews.llvm.org/D39967#985171, @clayborg wrote:
>
> > That would be an easy fix for the ObjectFile::Load(), we could see if there are any breakpoints in the range we are trying to write, get a list of them, disable them all, write memory and re-enable. But this doesn't stop a user from trying doing something like:
> >
> > (lldb) script lldb.process.WriteMemory(...)
> >
> >
> > And they should expect this to just work no matter where they write memory.
>
>
> Couldn't WriteMemory do the same thing as well? I would expect that 99% of WriteMemory calls will not intersect any breakpoints so the overhead of disabling and re-enabling should be negligible.
Indeed the fix could do this to make this easier and I agree that would be a cleaner fix. We already have all the APIs we need for this. Tatyana, let us know what you think of changing this patch to get a list of overlapping breakpoints, disable, write memory, re-enable. All from within Process::WriteMemory
https://reviews.llvm.org/D39967
More information about the lldb-commits
mailing list