mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-16 04:59:20 +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
|
case CtrlType of
|
||||||
CTRL_C_EVENT,
|
CTRL_C_EVENT,
|
||||||
CTRL_BREAK_EVENT: begin
|
CTRL_BREAK_EVENT: begin
|
||||||
if GState <> dsRun then Exit;
|
if GController.MainProcess = nil then Exit;
|
||||||
if GMainProcess = nil then Exit;
|
TDbgWinProcess(GController.MainProcess).Interrupt;
|
||||||
TDbgWinProcess(GMainProcess).Interrupt;
|
|
||||||
|
|
||||||
Result := True;
|
Result := True;
|
||||||
end;
|
end;
|
||||||
CTRL_CLOSE_EVENT: begin
|
CTRL_CLOSE_EVENT: begin
|
||||||
if (GState in [dsRun, dsPause]) and (GMainProcess <> nil)
|
if (GController.MainProcess <> nil)
|
||||||
then TerminateProcess(GMainProcess.Handle, 0);
|
then TerminateProcess(GController.MainProcess.Handle, 0);
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
@ -511,10 +511,10 @@ begin
|
|||||||
Exit;
|
Exit;
|
||||||
end;
|
end;
|
||||||
{$ifdef windows}
|
{$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
|
if hFile = INVALID_HANDLE_VALUE
|
||||||
then begin
|
then begin
|
||||||
WriteLN('File "', GFileName, '" does not exist');
|
WriteLN('File "', GController.ExecutableFilename, '" does not exist');
|
||||||
Exit;
|
Exit;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user