mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-12-10 16:18:07 +01:00
implemented updates between source marks and breakpoints
git-svn-id: trunk@4228 -
This commit is contained in:
parent
4a8f4953a9
commit
583cd45e6a
@ -260,6 +260,7 @@ type
|
||||
public
|
||||
constructor Create(ACollection: TCollection); override;
|
||||
destructor Destroy; override;
|
||||
function GetSourceLine: integer; override;
|
||||
property Slave: TBaseBreakPoint read FSlave write FSlave;
|
||||
end;
|
||||
TDBGBreakPointClass = class of TDBGBreakPoint;
|
||||
@ -1081,7 +1082,7 @@ begin
|
||||
if FUpdateLock < 0 then RaiseException('TIDEBreakPoint.EndUpdate');
|
||||
if (FUpdateLock = 0) and FChangedWhileLocked
|
||||
then begin
|
||||
inherited Changed(False);
|
||||
DoChanged;
|
||||
FChangedWhileLocked := False
|
||||
end;
|
||||
end;
|
||||
@ -1156,7 +1157,7 @@ begin
|
||||
Changed;
|
||||
end;
|
||||
|
||||
procedure TBaseBreakPoint.SetValid (const AValue: TValidState );
|
||||
procedure TBaseBreakPoint.SetValid(const AValue: TValidState );
|
||||
begin
|
||||
if FValid <> AValue
|
||||
then begin
|
||||
@ -1472,6 +1473,14 @@ begin
|
||||
inherited Destroy;
|
||||
end;
|
||||
|
||||
function TDBGBreakPoint.GetSourceLine: integer;
|
||||
begin
|
||||
if Slave<>nil then
|
||||
Result:=Slave.GetSourceLine
|
||||
else
|
||||
Result:=inherited GetSourceLine;
|
||||
end;
|
||||
|
||||
procedure TDBGBreakPoint.DoChanged;
|
||||
begin
|
||||
inherited DoChanged;
|
||||
@ -1492,10 +1501,11 @@ procedure TDBGBreakPoint.InitTargetStart;
|
||||
begin
|
||||
BeginUpdate;
|
||||
try
|
||||
SetLocation(FSource,GetSourceLine);
|
||||
Enabled := InitialEnabled;
|
||||
SetHitCount(0);
|
||||
finally
|
||||
EndUpdate
|
||||
EndUpdate;
|
||||
end;
|
||||
end;
|
||||
|
||||
@ -2444,6 +2454,9 @@ end;
|
||||
end.
|
||||
{ =============================================================================
|
||||
$Log$
|
||||
Revision 1.38 2003/06/03 10:29:22 mattias
|
||||
implemented updates between source marks and breakpoints
|
||||
|
||||
Revision 1.37 2003/06/03 08:02:33 mattias
|
||||
implemented showing source lines in breakpoints dialog
|
||||
|
||||
|
||||
@ -178,6 +178,7 @@ type
|
||||
function GetValid: TValidState; override;
|
||||
procedure SetEnabled(const AValue: Boolean); override;
|
||||
procedure SetExpression(const AValue: String); override;
|
||||
procedure SetLocation(const ASource: String; const ALine: Integer); override;
|
||||
procedure UpdateSourceMarkImage;
|
||||
procedure UpdateSourceMarkLineColor;
|
||||
procedure UpdateSourceMark;
|
||||
@ -186,6 +187,7 @@ type
|
||||
destructor Destroy; override;
|
||||
procedure ResetMaster;
|
||||
function GetSourceLine: integer; override;
|
||||
procedure CopySourcePositionToBreakPoint;
|
||||
property SourceMark: TSourceMark read FSourceMark write SetSourceMark;
|
||||
end;
|
||||
|
||||
@ -326,14 +328,17 @@ begin
|
||||
Result:=inherited GetSourceLine;
|
||||
end;
|
||||
|
||||
procedure TManagedBreakPoint.CopySourcePositionToBreakPoint;
|
||||
begin
|
||||
if FSourceMark=nil then exit;
|
||||
SetLocation(Source,FSourceMark.Line);
|
||||
end;
|
||||
|
||||
procedure TManagedBreakPoint.SetEnabled(const AValue: Boolean);
|
||||
begin
|
||||
writeln('TManagedBreakPoint.SetEnabled ',Line);
|
||||
if Enabled = AValue then exit;
|
||||
inherited SetEnabled(AValue);
|
||||
if FMaster <> nil then FMaster.Enabled := AValue;
|
||||
// Handled by changed
|
||||
// UpdateSourceMarkImage;
|
||||
end;
|
||||
|
||||
procedure TManagedBreakPoint.SetExpression(const AValue: String);
|
||||
@ -343,6 +348,15 @@ begin
|
||||
if FMaster <> nil then FMaster.Expression := AValue;
|
||||
end;
|
||||
|
||||
procedure TManagedBreakPoint.SetLocation(const ASource: String;
|
||||
const ALine: Integer);
|
||||
begin
|
||||
if (Source = ASource) and (Line = ALine) then exit;
|
||||
inherited SetLocation(ASource, ALine);
|
||||
writeln('TManagedBreakPoint.SetLocation ',Line);
|
||||
if FMaster<>nil then FMaster.SetLocation(ASource,ALine);
|
||||
end;
|
||||
|
||||
procedure TManagedBreakPoint.UpdateSourceMarkImage;
|
||||
var
|
||||
Img: Integer;
|
||||
@ -1356,6 +1370,9 @@ end.
|
||||
|
||||
{ =============================================================================
|
||||
$Log$
|
||||
Revision 1.43 2003/06/03 10:29:22 mattias
|
||||
implemented updates between source marks and breakpoints
|
||||
|
||||
Revision 1.42 2003/06/03 08:02:32 mattias
|
||||
implemented showing source lines in breakpoints dialog
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user