diff options
Diffstat (limited to 'Libraries/LibDebug/DebugSession.cpp')
-rw-r--r-- | Libraries/LibDebug/DebugSession.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/Libraries/LibDebug/DebugSession.cpp b/Libraries/LibDebug/DebugSession.cpp index 242108761a..2c6394de1e 100644 --- a/Libraries/LibDebug/DebugSession.cpp +++ b/Libraries/LibDebug/DebugSession.cpp @@ -175,6 +175,8 @@ bool DebugSession::enable_breakpoint(void* address) auto breakpoint = m_breakpoints.get(address); ASSERT(breakpoint.has_value()); + ASSERT(breakpoint.value().state == BreakPointState::Disabled); + if (!poke(reinterpret_cast<u32*>(breakpoint.value().address), (breakpoint.value().original_first_word & ~(uint32_t)0xff) | BREAKPOINT_INSTRUCTION)) return false; |