mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-08 10:16:56 +02:00
Debugger: PseudoTerminal is linux only. Issue #33965
git-svn-id: trunk@58490 -
This commit is contained in:
parent
f134176523
commit
2948414ac2
@ -30,6 +30,8 @@ unit PseudoTerminalDlg;
|
|||||||
|
|
||||||
{$mode objfpc}{$H+}
|
{$mode objfpc}{$H+}
|
||||||
|
|
||||||
|
{$IFDEF linux} {$DEFINE DBG_ENABLE_TERMINAL} {$ENDIF}
|
||||||
|
|
||||||
interface
|
interface
|
||||||
|
|
||||||
uses
|
uses
|
||||||
@ -74,9 +76,9 @@ implementation
|
|||||||
|
|
||||||
uses
|
uses
|
||||||
SysUtils, LazLoggerBase
|
SysUtils, LazLoggerBase
|
||||||
{$IFDEF UNIX}
|
{$IFDEF DBG_ENABLE_TERMINAL}
|
||||||
, Unix, BaseUnix, termio
|
, Unix, BaseUnix, termio
|
||||||
{$ENDIF UNIX}
|
{$ENDIF DBG_ENABLE_TERMINAL}
|
||||||
;
|
;
|
||||||
|
|
||||||
const
|
const
|
||||||
@ -130,12 +132,12 @@ end;
|
|||||||
|
|
||||||
procedure TPseudoConsoleDlg.DoClose(var CloseAction: TCloseAction);
|
procedure TPseudoConsoleDlg.DoClose(var CloseAction: TCloseAction);
|
||||||
begin
|
begin
|
||||||
{$IFDEF UNIX}
|
{$IFDEF DBG_ENABLE_TERMINAL}
|
||||||
if integer(ttyHandle) >= 0 then begin
|
if integer(ttyHandle) >= 0 then begin
|
||||||
FileClose(ttyHandle);
|
FileClose(ttyHandle);
|
||||||
ttyHandle := handleUnopened
|
ttyHandle := handleUnopened
|
||||||
end;
|
end;
|
||||||
{$ENDIF UNIX}
|
{$ENDIF DBG_ENABLE_TERMINAL}
|
||||||
inherited DoClose(CloseAction);
|
inherited DoClose(CloseAction);
|
||||||
CloseAction := caHide;
|
CloseAction := caHide;
|
||||||
end;
|
end;
|
||||||
@ -182,7 +184,7 @@ end;
|
|||||||
*)
|
*)
|
||||||
procedure TPseudoConsoleDlg.consoleSizeChanged;
|
procedure TPseudoConsoleDlg.consoleSizeChanged;
|
||||||
|
|
||||||
{$IFDEF UNIX }
|
{$IFDEF DBG_ENABLE_TERMINAL }
|
||||||
{ DEFINE USE_SLAVE_HANDLE }
|
{ DEFINE USE_SLAVE_HANDLE }
|
||||||
{ DEFINE SEND_EXPLICIT_SIGNAL }
|
{ DEFINE SEND_EXPLICIT_SIGNAL }
|
||||||
|
|
||||||
@ -272,7 +274,7 @@ begin
|
|||||||
{$ELSE }
|
{$ELSE }
|
||||||
begin
|
begin
|
||||||
ttyHandle := THandle(-1); (* Not used in non-unix OSes *)
|
ttyHandle := THandle(-1); (* Not used in non-unix OSes *)
|
||||||
{$ENDIF UNIX }
|
{$ENDIF DBG_ENABLE_TERMINAL }
|
||||||
Assert(ttyHandle <> handleUnopened, 'TPseudoConsoleDlg.consoleSizeChanged: TTY handle still in virgin state at exit')
|
Assert(ttyHandle <> handleUnopened, 'TPseudoConsoleDlg.consoleSizeChanged: TTY handle still in virgin state at exit')
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user