diff --git a/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/commands/CLICommand.java b/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/commands/CLICommand.java index dec4853a965..08a1a73768a 100644 --- a/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/commands/CLICommand.java +++ b/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/commands/CLICommand.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2000, 2009 QNX Software Systems and others. + * Copyright (c) 2000, 2011 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 @@ -26,5 +26,7 @@ public class CLICommand extends MICommand @Override public boolean supportsThreadAndFrameOptions() { return false; } - + + @Override + public boolean supportsThreadGroupOption() { return false; } } diff --git a/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/commands/MICommand.java b/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/commands/MICommand.java index dbba8a48db9..df26dabcd4e 100644 --- a/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/commands/MICommand.java +++ b/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/commands/MICommand.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2000, 2010 QNX Software Systems and others. + * Copyright (c) 2000, 2011 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 @@ -153,14 +153,14 @@ public class MICommand implements ICommand { StringBuffer command = new StringBuffer(getOperation()); // Add the --thread option - if (supportsThreadAndFrameOptions() && threadId != null) { + if (supportsThreadAndFrameOptions() && threadId != null && threadId.trim().length() > 0) { command.append(" --thread " + threadId); //$NON-NLS-1$ // Add the --frame option, but only if we are using the --thread option if (frameId >= 0) { command.append(" --frame " + frameId); //$NON-NLS-1$ } - } else if (supportsThreadGroupOption() && groupId != null) { + } else if (supportsThreadGroupOption() && groupId != null && groupId.trim().length() > 0) { // The --thread-group option is only allowed if we are not using the --thread option command.append(" --thread-group " + groupId); //$NON-NLS-1$ } @@ -257,7 +257,7 @@ public class MICommand implements ICommand { /** * @since 4.0 */ - public boolean supportsThreadGroupOption() { return false; } + public boolean supportsThreadGroupOption() { return true; } /** * Compare commands based on the MI command string that they generate, diff --git a/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/commands/MIFileExecAndSymbols.java b/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/commands/MIFileExecAndSymbols.java index 2505fa66cdd..f2a00b885c7 100644 --- a/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/commands/MIFileExecAndSymbols.java +++ b/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/commands/MIFileExecAndSymbols.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2008, 2010 Ericsson and others. + * Copyright (c) 2008, 2011 Ericsson 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 @@ -56,9 +56,4 @@ public class MIFileExecAndSymbols extends MICommand public MIFileExecAndSymbols(IMIContainerDMContext dmc, String file) { super(dmc, "-file-exec-and-symbols", null, file == null ? null : new String[] {file}); //$NON-NLS-1$ } - - @Override - public boolean supportsThreadGroupOption() { - return true; - } } diff --git a/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/commands/MITargetAttach.java b/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/commands/MITargetAttach.java index c48177a14e4..cf696cedd8e 100644 --- a/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/commands/MITargetAttach.java +++ b/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/commands/MITargetAttach.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2008, 2010 Ericsson and others. + * Copyright (c) 2008, 2011 Ericsson 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 @@ -45,9 +45,4 @@ public class MITargetAttach extends MICommand { public MITargetAttach(IMIContainerDMContext ctx, String pid) { super(ctx, "-target-attach", new String[] { pid }); //$NON-NLS-1$ } - - @Override - public boolean supportsThreadGroupOption() { - return true; - } } diff --git a/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/commands/MITargetDetach.java b/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/commands/MITargetDetach.java index d83fb79b357..80474c94b33 100644 --- a/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/commands/MITargetDetach.java +++ b/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/commands/MITargetDetach.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2008, 2010 Ericsson and others. + * Copyright (c) 2008, 2011 Ericsson 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 @@ -49,10 +49,4 @@ public class MITargetDetach extends MICommand { public MITargetDetach(IMIContainerDMContext ctx) { super(ctx, "-target-detach"); //$NON-NLS-1$ } - - @Override - public boolean supportsThreadGroupOption() { - return true; - } - } diff --git a/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/commands/RawCommand.java b/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/commands/RawCommand.java index 71ab801ea4d..c39fe98b41d 100644 --- a/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/commands/RawCommand.java +++ b/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/commands/RawCommand.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2000, 2009 QNX Software Systems and others. + * Copyright (c) 2000, 2011 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 @@ -30,6 +30,9 @@ public class RawCommand extends MICommand { @Override public boolean supportsThreadAndFrameOptions() { return false; } + @Override + public boolean supportsThreadGroupOption() { return false; } + /* (non-Javadoc) * @see org.eclipse.cdt.debug.mi.core.command.Command#getMIOutput() */