Browse Source

* setting breakpoint ignore count implemented via gdb/mi command in the gdb/mi
interface

git-svn-id: trunk@29790 -

nickysn 10 năm trước cách đây
mục cha
commit
8ed6109955
3 tập tin đã thay đổi với 23 bổ sung1 xóa
  1. 1 1
      ide/fpdebug.pas
  2. 11 0
      ide/gdbmicon.pas
  3. 11 0
      packages/gdbint/src/gdbcon.pp

+ 1 - 1
ide/fpdebug.pas

@@ -1795,7 +1795,7 @@ begin
           GDBState:=bs_enabled;
           Debugger^.BreakpointCondition(GDBIndex, GetStr(Conditions));
           If IgnoreCount>0 then
-            Debugger^.Command('ignore '+IntToStr(GDBIndex)+' '+IntToStr(IgnoreCount));
+            Debugger^.BreakpointSetIgnoreCount(GDBIndex, IgnoreCount);
           If Assigned(Commands) then
             begin
               {Commands are not handled yet }

+ 11 - 0
ide/gdbmicon.pas

@@ -60,6 +60,7 @@ type
     function BreakpointEnable(BkptNo: LongInt): Boolean;
     function BreakpointDisable(BkptNo: LongInt): Boolean;
     function BreakpointCondition(BkptNo: LongInt; const ConditionExpr: string): Boolean;
+    function BreakpointSetIgnoreCount(BkptNo: LongInt; const IgnoreCount: LongInt): Boolean;
     procedure SetTBreak(tbreakstring : string);
     procedure Backtrace;
     function LoadFile(var fn: string): Boolean;
@@ -248,6 +249,16 @@ begin
   BreakpointCondition := GDB.ResultRecord.Success;
 end;
 
+function TGDBController.BreakpointSetIgnoreCount(BkptNo: LongInt; const IgnoreCount: LongInt): Boolean;
+var
+  BkptNoStr, IgnoreCountStr: string;
+begin
+  Str(BkptNo, BkptNoStr);
+  Str(IgnoreCount, IgnoreCountStr);
+  Command('-break-after ' + BkptNoStr + ' ' + IgnoreCountStr);
+  BreakpointSetIgnoreCount := GDB.ResultRecord.Success;
+end;
+
 procedure TGDBController.SetTBreak(tbreakstring : string);
 begin
   Command('-break-insert -t ' + tbreakstring);

+ 11 - 0
packages/gdbint/src/gdbcon.pp

@@ -58,6 +58,7 @@ type
     function BreakpointEnable(BkptNo: LongInt): Boolean;
     function BreakpointDisable(BkptNo: LongInt): Boolean;
     function BreakpointCondition(BkptNo: LongInt; const ConditionExpr: string): Boolean;
+    function BreakpointSetIgnoreCount(BkptNo: LongInt; const IgnoreCount: LongInt): Boolean;
     procedure SetTBreak(tbreakstring : string);
     procedure Backtrace;
     { needed for dos because newlines are only #10 (PM) }
@@ -376,6 +377,16 @@ begin
   BreakpointCondition := not Error;
 end;
 
+function TGDBController.BreakpointSetIgnoreCount(BkptNo: LongInt; const IgnoreCount: LongInt): Boolean;
+var
+  BkptNoStr, IgnoreCountStr: string;
+begin
+  Str(BkptNo, BkptNoStr);
+  Str(IgnoreCount, IgnoreCountStr);
+  Command('ignore ' + BkptNoStr + ' ' + IgnoreCountStr);
+  BreakpointSetIgnoreCount := not Error;
+end;
+
 procedure TGDBController.SetTBreak(tbreakstring : string);
 begin
   Last_breakpoint_number:=0;