This fixes the assertion assert(intersects); in the Process::WriteMemory function.
BreakpointSite::IntersectsRange returns false for hardware breakpoints, that's why the assertion fails.
Since my bare-metal target loads process's memory via Process::WriteMemory, I have 200+ unresolved tests without this change.
The added test should reproduce the issue for other targets too.
I see. That makes sense, thanks for the test.
My eyes nearly popped out when I saw that we were debugging a process from _inside_ a decorator (to determine watchpoint support status). I don't know when this stuff was introduced -- it sounds like a bad idea to me -- but I don't want to hold up your patch over that.
These days we have helper functions for this typical test setup. I guess this could be lldbutil.run_to_name_breakpoint
We also have a new assertSuccess helper with better error messages. It would be better to write this as assertSuccess(error); assertEquals(result, len(bytes))