Browse Source

+ Handle failure of LoadFile method inside TDebugController.SetExe
+ interrupt frame up loop of GetValue fails inside TWatch.Get_new_value method

git-svn-id: trunk@29991 -

pierre 10 years ago
parent
commit
eeda87007e
1 changed files with 8 additions and 2 deletions
  1. 8 2
      ide/fpdebug.pas

+ 8 - 2
ide/fpdebug.pas

@@ -684,7 +684,12 @@ begin
   f := GDBFileName(GetShortName(exefn));
   if (f<>'') and ExistsFile(exefn) then
     begin
-      LoadFile(f);
+      if not LoadFile(f) then
+        begin
+          HasExe:=false;
+          MessageBox(#3'Failed to load file '#13#3+f,nil,mfOKbutton);
+          exit;
+        end;
       HasExe:=true;
       { Procedure HandleErrorAddrFrame
          (Errno : longint;addr,frame : longint);
@@ -2960,7 +2965,8 @@ procedure TWatch.Get_new_value;
 {$else not  FrameNameKnown}
                s2:='/x $ebp';
 {$endif FrameNameKnown}
-               getValue(s2);
+               if not getValue(s2) then
+                 loop_higher:=false;
                j:=pos('=',s2);
                if j>0 then
                  s2:=copy(s2,j+1,length(s2));