* TDebugController.SetTBreak (adds a temporary breakpoint, used for things like

'run to cursor') moved to gdbcon.pp and implemented via a GDB/MI command in
  the new GDB/MI interface.

git-svn-id: trunk@29721 -
This commit is contained in:
nickysn 2015-02-16 19:58:40 +00:00
parent 1e778468cc
commit f06731ae4f
3 changed files with 16 additions and 8 deletions

View File

@ -55,7 +55,6 @@ type
HasExe : boolean;
RunCount : longint;
WindowWidth : longint;
TBreakNumber : longint;
FPCBreakErrorNumber : longint;
{$ifdef SUPPORT_REMOTE}
isRemoteDebugging,
@ -65,7 +64,6 @@ type
{$endif SUPPORT_REMOTE}
constructor Init;
procedure SetExe(const exefn:string);
procedure SetTBreak(tbreakstring : string);
procedure SetWidth(AWidth : longint);
procedure SetSourceDirs;
destructor Done;
@ -711,12 +709,6 @@ begin
end;
procedure TDebugController.SetTBreak(tbreakstring : string);
begin
Command('tbreak '+tbreakstring);
TBreakNumber:=Last_breakpoint_number;
end;
procedure TDebugController.SetWidth(AWidth : longint);
begin
WindowWidth:=AWidth;

View File

@ -27,6 +27,7 @@ uses
type
TGDBController = object(TGDBInterface)
protected
TBreakNumber,
start_break_number: LongInt;
in_command: LongInt;
@ -48,6 +49,7 @@ type
procedure TraceNextI;
procedure Continue; virtual;
procedure UntilReturn; virtual;
procedure SetTBreak(tbreakstring : string);
function LoadFile(var fn: string): Boolean;
procedure SetDir(const s: string);
procedure SetArgs(const s: string);
@ -163,6 +165,12 @@ begin
WaitForProgramStop;
end;
procedure TGDBController.SetTBreak(tbreakstring : string);
begin
Command('-break-insert -t ' + tbreakstring);
TBreakNumber := GDB.ResultRecord.Parameters['bkpt'].AsTuple['number'].AsLongInt;
end;
function TGDBController.LoadFile(var fn: string): Boolean;
var
cmd: string;

View File

@ -30,6 +30,7 @@ type
progname,
progdir,
progargs : pchar;
TBreakNumber,
start_break_number,
in_command,
init_count : longint;
@ -48,6 +49,7 @@ type
procedure TraceNextI;virtual;
procedure Continue;virtual;
procedure UntilReturn;virtual;
procedure SetTBreak(tbreakstring : string);
{ needed for dos because newlines are only #10 (PM) }
procedure WriteErrorBuf;
procedure WriteOutputBuf;
@ -301,6 +303,12 @@ begin
Command('finish');
end;
procedure TGDBController.SetTBreak(tbreakstring : string);
begin
Command('tbreak '+tbreakstring);
TBreakNumber:=Last_breakpoint_number;
end;
procedure TGDBController.ClearSymbols;
begin