Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 13 additions & 1 deletion core/debuggercontroller.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2014,7 +2014,17 @@ void DebuggerController::DebuggerMainThread()
AddRegisterValuesToExpressionParser();
AddModuleValuesToExpressionParser();

if (uint64_t ip = m_state->IP(); m_state->GetBreakpoints()->ContainsAbsolute(ip))
// skip conditional breakpoint evaluation for step operations - when the user explicitly
// steps onto a breakpoint, they expect to stop there regardless of the condition.
bool isStepOperation = (m_lastOperation == DebugAdapterStepInto)
|| (m_lastOperation == DebugAdapterStepOver)
|| (m_lastOperation == DebugAdapterStepReturn)
|| (m_lastOperation == DebugAdapterStepIntoReverse)
|| (m_lastOperation == DebugAdapterStepOverReverse)
|| (m_lastOperation == DebugAdapterStepReturnReverse);

if (uint64_t ip = m_state->IP();
!isStepOperation && m_state->GetBreakpoints()->ContainsAbsolute(ip))
{
if (!EvaluateBreakpointCondition(ip))
{
Expand Down Expand Up @@ -2654,6 +2664,8 @@ DebugStopReason DebuggerController::ExecuteAdapterAndWait(const DebugAdapterOper
},
"WaitForAdapterStop");

m_lastOperation = operation;

bool resumeOK = false;
bool operationRequested = false;
switch (operation)
Expand Down
1 change: 1 addition & 0 deletions core/debuggercontroller.h
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,7 @@ namespace BinaryNinjaDebugger {
uint32_t m_exitCode = 0;

bool m_userRequestedBreak = false;
DebugAdapterOperation m_lastOperation = DebugAdapterGo;

bool m_lastAdapterStopEventConsumed = true;

Expand Down