mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2026-01-04 03:50:30 +01:00
* use the gdb/mi command for deleting breakpoints
git-svn-id: trunk@29787 -
This commit is contained in:
parent
c5b9465255
commit
c2d659950e
@ -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}
|
||||
|
||||
@ -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);
|
||||
|
||||
@ -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;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user