LazDebuggerFp: check correct thread (only top frame) when getting register values

git-svn-id: trunk@61836 -
This commit is contained in:
martin 2019-09-08 19:03:05 +00:00
parent 5b2858fe15
commit 3254177a33

View File

@ -1089,11 +1089,16 @@ var
ARegisterList: TDbgRegisterValueList;
i: Integer;
ARegisterValue: TRegisterValue;
thr: TDbgThread;
begin
if (Debugger = nil) or not(Debugger.State in [dsPause, dsInternalPause, dsStop]) then
exit;
ARegisterList := TFpDebugDebugger(Debugger).FDbgController.CurrentThread.RegisterValueList;
if not TFpDebugDebugger(Debugger).FDbgController.MainProcess.GetThread(ARegisters.ThreadId, thr) then begin
ARegisters.DataValidity:=ddsError;
exit;
end;
ARegisterList := thr.RegisterValueList;
for i := 0 to ARegisterList.Count-1 do
begin
ARegisterValue := ARegisters.EntriesByName[ARegisterList[i].Name];