From 2df276e40940846456a9afc8e06ea5df9467f5e5 Mon Sep 17 00:00:00 2001 From: martin Date: Fri, 16 Aug 2013 12:19:39 +0000 Subject: [PATCH] dbg(gdbserver): reset gdb after use git-svn-id: trunk@42411 - --- ide/debugmanager.pas | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ide/debugmanager.pas b/ide/debugmanager.pas index 782d2a8a8e..8fe6b9ec59 100644 --- a/ide/debugmanager.pas +++ b/ide/debugmanager.pas @@ -1239,7 +1239,7 @@ begin EnvironmentOptions.DebuggerShowStopMessage:=false; end; - if EnvironmentOptions.DebuggerResetAfterRun then + if EnvironmentOptions.DebuggerResetAfterRun or FDebugger.NeedReset then ResetDebugger else FDebugger.FileName := ''; // SetState(dsIdle) via ResetStateToIdle @@ -2213,6 +2213,7 @@ begin if (FDebugger <> nil) and (not (FDebugger.ClassType = NewDebuggerClass) // exact class match or (FDebugger.ExternalDebugger <> EnvironmentOptions.GetParsedDebuggerFilename) + or (FDebugger.State in [dsError]) ) then begin // the current debugger is the wrong type -> free it