From e76b416b04db8eb3576b26ca8c50cd65fccae4cd Mon Sep 17 00:00:00 2001 From: nickysn Date: Thu, 5 Mar 2015 15:18:55 +0000 Subject: [PATCH] * force gdb/mi on windows to always run the debuggee in another console, since I couldn't get same console debugging to work with gdb/mi on windows (and I doubt it's even possible with the current gdb, without patching it) git-svn-id: trunk@30100 - --- ide/fpini.pas | 4 ++++ ide/fpmopts.inc | 3 +++ ide/fpvars.pas | 4 ++++ ide/globdir.inc | 1 + 4 files changed, 12 insertions(+) diff --git a/ide/fpini.pas b/ide/fpini.pas index a4ede2221b..bab96c466b 100644 --- a/ide/fpini.pas +++ b/ide/fpini.pas @@ -431,7 +431,9 @@ begin { First read the primary file, which can also set the parameters which can be overruled with the parameter loading } SetPrimaryFile(INIFile^.GetEntry(secCompile,iePrimaryFile,PrimaryFile)); +{$ifndef GDB_WINDOWS_ALWAYS_USE_ANOTHER_CONSOLE} DebuggeeTTY := INIFile^.GetEntry(secRun,ieDebuggeeRedir,DebuggeeTTY); +{$endif not GDB_WINDOWS_ALWAYS_USE_ANOTHER_CONSOLE} {$ifdef SUPPORT_REMOTE} RemoteMachine :=INIFile^.GetEntry(secRun,ieRemoteMachine,RemoteMachine); RemotePort :=INIFile^.GetEntry(secRun,ieRemotePort,RemotePort); @@ -653,8 +655,10 @@ begin INIFile^.SetEntry(secRun,ieRunDir,GetRunDir); INIFile^.SetEntry(secRun,ieRunParameters,GetRunParameters); INIFile^.SetEntry(secFiles,iePrinterDevice,GetPrinterDevice); +{$ifndef GDB_WINDOWS_ALWAYS_USE_ANOTHER_CONSOLE} { If DebuggeeTTY<>'' then } INIFile^.SetEntry(secRun,ieDebuggeeRedir,DebuggeeTTY); +{$endif not GDB_WINDOWS_ALWAYS_USE_ANOTHER_CONSOLE} {$ifdef SUPPORT_REMOTE} INIFile^.SetEntry(secRun,ieRemoteMachine,RemoteMachine); INIFile^.SetEntry(secRun,ieRemotePort,RemotePort); diff --git a/ide/fpmopts.inc b/ide/fpmopts.inc index db92baaa11..4a27f2e989 100644 --- a/ide/fpmopts.inc +++ b/ide/fpmopts.inc @@ -547,6 +547,9 @@ begin else L:=0; CB2^.SetData(L); +{$ifdef GDB_WINDOWS_ALWAYS_USE_ANOTHER_CONSOLE} + CB2^.EnableMask := CB2^.EnableMask and $fffffffe; +{$endif GDB_WINDOWS_ALWAYS_USE_ANOTHER_CONSOLE} R2.Move(0,-1); Insert(New(PLabel, Init(R2,label_debugger_redirection, CB2))); {$endif Windows} diff --git a/ide/fpvars.pas b/ide/fpvars.pas index 02ec192baa..32a609aafa 100644 --- a/ide/fpvars.pas +++ b/ide/fpvars.pas @@ -145,7 +145,11 @@ const ClipboardWindow : PClipboardWindow = nil; '"$REMOTEEXECCOMMAND" $DOITINBACKGROUND'; {$endif SUPPORT_REMOTE} +{$ifdef GDB_WINDOWS_ALWAYS_USE_ANOTHER_CONSOLE} + DebuggeeTTY : string = 'on'; +{$else GDB_WINDOWS_ALWAYS_USE_ANOTHER_CONSOLE} DebuggeeTTY : string = ''; +{$endif GDB_WINDOWS_ALWAYS_USE_ANOTHER_CONSOLE} ActionCommands : array[acFirstAction..acLastAction] of word = (cmHelpTopicSearch,cmGotoCursor,cmToggleBreakpoint, diff --git a/ide/globdir.inc b/ide/globdir.inc index 5dc9aa675e..7fc7468724 100644 --- a/ide/globdir.inc +++ b/ide/globdir.inc @@ -217,4 +217,5 @@ {$ifdef DEBUG} {$define GDB_RAW_OUTPUT} {$endif DEBUG} + {$define GDB_WINDOWS_ALWAYS_USE_ANOTHER_CONSOLE} {$endif GDBMI} \ No newline at end of file