From afc6df87865adae50b4ad2eea12d0771a144ee06 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Wed, 25 Apr 2012 11:07:57 +0300 Subject: [PATCH] Force interactive-mode in GDB on MS-Windows. lisp/progmodes/gdb-mi.el (gdb-init-1): Condition Windows-specific settings on 'system-type', not on 'window-system'. On MS-Windows, set interactive-mode on in GDB. --- lisp/ChangeLog | 6 ++++++ lisp/progmodes/gdb-mi.el | 9 +++++++-- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index bdf6c7a1ac7..e93cd07bda0 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,9 @@ +2012-04-25 Eli Zaretskii + + * progmodes/gdb-mi.el (gdb-init-1): Condition Windows-specific + settings on 'system-type', not on 'window-system'. On MS-Windows, + set interactive-mode on in GDB. + 2012-04-24 Stefan Monnier * progmodes/ruby-mode.el: Simplify last change, and cleanup code. diff --git a/lisp/progmodes/gdb-mi.el b/lisp/progmodes/gdb-mi.el index 1be74ff544b..9f9551cc5d8 100644 --- a/lisp/progmodes/gdb-mi.el +++ b/lisp/progmodes/gdb-mi.el @@ -862,8 +862,13 @@ detailed description of this mode. (gdb-clear-inferior-io) (gdb-inferior-io--init-proc (get-process "gdb-inferior")) - (if (eq window-system 'w32) - (gdb-input "-gdb-set new-console off" 'ignore)) + (when (eq system-type 'windows-nt) + ;; Don't create a separate console window for the debuggee. + (gdb-input "-gdb-set new-console off" 'ignore) + ;; Force GDB to behave as if its input and output stream were + ;; connected to a TTY device (since on Windows we use pipes for + ;; communicating with GDB). + (gdb-input "-gdb-set interactive-mode on" 'ignore)) (gdb-input "-gdb-set height 0" 'ignore) (when gdb-non-stop -- 2.39.2