#97, add itf method called on dbg resume

This commit is contained in:
Basile Burg 2016-12-01 06:08:18 +01:00
parent d9216222ac
commit e79eeaecb1
No known key found for this signature in database
GPG Key ID: 1868039F415CB8CF
3 changed files with 20 additions and 0 deletions

View File

@ -47,6 +47,8 @@ type
out line: integer; out kind: TBreakPointKind); out line: integer; out kind: TBreakPointKind);
// a break happens when code in fname at line is executed. // a break happens when code in fname at line is executed.
procedure debugBreak(const fname: string; line: integer; reason: TCEDebugBreakReason); procedure debugBreak(const fname: string; line: integer; reason: TCEDebugBreakReason);
// debugging continue
procedure debugContinue;
end; end;
(** (**
@ -57,6 +59,7 @@ type
// TCEDebugObserverSubject primitives // TCEDebugObserverSubject primitives
procedure subjDebugStart(subj: TCEDebugObserverSubject; dbg: ICEDebugger); procedure subjDebugStart(subj: TCEDebugObserverSubject; dbg: ICEDebugger);
procedure subjDebugStop(subj: TCEDebugObserverSubject); procedure subjDebugStop(subj: TCEDebugObserverSubject);
procedure subjDebugContinue(subj: TCEDebugObserverSubject);
procedure subjDebugBreak(subj: TCEDebugObserverSubject; const fname: string; procedure subjDebugBreak(subj: TCEDebugObserverSubject; const fname: string;
line: integer; reason: TCEDebugBreakReason); line: integer; reason: TCEDebugBreakReason);
@ -88,5 +91,13 @@ begin
(subj.observers[i] as ICEDebugObserver).debugBreak(fname, line, reason); (subj.observers[i] as ICEDebugObserver).debugBreak(fname, line, reason);
end; end;
procedure subjDebugContinue(subj: TCEDebugObserverSubject);
var
i: integer;
begin
for i:= 0 to subj.observersCount-1 do
(subj.observers[i] as ICEDebugObserver).debugContinue;
end;
end. end.

View File

@ -2249,7 +2249,10 @@ procedure TCEGdbWidget.btnContClick(Sender: TObject);
begin begin
gdbCommand('-exec-continue --all', @gdboutJsonize); gdbCommand('-exec-continue --all', @gdboutJsonize);
if assigned(fGdb) and fgdb.Running then if assigned(fGdb) and fgdb.Running then
begin
setState(gsRunning); setState(gsRunning);
subjDebugContinue(fSubj);
end;
end; end;
procedure TCEGdbWidget.btnVariablesClick(Sender: TObject); procedure TCEGdbWidget.btnVariablesClick(Sender: TObject);

View File

@ -219,6 +219,7 @@ type
function findBreakPoint(line: integer): boolean; function findBreakPoint(line: integer): boolean;
procedure debugStart(debugger: ICEDebugger); procedure debugStart(debugger: ICEDebugger);
procedure debugStop; procedure debugStop;
procedure debugContinue;
function debugQueryBpCount: integer; function debugQueryBpCount: integer;
procedure debugQueryBreakPoint(const index: integer; out fname: string; out line: integer; out kind: TBreakPointKind); procedure debugQueryBreakPoint(const index: integer; out fname: string; out line: integer; out kind: TBreakPointKind);
procedure debugBreak(const fname: string; line: integer; reason: TCEDebugBreakReason); procedure debugBreak(const fname: string; line: integer; reason: TCEDebugBreakReason);
@ -2651,6 +2652,11 @@ begin
removeDebugTimeMarks; removeDebugTimeMarks;
end; end;
procedure TCESynMemo.debugContinue;
begin
removeDebugTimeMarks;
end;
function TCESynMemo.debugQueryBpCount: integer; function TCESynMemo.debugQueryBpCount: integer;
begin begin
exit(fBreakPoints.Count); exit(fBreakPoints.Count);