mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-29 12:30:36 +02:00
Make register view entry format settings persist through debug session / Patch by ccrause
git-svn-id: trunk@62591 -
This commit is contained in:
parent
dff0c471bc
commit
7e1fb75015
@ -1021,6 +1021,7 @@ type
|
|||||||
function GetEntryByIdx(AnIndex: Integer): TRegisters;
|
function GetEntryByIdx(AnIndex: Integer): TRegisters;
|
||||||
protected
|
protected
|
||||||
public
|
public
|
||||||
|
procedure InvalidateItems;
|
||||||
property EntriesByIdx[AnIndex: Integer]: TRegisters read GetEntryByIdx;
|
property EntriesByIdx[AnIndex: Integer]: TRegisters read GetEntryByIdx;
|
||||||
property Entries[AThreadId, AStackFrame: Integer]: TRegisters read GetEntry; default;
|
property Entries[AThreadId, AStackFrame: Integer]: TRegisters read GetEntry; default;
|
||||||
end;
|
end;
|
||||||
@ -3365,6 +3366,19 @@ begin
|
|||||||
Result := TRegisters(inherited EntriesByIdx[AnIndex]);
|
Result := TRegisters(inherited EntriesByIdx[AnIndex]);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
procedure TRegistersList.InvalidateItems;
|
||||||
|
var
|
||||||
|
i, j: Integer;
|
||||||
|
begin
|
||||||
|
Assert(not Immutable, 'TRegisterList.InvalidateItems Immutable');
|
||||||
|
if Count = 0 then
|
||||||
|
exit;
|
||||||
|
for i := 0 to Count-1 do begin
|
||||||
|
EntriesByIdx[i].DataValidity := ddsUnknown;
|
||||||
|
end;
|
||||||
|
DoCleared;
|
||||||
|
end;
|
||||||
|
|
||||||
{ TWatchesBase }
|
{ TWatchesBase }
|
||||||
|
|
||||||
function TWatches.GetItemBase(const AnIndex: Integer): TWatch;
|
function TWatches.GetItemBase(const AnIndex: Integer): TWatch;
|
||||||
|
@ -1045,6 +1045,7 @@ type
|
|||||||
constructor Create;
|
constructor Create;
|
||||||
destructor Destroy; override;
|
destructor Destroy; override;
|
||||||
procedure Clear;
|
procedure Clear;
|
||||||
|
procedure InvalidateItems;
|
||||||
procedure AddNotification(const ANotification: TRegistersNotification);
|
procedure AddNotification(const ANotification: TRegistersNotification);
|
||||||
procedure RemoveNotification(const ANotification: TRegistersNotification);
|
procedure RemoveNotification(const ANotification: TRegistersNotification);
|
||||||
property CurrentRegistersList: TCurrentIDERegistersList read GetCurrentRegistersList;
|
property CurrentRegistersList: TCurrentIDERegistersList read GetCurrentRegistersList;
|
||||||
@ -5941,22 +5942,17 @@ end;
|
|||||||
|
|
||||||
function TCurrentIDERegisters.Count: Integer;
|
function TCurrentIDERegisters.Count: Integer;
|
||||||
begin
|
begin
|
||||||
case DataValidity of
|
if DataValidity = ddsUnknown then begin
|
||||||
ddsUnknown: begin
|
|
||||||
AddReference;
|
AddReference;
|
||||||
try
|
try
|
||||||
Result := 0;
|
Result := 0;
|
||||||
DataValidity := ddsRequested;
|
DataValidity := ddsRequested;
|
||||||
FMonitor.RequestData(Self); // Locals can be cleared, if debugger is "run" again
|
FMonitor.RequestData(Self); // Locals can be cleared, if debugger is "run" again
|
||||||
if DataValidity = ddsValid then Result := inherited Count();
|
|
||||||
finally
|
finally
|
||||||
ReleaseReference;
|
ReleaseReference;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
ddsRequested, ddsEvaluating: Result := 0;
|
result := TDbgEntityValuesList(self).Count;
|
||||||
ddsValid: Result := inherited Count;
|
|
||||||
ddsInvalid, ddsError: Result := 0;
|
|
||||||
end;
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
{ TCurrentIDERegistersList }
|
{ TCurrentIDERegistersList }
|
||||||
@ -5989,14 +5985,14 @@ procedure TIdeRegistersMonitor.DoStateEnterPause;
|
|||||||
begin
|
begin
|
||||||
inherited DoStateEnterPause;
|
inherited DoStateEnterPause;
|
||||||
if CurrentRegistersList = nil then exit;
|
if CurrentRegistersList = nil then exit;
|
||||||
Clear;
|
InvalidateItems;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TIdeRegistersMonitor.DoStateLeavePauseClean;
|
procedure TIdeRegistersMonitor.DoStateLeavePauseClean;
|
||||||
begin
|
begin
|
||||||
inherited DoStateLeavePauseClean;
|
inherited DoStateLeavePauseClean;
|
||||||
if CurrentRegistersList = nil then exit;
|
if CurrentRegistersList = nil then exit;
|
||||||
Clear;
|
InvalidateItems;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TIdeRegistersMonitor.DoEndUpdate;
|
procedure TIdeRegistersMonitor.DoEndUpdate;
|
||||||
@ -6052,6 +6048,11 @@ begin
|
|||||||
CurrentRegistersList.Clear;
|
CurrentRegistersList.Clear;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
procedure TIdeRegistersMonitor.InvalidateItems;
|
||||||
|
begin
|
||||||
|
CurrentRegistersList.InvalidateItems;
|
||||||
|
end;
|
||||||
|
|
||||||
procedure TIdeRegistersMonitor.AddNotification(const ANotification: TRegistersNotification);
|
procedure TIdeRegistersMonitor.AddNotification(const ANotification: TRegistersNotification);
|
||||||
begin
|
begin
|
||||||
FNotificationList.Add(ANotification);
|
FNotificationList.Add(ANotification);
|
||||||
|
Loading…
Reference in New Issue
Block a user