浏览代码

* fixed crash with the gdb/mi debugger, when trying to step/run a program with
the gdb window open

git-svn-id: trunk@29782 -

nickysn 10 年之前
父节点
当前提交
a1afce8a69
共有 1 个文件被更改,包括 5 次插入5 次删除
  1. 5 5
      ide/fpdebug.pas

+ 5 - 5
ide/fpdebug.pas

@@ -972,9 +972,6 @@ begin
 {$endif SUPPORT_REMOTE}
 {$endif SUPPORT_REMOTE}
   { Switch to user screen to get correct handles }
   { Switch to user screen to get correct handles }
   UserScreen;
   UserScreen;
-  { Don't try to print GDB messages while in User Screen mode }
-  If assigned(GDBWindow) then
-    GDBWindow^.Editor^.Lock;
 {$ifdef SUPPORT_REMOTE}
 {$ifdef SUPPORT_REMOTE}
   if isRemoteDebugging then
   if isRemoteDebugging then
     begin
     begin
@@ -996,8 +993,6 @@ begin
       SetDir(StartupDir);
       SetDir(StartupDir);
     end;
     end;
   DebuggerScreen;
   DebuggerScreen;
-  If assigned(GDBWindow) then
-    GDBWindow^.Editor^.UnLock;
   IDEApp.SetCmdState([cmResetDebugger,cmUntilReturn],true);
   IDEApp.SetCmdState([cmResetDebugger,cmUntilReturn],true);
   IDEApp.UpdateRunMenu(true);
   IDEApp.UpdateRunMenu(true);
   UpdateDebugViews;
   UpdateDebugViews;
@@ -1556,6 +1551,8 @@ begin
      end;
      end;
    ChangeDebuggeeWindowTitleTo(Stopped_State);
    ChangeDebuggeeWindowTitleTo(Stopped_State);
 {$endif Windows}
 {$endif Windows}
+  If assigned(GDBWindow) then
+    GDBWindow^.Editor^.UnLock;
 end;
 end;
 
 
 
 
@@ -1595,6 +1592,9 @@ begin
      end;
      end;
    ChangeDebuggeeWindowTitleTo(Running_State);
    ChangeDebuggeeWindowTitleTo(Running_State);
 {$endif Windows}
 {$endif Windows}
+  { Don't try to print GDB messages while in User Screen mode }
+  If assigned(GDBWindow) then
+    GDBWindow^.Editor^.Lock;
 end;
 end;
 
 
 {$endif NODEBUG}
 {$endif NODEBUG}