This fixes the assertion assert(intersects); in the Process::WriteMemory function.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
When does this assertion fire? Is this breaking an existing test? Should we be adding a new one?
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.
lldb/test/API/functionalities/breakpoint/hardware_breakpoints/write_memory_with_hw_breakpoint/TestWriteMemoryWithHWBreakpoint.py | ||
---|---|---|
23–34 | These days we have helper functions for this typical test setup. I guess this could be lldbutil.run_to_name_breakpoint | |
51 | 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)) |
clang-tidy: error: 'lldb/Breakpoint/BreakpointSite.h' file not found [clang-diagnostic-error]
not useful