From dc54903e01e6631d4353adb929ea3a004f2db5a6 Mon Sep 17 00:00:00 2001 From: nickysn Date: Mon, 16 Feb 2015 22:11:25 +0000 Subject: [PATCH] * use gdb/mi command for setting tty git-svn-id: trunk@29734 - --- ide/fpdebug.pas | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/ide/fpdebug.pas b/ide/fpdebug.pas index a587467c3c..b44f7694dc 100644 --- a/ide/fpdebug.pas +++ b/ide/fpdebug.pas @@ -830,6 +830,12 @@ end; procedure TDebugController.Run; +const +{$ifdef GDBMI} + SetTTYCommand = '-inferior-tty-set'; +{$else GDBMI} + SetTTYCommand = 'tty'; +{$endif GDBMI} {$ifdef Unix} var Debuggeefile : text; @@ -941,12 +947,12 @@ begin ResetOK:=IOResult=0; If ResetOK and (IsATTY(textrec(Debuggeefile).handle)<>-1) then begin - Command('tty '+DebuggeeTTY); + Command(SetTTYCommand+' '+DebuggeeTTY); TTYUsed:=true; end else begin - Command('tty '); + Command(SetTTYCommand+' '); TTYUsed:=false; end; if ResetOK then @@ -959,7 +965,7 @@ begin else begin if TTYName(input)<>'' then - Command('tty '+TTYName(input)); + Command(SetTTYCommand+' '+TTYName(input)); NoSwitch := false; end; {$endif Unix}