clayborg added a comment.

In https://reviews.llvm.org/D39967#985119, @tatyana-krasnukha wrote:

> I completely agree with your point, but why isn't enough just to return an 
> error about breakpoints in the area user wants to write?


The reason I don't like this is there is no way for a user to look at the error 
returned and do anything sensible. The only thing they can do is scrape the 
error string to see if it contains something about breakpoints? I am a firm 
believer that the debugger needs to do what is right for the API call to work 
no matter what it is doing for breakpoints since the breakpoints are a side 
effect of using the debugger.

> Or to disable breakpoints forcibly?

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.


https://reviews.llvm.org/D39967



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

Reply via email to