Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[cdt-patch] CDT_1_0_1 patch for gdb MIPlugin

Index: ChangeLog
===================================================================
RCS file: /home/tools/org.eclipse.cdt.debug.mi.core/ChangeLog,v
retrieving revision 1.48.2.1
diff -u -r1.48.2.1 ChangeLog
--- ChangeLog	6 Mar 2003 15:52:43 -0000	1.48.2.1
+++ ChangeLog	7 Apr 2003 13:53:38 -0000
@@ -1,3 +1,8 @@
+2003-04-07 Alain Magloire
+
+	* src/org/eclipse/cdt/debug/mi/core/MIPlugin.java
+	When program == null do not pass it in the array of args to exec.
+
 2003-03-06 Alain Magloire
 
     GDB on certain platform is very susceptible to register probing
Index: src/org/eclipse/cdt/debug/mi/core/MIPlugin.java
===================================================================
RCS file: /home/tools/org.eclipse.cdt.debug.mi.core/src/org/eclipse/cdt/debug/mi/core/MIPlugin.java,v
retrieving revision 1.32
diff -u -r1.32 MIPlugin.java
--- src/org/eclipse/cdt/debug/mi/core/MIPlugin.java	1 Nov 2002 16:43:53 -0000	1.32
+++ src/org/eclipse/cdt/debug/mi/core/MIPlugin.java	7 Apr 2003 13:53:38 -0000
@@ -106,9 +106,17 @@
 
 		String[] args;
 		if (pty != null) {
-			args = new String[] {gdb, "-q", "-nw", "-tty", pty.getSlaveName(), "-i", "mi1", program};
+			if (program == null) {
+				args = new String[] {gdb, "-q", "-nw", "-tty", pty.getSlaveName(), "-i", "mi1"};
+			} else {
+				args = new String[] {gdb, "-q", "-nw", "-tty", pty.getSlaveName(), "-i", "mi1", program};
+			}
 		} else {
-			args = new String[] {gdb, "-q", "-nw", "-i", "mi1", program};
+			if (program == null) {
+				args = new String[] {gdb, "-q", "-nw", "-i", "mi1"};
+			} else {
+				args = new String[] {gdb, "-q", "-nw", "-i", "mi1", program};
+			}
 		}
 
 		Process pgdb = ProcessFactory.getFactory().exec(args);
@@ -141,7 +149,12 @@
 		if (gdb == null || gdb.length() == 0) {
 			gdb =  "gdb";
 		}
-		String[] args = new String[] {gdb, "--quiet", "-nw", "-i", "mi1", program, core};
+		String[] args;
+		if (program == null) {
+			args = new String[] {gdb, "--quiet", "-nw", "-i", "mi1", "-c", core};
+		} else {
+			args = new String[] {gdb, "--quiet", "-nw", "-i", "mi1", "-c", core, program};
+		}
 		Process pgdb = ProcessFactory.getFactory().exec(args);
 		MISession session = createMISession(pgdb, null, MISession.CORE);
 		return new CSession(session);
@@ -158,7 +171,15 @@
 		if (gdb == null || gdb.length() == 0) {
 			gdb =  "gdb";
 		}
-		String[] args = new String[] {gdb, "--quiet", "-nw", "-i", "mi1", program};
+
+		String[] args = null;
+
+		if (program == null) {
+			args = new String[] {gdb, "--quiet", "-nw", "-i", "mi1"};
+		} else {
+			args = new String[] {gdb, "--quiet", "-nw", "-i", "mi1", program};
+		}
+
 		Process pgdb = ProcessFactory.getFactory().exec(args);
 		MISession session = createMISession(pgdb, null, MISession.ATTACH);
 		MIInfo info = null;



Back to the top