* use the gdb/mi command for deleting breakpoints

git-svn-id: trunk@29787 -
This commit is contained in:
nickysn 2015-02-22 01:29:27 +00:00
parent c5b9465255
commit c2d659950e
3 changed files with 21 additions and 1 deletions

View File

@ -1856,7 +1856,7 @@ begin
{$ifndef NODEBUG}
If not assigned(Debugger) then Exit;
if GDBIndex>0 then
Debugger^.Command('delete '+IntToStr(GDBIndex));
Debugger^.BreakpointDelete(GDBIndex);
GDBIndex:=0;
GDBState:=bs_deleted;
{$endif NODEBUG}

View File

@ -56,6 +56,7 @@ type
procedure UntilReturn; virtual;
function BreakpointInsert(const location: string; BreakpointFlags: TBreakpointFlags): LongInt;
function WatchpointInsert(const location: string; WatchpointType: TWatchpointType): LongInt;
function BreakpointDelete(BkptNo: LongInt): Boolean;
procedure SetTBreak(tbreakstring : string);
procedure Backtrace;
function LoadFile(var fn: string): Boolean;
@ -208,6 +209,15 @@ begin
WatchpointInsert := 0;
end;
function TGDBController.BreakpointDelete(BkptNo: LongInt): Boolean;
var
BkptNoStr: string;
begin
Str(BkptNo, BkptNoStr);
Command('-break-delete ' + BkptNoStr);
BreakpointDelete := GDB.ResultRecord.Success;
end;
procedure TGDBController.SetTBreak(tbreakstring : string);
begin
Command('-break-insert -t ' + tbreakstring);

View File

@ -54,6 +54,7 @@ type
procedure UntilReturn;virtual;
function BreakpointInsert(const location: string; BreakpointFlags: TBreakpointFlags): LongInt;
function WatchpointInsert(const location: string; WatchpointType: TWatchpointType): LongInt;
function BreakpointDelete(BkptNo: LongInt): Boolean;
procedure SetTBreak(tbreakstring : string);
procedure Backtrace;
{ needed for dos because newlines are only #10 (PM) }
@ -336,6 +337,15 @@ begin
WatchpointInsert:=Last_breakpoint_number;
end;
function TGDBController.BreakpointDelete(BkptNo: LongInt): Boolean;
var
BkptNoStr: string;
begin
Str(BkptNo, BkptNoStr);
Command('delete ' + BkptNoStr);
BreakpointDelete := not Error;
end;
procedure TGDBController.SetTBreak(tbreakstring : string);
begin
Last_breakpoint_number:=0;