mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-07 14:38:01 +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;
|
||||
protected
|
||||
public
|
||||
procedure InvalidateItems;
|
||||
property EntriesByIdx[AnIndex: Integer]: TRegisters read GetEntryByIdx;
|
||||
property Entries[AThreadId, AStackFrame: Integer]: TRegisters read GetEntry; default;
|
||||
end;
|
||||
@ -3365,6 +3366,19 @@ begin
|
||||
Result := TRegisters(inherited EntriesByIdx[AnIndex]);
|
||||
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 }
|
||||
|
||||
function TWatches.GetItemBase(const AnIndex: Integer): TWatch;
|
||||
|
@ -1045,6 +1045,7 @@ type
|
||||
constructor Create;
|
||||
destructor Destroy; override;
|
||||
procedure Clear;
|
||||
procedure InvalidateItems;
|
||||
procedure AddNotification(const ANotification: TRegistersNotification);
|
||||
procedure RemoveNotification(const ANotification: TRegistersNotification);
|
||||
property CurrentRegistersList: TCurrentIDERegistersList read GetCurrentRegistersList;
|
||||
@ -5941,22 +5942,17 @@ end;
|
||||
|
||||
function TCurrentIDERegisters.Count: Integer;
|
||||
begin
|
||||
case DataValidity of
|
||||
ddsUnknown: begin
|
||||
AddReference;
|
||||
try
|
||||
Result := 0;
|
||||
DataValidity := ddsRequested;
|
||||
FMonitor.RequestData(Self); // Locals can be cleared, if debugger is "run" again
|
||||
if DataValidity = ddsValid then Result := inherited Count();
|
||||
finally
|
||||
ReleaseReference;
|
||||
end;
|
||||
end;
|
||||
ddsRequested, ddsEvaluating: Result := 0;
|
||||
ddsValid: Result := inherited Count;
|
||||
ddsInvalid, ddsError: Result := 0;
|
||||
if DataValidity = ddsUnknown then begin
|
||||
AddReference;
|
||||
try
|
||||
Result := 0;
|
||||
DataValidity := ddsRequested;
|
||||
FMonitor.RequestData(Self); // Locals can be cleared, if debugger is "run" again
|
||||
finally
|
||||
ReleaseReference;
|
||||
end;
|
||||
end;
|
||||
result := TDbgEntityValuesList(self).Count;
|
||||
end;
|
||||
|
||||
{ TCurrentIDERegistersList }
|
||||
@ -5989,14 +5985,14 @@ procedure TIdeRegistersMonitor.DoStateEnterPause;
|
||||
begin
|
||||
inherited DoStateEnterPause;
|
||||
if CurrentRegistersList = nil then exit;
|
||||
Clear;
|
||||
InvalidateItems;
|
||||
end;
|
||||
|
||||
procedure TIdeRegistersMonitor.DoStateLeavePauseClean;
|
||||
begin
|
||||
inherited DoStateLeavePauseClean;
|
||||
if CurrentRegistersList = nil then exit;
|
||||
Clear;
|
||||
InvalidateItems;
|
||||
end;
|
||||
|
||||
procedure TIdeRegistersMonitor.DoEndUpdate;
|
||||
@ -6052,6 +6048,11 @@ begin
|
||||
CurrentRegistersList.Clear;
|
||||
end;
|
||||
|
||||
procedure TIdeRegistersMonitor.InvalidateItems;
|
||||
begin
|
||||
CurrentRegistersList.InvalidateItems;
|
||||
end;
|
||||
|
||||
procedure TIdeRegistersMonitor.AddNotification(const ANotification: TRegistersNotification);
|
||||
begin
|
||||
FNotificationList.Add(ANotification);
|
||||
|
Loading…
Reference in New Issue
Block a user