FpDebug: Ensure that exit thread aborts any running command. (The command may change the event-enum-code in FPDEvent, and try to continue running)

git-svn-id: trunk@61864 -
This commit is contained in:
martin 2019-09-12 15:33:09 +00:00
parent 479abc2507
commit df6722dd5f

View File

@ -767,6 +767,11 @@ var
begin
AExit:=false;
if FCurrentProcess = nil then begin
DebugLn(DBG_WARNINGS, 'Error: Processloop has no process');
exit;
end;
repeat
if assigned(FCurrentProcess) and not assigned(FMainProcess) then
FMainProcess:=FCurrentProcess
@ -849,6 +854,9 @@ begin
FCurrentProcess.FormatAddress(FCurrentThread.GetStackPointerRegisterValue),
FCurrentProcess.FormatAddress(FCurrentThread.GetStackBasePointerRegisterValue),
dbgs(CurrentProcess.CurrentBreakpoint<>nil)]);
if FPDEvent=deExitProcess then
FreeAndNil(FCommand)
else
if assigned(FCommand) then
begin
FCommand.ResolveEvent(FPDEvent, IsHandled, IsFinished);