mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-22 01:39:42 +02:00
FpDebug: Fixed compilation of the example console-debugger on Windows
git-svn-id: trunk@44794 -
This commit is contained in:
parent
194ab88119
commit
48c19eb556
@ -57,15 +57,14 @@ begin
|
||||
case CtrlType of
|
||||
CTRL_C_EVENT,
|
||||
CTRL_BREAK_EVENT: begin
|
||||
if GState <> dsRun then Exit;
|
||||
if GMainProcess = nil then Exit;
|
||||
TDbgWinProcess(GMainProcess).Interrupt;
|
||||
if GController.MainProcess = nil then Exit;
|
||||
TDbgWinProcess(GController.MainProcess).Interrupt;
|
||||
|
||||
Result := True;
|
||||
end;
|
||||
CTRL_CLOSE_EVENT: begin
|
||||
if (GState in [dsRun, dsPause]) and (GMainProcess <> nil)
|
||||
then TerminateProcess(GMainProcess.Handle, 0);
|
||||
if (GController.MainProcess <> nil)
|
||||
then TerminateProcess(GController.MainProcess.Handle, 0);
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
|
@ -511,10 +511,10 @@ begin
|
||||
Exit;
|
||||
end;
|
||||
{$ifdef windows}
|
||||
hFile := CreateFile(PChar(GFileName), GENERIC_READ, FILE_SHARE_READ, nil, OPEN_EXISTING, FILE_FLAG_RANDOM_ACCESS, 0);
|
||||
hFile := CreateFile(PChar(GController.ExecutableFilename), GENERIC_READ, FILE_SHARE_READ, nil, OPEN_EXISTING, FILE_FLAG_RANDOM_ACCESS, 0);
|
||||
if hFile = INVALID_HANDLE_VALUE
|
||||
then begin
|
||||
WriteLN('File "', GFileName, '" does not exist');
|
||||
WriteLN('File "', GController.ExecutableFilename, '" does not exist');
|
||||
Exit;
|
||||
end;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user