mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-05-17 07:04:10 +02:00
FpDebug: Windows, Check dwDebugEventCode before accessing case dependent data
git-svn-id: trunk@59740 -
This commit is contained in:
parent
396d0d0387
commit
0506cd7fb5
@ -519,6 +519,7 @@ begin
|
|||||||
end;
|
end;
|
||||||
AProcess.ThreadsBeforeContinue;
|
AProcess.ThreadsBeforeContinue;
|
||||||
|
|
||||||
|
if MDebugEvent.dwDebugEventCode = EXCEPTION_DEBUG_EVENT then
|
||||||
case MDebugEvent.Exception.ExceptionRecord.ExceptionCode of
|
case MDebugEvent.Exception.ExceptionRecord.ExceptionCode of
|
||||||
EXCEPTION_BREAKPOINT,
|
EXCEPTION_BREAKPOINT,
|
||||||
EXCEPTION_SINGLE_STEP: begin
|
EXCEPTION_SINGLE_STEP: begin
|
||||||
@ -526,7 +527,9 @@ begin
|
|||||||
end
|
end
|
||||||
else
|
else
|
||||||
Windows.ContinueDebugEvent(MDebugEvent.dwProcessId, MDebugEvent.dwThreadId, DBG_EXCEPTION_NOT_HANDLED);
|
Windows.ContinueDebugEvent(MDebugEvent.dwProcessId, MDebugEvent.dwThreadId, DBG_EXCEPTION_NOT_HANDLED);
|
||||||
end;
|
end
|
||||||
|
else
|
||||||
|
Windows.ContinueDebugEvent(MDebugEvent.dwProcessId, MDebugEvent.dwThreadId, DBG_CONTINUE);
|
||||||
result := true;
|
result := true;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -828,7 +831,7 @@ begin
|
|||||||
end;
|
end;
|
||||||
CREATE_PROCESS_DEBUG_EVENT: begin
|
CREATE_PROCESS_DEBUG_EVENT: begin
|
||||||
//DumpEvent('CREATE_PROCESS_DEBUG_EVENT');
|
//DumpEvent('CREATE_PROCESS_DEBUG_EVENT');
|
||||||
if MDebugEvent.dwProcessId = TDbgWinThread(AThread).Process.ProcessID then begin;
|
if MDebugEvent.dwProcessId = TDbgWinThread(AThread).Process.ProcessID then begin
|
||||||
//main process
|
//main process
|
||||||
StartProcess(MDebugEvent.dwThreadId, MDebugEvent.CreateProcessInfo); // hfile will be closed by TDbgImageLoader
|
StartProcess(MDebugEvent.dwThreadId, MDebugEvent.CreateProcessInfo); // hfile will be closed by TDbgImageLoader
|
||||||
FJustStarted := true;
|
FJustStarted := true;
|
||||||
|
Loading…
Reference in New Issue
Block a user