|
@@ -25,6 +25,8 @@ uses
|
|
GDBInt;
|
|
GDBInt;
|
|
|
|
|
|
type
|
|
type
|
|
|
|
+ TWatchpointType = (wtWrite, wtReadWrite, wtRead);
|
|
|
|
+
|
|
PGDBController=^TGDBController;
|
|
PGDBController=^TGDBController;
|
|
TGDBController=object(TGDBInterface)
|
|
TGDBController=object(TGDBInterface)
|
|
progname,
|
|
progname,
|
|
@@ -50,6 +52,7 @@ type
|
|
procedure Continue;virtual;
|
|
procedure Continue;virtual;
|
|
procedure UntilReturn;virtual;
|
|
procedure UntilReturn;virtual;
|
|
function BreakpointInsert(const location: string): LongInt;
|
|
function BreakpointInsert(const location: string): LongInt;
|
|
|
|
+ function WatchpointInsert(const location: string; WatchpointType: TWatchpointType): LongInt;
|
|
procedure SetTBreak(tbreakstring : string);
|
|
procedure SetTBreak(tbreakstring : string);
|
|
procedure Backtrace;
|
|
procedure Backtrace;
|
|
{ needed for dos because newlines are only #10 (PM) }
|
|
{ needed for dos because newlines are only #10 (PM) }
|
|
@@ -307,12 +310,28 @@ end;
|
|
|
|
|
|
function TGDBController.BreakpointInsert(const location: string): LongInt;
|
|
function TGDBController.BreakpointInsert(const location: string): LongInt;
|
|
begin
|
|
begin
|
|
|
|
+ Last_breakpoint_number:=0;
|
|
Command('break '+location);
|
|
Command('break '+location);
|
|
BreakpointInsert:=Last_breakpoint_number;
|
|
BreakpointInsert:=Last_breakpoint_number;
|
|
end;
|
|
end;
|
|
|
|
|
|
|
|
+function TGDBController.WatchpointInsert(const location: string; WatchpointType: TWatchpointType): LongInt;
|
|
|
|
+begin
|
|
|
|
+ Last_breakpoint_number:=0;
|
|
|
|
+ case WatchpointType of
|
|
|
|
+ wtWrite:
|
|
|
|
+ Command('watch ' + location);
|
|
|
|
+ wtReadWrite:
|
|
|
|
+ Command('awatch ' + location);
|
|
|
|
+ wtRead:
|
|
|
|
+ Command('rwatch ' + location);
|
|
|
|
+ end;
|
|
|
|
+ BreakpointInsert:=Last_breakpoint_number;
|
|
|
|
+end;
|
|
|
|
+
|
|
procedure TGDBController.SetTBreak(tbreakstring : string);
|
|
procedure TGDBController.SetTBreak(tbreakstring : string);
|
|
begin
|
|
begin
|
|
|
|
+ Last_breakpoint_number:=0;
|
|
Command('tbreak '+tbreakstring);
|
|
Command('tbreak '+tbreakstring);
|
|
TBreakNumber:=Last_breakpoint_number;
|
|
TBreakNumber:=Last_breakpoint_number;
|
|
end;
|
|
end;
|