mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-09-08 20:59:17 +02:00
FpDebug: Windows, fix leaking filehandles / more (temp) fixes for not processing forked children
git-svn-id: trunk@59552 -
This commit is contained in:
parent
84e5ae329a
commit
122dfbd2ce
@ -70,6 +70,7 @@ type
|
||||
function GetInstructionPointerRegisterValue: TDbgPtr; override;
|
||||
function GetStackBasePointerRegisterValue: TDbgPtr; override;
|
||||
function GetStackPointerRegisterValue: TDbgPtr; override;
|
||||
property Process;
|
||||
end;
|
||||
|
||||
|
||||
@ -823,9 +824,19 @@ begin
|
||||
end;
|
||||
CREATE_PROCESS_DEBUG_EVENT: begin
|
||||
//DumpEvent('CREATE_PROCESS_DEBUG_EVENT');
|
||||
StartProcess(MDebugEvent.dwThreadId, MDebugEvent.CreateProcessInfo);
|
||||
FJustStarted := true;
|
||||
result := deCreateProcess;
|
||||
if MDebugEvent.dwProcessId = TDbgWinThread(AThread).Process.ProcessID then begin;
|
||||
//main process
|
||||
StartProcess(MDebugEvent.dwThreadId, MDebugEvent.CreateProcessInfo); // hfile will be closed by TDbgImageLoader
|
||||
FJustStarted := true;
|
||||
result := deCreateProcess;
|
||||
end
|
||||
else begin
|
||||
//child process: ignore
|
||||
// we currently do not use the file handle => close it
|
||||
if MDebugEvent.CreateProcessInfo.hFile <> 0 then
|
||||
CloseHandle(MDebugEvent.CreateProcessInfo.hFile);
|
||||
result := deInternalContinue;
|
||||
end;
|
||||
end;
|
||||
EXIT_THREAD_DEBUG_EVENT: begin
|
||||
//DumpEvent('EXIT_THREAD_DEBUG_EVENT');
|
||||
|
Loading…
Reference in New Issue
Block a user