Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohn Cortell2010-04-26 20:18:09 +0000
committerJohn Cortell2010-04-26 20:18:09 +0000
commit4aee96ae0b602b96e2cafac1381f3f00816bc96d (patch)
treed28938ccc03c2e1db5d7f46c4b062a2847f1adbb /debug/org.eclipse.cdt.debug.mi.core
parent6fbc6bfd8d6f0737c435cafa4bddd7a05a91fb8e (diff)
downloadorg.eclipse.cdt-4aee96ae0b602b96e2cafac1381f3f00816bc96d.tar.gz
org.eclipse.cdt-4aee96ae0b602b96e2cafac1381f3f00816bc96d.tar.xz
org.eclipse.cdt-4aee96ae0b602b96e2cafac1381f3f00816bc96d.zip
Bug 304096: Fix interrupting Cygwin gdb for both DSF-GDB and CDI-GDB. Send a real CTRL-C; don't use 'kill -SIGINT'
Diffstat (limited to 'debug/org.eclipse.cdt.debug.mi.core')
-rw-r--r--debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/command/factories/win32/CygwinCommandFactory.java21
-rw-r--r--debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/command/factories/win32/StandardWinCommandFactory.java5
-rw-r--r--debug/org.eclipse.cdt.debug.mi.core/src/org/eclipse/cdt/debug/mi/core/CygwinMIProcessAdapter.java40
-rw-r--r--debug/org.eclipse.cdt.debug.mi.core/src/org/eclipse/cdt/debug/mi/core/MIProcessAdapter.java4
4 files changed, 5 insertions, 65 deletions
diff --git a/debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/command/factories/win32/CygwinCommandFactory.java b/debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/command/factories/win32/CygwinCommandFactory.java
index 11c64590ea9..5b4897c997d 100644
--- a/debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/command/factories/win32/CygwinCommandFactory.java
+++ b/debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/command/factories/win32/CygwinCommandFactory.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2004, 2007 QNX Software Systems and others.
+ * Copyright (c) 2004, 2010 QNX Software Systems and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -10,13 +10,7 @@
*******************************************************************************/
package org.eclipse.cdt.debug.mi.core.command.factories.win32;
-import java.io.IOException;
-
-import org.eclipse.cdt.debug.mi.core.CygwinMIProcessAdapter;
-import org.eclipse.cdt.debug.mi.core.MIProcess;
import org.eclipse.cdt.debug.mi.core.command.MIEnvironmentDirectory;
-import org.eclipse.cdt.debug.mi.core.command.MIGDBSetNewConsole;
-import org.eclipse.core.runtime.IProgressMonitor;
/**
* Command factory for the gdb/mi protocol for CygWin environment.
@@ -40,17 +34,4 @@ public class CygwinCommandFactory extends StandardWinCommandFactory {
public MIEnvironmentDirectory createMIEnvironmentDirectory(boolean reset, String[] pathdirs) {
return new CygwinMIEnvironmentDirectory( getMIVersion(), reset, pathdirs );
}
-
- public MIGDBSetNewConsole createMIGDBSetNewConsole() {
- // With cygwin, the Ctrl-C isn't getting propagated to the
- // inferior. Thus we need to have the inferior in it's own
- // console so that the fall back of sending it the interrupt
- // signal works.
- return new MIGDBSetNewConsole(getMIVersion(), "on");
- }
-
- public MIProcess createMIProcess(String[] args, int launchTimeout,
- IProgressMonitor monitor) throws IOException {
- return new CygwinMIProcessAdapter(args, launchTimeout, monitor);
- }
}
diff --git a/debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/command/factories/win32/StandardWinCommandFactory.java b/debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/command/factories/win32/StandardWinCommandFactory.java
index a947f07e0a0..60fb9d5025b 100644
--- a/debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/command/factories/win32/StandardWinCommandFactory.java
+++ b/debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/command/factories/win32/StandardWinCommandFactory.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2004, 2007 QNX Software Systems and others.
+ * Copyright (c) 2004, 2010 QNX Software Systems and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -102,7 +102,6 @@ public class StandardWinCommandFactory extends StandardCommandFactory {
public MIGDBSetNewConsole createMIGDBSetNewConsole() {
// By default in Windows, turn off new console so that the
// Ctrl-C's get propogated automatically to the inferior.
- // Overriden by Cygwin.
- return new MIGDBSetNewConsole(getMIVersion(), "off");
+ return new MIGDBSetNewConsole(getMIVersion(), "off"); //$NON-NLS-1$
}
}
diff --git a/debug/org.eclipse.cdt.debug.mi.core/src/org/eclipse/cdt/debug/mi/core/CygwinMIProcessAdapter.java b/debug/org.eclipse.cdt.debug.mi.core/src/org/eclipse/cdt/debug/mi/core/CygwinMIProcessAdapter.java
deleted file mode 100644
index c938a255a32..00000000000
--- a/debug/org.eclipse.cdt.debug.mi.core/src/org/eclipse/cdt/debug/mi/core/CygwinMIProcessAdapter.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/**********************************************************************
- * Copyright (c) 2007 QNX Software Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * QNX Software Systems - Initial API and implementation
- **********************************************************************/
-
-package org.eclipse.cdt.debug.mi.core;
-
-import java.io.IOException;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-
-/**
- * @author Doug Schaefer
- */
-public class CygwinMIProcessAdapter extends MIProcessAdapter {
-
- /**
- * @param args
- * @param launchTimeout
- * @param monitor
- * @throws IOException
- */
- public CygwinMIProcessAdapter(String[] args, int launchTimeout,
- IProgressMonitor monitor) throws IOException {
- super(args, launchTimeout, monitor);
- }
-
- public void interrupt(MIInferior inferior) {
- // With cygwin gdb, interrupting gdb itself never works.
- // You need to interrupt the inferior directly.
- interruptInferior(inferior);
- }
-
-}
diff --git a/debug/org.eclipse.cdt.debug.mi.core/src/org/eclipse/cdt/debug/mi/core/MIProcessAdapter.java b/debug/org.eclipse.cdt.debug.mi.core/src/org/eclipse/cdt/debug/mi/core/MIProcessAdapter.java
index 32b56f2ed16..9eca771b652 100644
--- a/debug/org.eclipse.cdt.debug.mi.core/src/org/eclipse/cdt/debug/mi/core/MIProcessAdapter.java
+++ b/debug/org.eclipse.cdt.debug.mi.core/src/org/eclipse/cdt/debug/mi/core/MIProcessAdapter.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2009 QNX Software Systems and others.
+ * Copyright (c) 2000, 2010 QNX Software Systems and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -123,7 +123,7 @@ public class MIProcessAdapter implements MIProcess {
if (fGDBProcess instanceof Spawner) {
if (inferior.isRunning()) {
Spawner gdbSpawner = (Spawner) fGDBProcess;
- gdbSpawner.interrupt();
+ gdbSpawner.interruptCTRLC();
waitForInterrupt(inferior);
}
// If we are still running try to drop the sig to the PID

Back to the top