From 5c5f660b7bd06624537840fcbc752f0d15a372bc Mon Sep 17 00:00:00 2001 From: Alain Magloire Date: Mon, 30 Sep 2002 16:52:16 +0000 Subject: [PATCH] If we are attached suspending should work fine. --- .../cdt/debug/mi/core/cdi/Configuration.java | 20 +++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/debug/org.eclipse.cdt.debug.mi.core/src/org/eclipse/cdt/debug/mi/core/cdi/Configuration.java b/debug/org.eclipse.cdt.debug.mi.core/src/org/eclipse/cdt/debug/mi/core/cdi/Configuration.java index a5af839127b..81b9914dd9e 100644 --- a/debug/org.eclipse.cdt.debug.mi.core/src/org/eclipse/cdt/debug/mi/core/cdi/Configuration.java +++ b/debug/org.eclipse.cdt.debug.mi.core/src/org/eclipse/cdt/debug/mi/core/cdi/Configuration.java @@ -119,16 +119,24 @@ public class Configuration implements ICDIConfiguration { os = System.getProperty("os.name", ""); } catch (SecurityException e) { } - // FIXME: bug in gdb whe using -tty sending a control-c - // to gdb does not work. - if (os.equals("SunOS")) { - return false; - } Process gdb = miSession.getMIProcess(); if (gdb instanceof Spawner) { + // If we attached sending a control-c, seems to work. + if (fAttached) { + return true; + } + + // If we have a pty, sending a control-c will work + // except for solaris. MIInferior inferior = miSession.getMIInferior(); if (inferior.getPTY() != null) { - return true; + // FIXME: bug in Solaris gdb when using -tty, sending a control-c + // does not work. + if (os.equals("SunOS")) { + return false; + } else { + return true; + } } } return false;