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