From cebb446f55113a316cd4cdce96267047f4991447 Mon Sep 17 00:00:00 2001 From: Rene Gollent Date: Thu, 30 May 2013 21:12:23 -0400 Subject: [PATCH] BreakpointManager: Adjust breakpoint installation logic. If the debugger interface isn't currently connected, don't attempt to actually install the breakpoint, and simply consider the operation a success. This allows setting new breakpoints after e.g. the team has exited. Resolves remaining part of #9774. --- src/apps/debugger/debug_managers/BreakpointManager.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/apps/debugger/debug_managers/BreakpointManager.cpp b/src/apps/debugger/debug_managers/BreakpointManager.cpp index 998f9fcd04..71dd193281 100644 --- a/src/apps/debugger/debug_managers/BreakpointManager.cpp +++ b/src/apps/debugger/debug_managers/BreakpointManager.cpp @@ -494,8 +494,13 @@ BreakpointManager::_UpdateBreakpointInstallation(Breakpoint* breakpoint) if (shouldBeInstalled) { // install - status_t error = fDebuggerInterface->InstallBreakpoint( - breakpoint->Address()); + status_t error = B_OK; + // if we're not actually connected to a team, silently + // allow setting the breakpoint so it's saved to settings + // for when we do connect/have the team in the debugger. + if (fDebuggerInterface->Connected()) + fDebuggerInterface->InstallBreakpoint(breakpoint->Address()); + if (error != B_OK) return error;