mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-23 17:05:26 +02:00
[304618] Most MICommands were created with their parameters treated as options.
This commit is contained in:
parent
96c2033d9f
commit
3e3b57e1d1
10 changed files with 20 additions and 32 deletions
|
@ -323,7 +323,7 @@ public class GDBControl extends AbstractMIControl implements IGDBControl {
|
|||
// When doing remote debugging, we use -exec-continue instead of -exec-run
|
||||
execCommand = getCommandFactory().createMIExecContinue(containerDmc);
|
||||
} else {
|
||||
execCommand = getCommandFactory().createMIExecRun(containerDmc, new String[0]);
|
||||
execCommand = getCommandFactory().createMIExecRun(containerDmc);
|
||||
}
|
||||
|
||||
boolean stopInMain = false;
|
||||
|
|
|
@ -364,7 +364,7 @@ public class GDBControl_7_0 extends AbstractMIControl implements IGDBControl {
|
|||
// When doing remote debugging, we use -exec-continue instead of -exec-run
|
||||
fExecCommand = getCommandFactory().createMIExecContinue(fContainerDmc);
|
||||
} else {
|
||||
fExecCommand = getCommandFactory().createMIExecRun(fContainerDmc, new String[0]);
|
||||
fExecCommand = getCommandFactory().createMIExecRun(fContainerDmc);
|
||||
}
|
||||
rm.done();
|
||||
}},
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2007 Ericsson and others.
|
||||
* Copyright (c) 2007, 2010 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
|
||||
|
@ -26,7 +26,6 @@ import org.eclipse.cdt.dsf.mi.service.command.output.MIInfo;
|
|||
public class MIBreakAfter extends MICommand<MIInfo>
|
||||
{
|
||||
public MIBreakAfter(IBreakpointsTargetDMContext ctx, int breakpoint, int ignoreCount) {
|
||||
super(ctx, "-break-after"); //$NON-NLS-1$
|
||||
setParameters(new String[] { Integer.toString(breakpoint), Integer.toString(ignoreCount) });
|
||||
super(ctx, "-break-after", new String[] { Integer.toString(breakpoint), Integer.toString(ignoreCount) }); //$NON-NLS-1$
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2000, 2008 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
|
||||
|
@ -48,8 +48,8 @@ public class MICommand<V extends MIInfo> implements ICommand<V> {
|
|||
this(ctx, operation, empty, empty);
|
||||
}
|
||||
|
||||
public MICommand(IDMContext ctx, String operation, String[] options) {
|
||||
this(ctx, operation, options, empty);
|
||||
public MICommand(IDMContext ctx, String operation, String[] params) {
|
||||
this(ctx, operation, empty, params);
|
||||
}
|
||||
|
||||
public MICommand(IDMContext ctx, String operation, String[] options, String[] params) {
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2000, 2005, 2008 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
|
||||
|
@ -25,23 +25,10 @@ import org.eclipse.cdt.dsf.mi.service.command.output.MIInfo;
|
|||
public class MIEnvironmentDirectory extends MICommand<MIInfo> {
|
||||
|
||||
public MIEnvironmentDirectory(IDMContext ctx, String[] paths, boolean reset) {
|
||||
super(ctx, "-environment-directory"); //$NON-NLS-1$
|
||||
super(ctx, "-environment-directory", paths); //$NON-NLS-1$
|
||||
|
||||
String[] options;
|
||||
if (reset) {
|
||||
if (paths == null) {
|
||||
options = new String[] {"-r"}; //$NON-NLS-1$
|
||||
} else {
|
||||
options = new String[paths.length + 1];
|
||||
options[0] = "-r"; //$NON-NLS-1$
|
||||
for (int i = 1; i < options.length; i++) {
|
||||
options[i] = paths[i-1];
|
||||
}
|
||||
}
|
||||
} else {
|
||||
options = paths;
|
||||
setOptions(new String[] {"-r"}); //$NON-NLS-1$
|
||||
}
|
||||
|
||||
setOptions(options);
|
||||
}
|
||||
}
|
|
@ -1,5 +1,5 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2000, 2007 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
|
||||
|
@ -18,12 +18,14 @@ import org.eclipse.cdt.dsf.mi.service.command.output.MIInfo;
|
|||
|
||||
/**
|
||||
*
|
||||
* -exec-run
|
||||
* -exec-run [ARGS]
|
||||
*
|
||||
* Asynchronous command. Starts execution of the inferior from the
|
||||
* beginning. The inferior executes until either a breakpoint is
|
||||
* encountered or the program exits.
|
||||
*
|
||||
* ARGS will be passed to the inferior. This option is not documented.
|
||||
*
|
||||
*/
|
||||
public class MIExecRun extends MICommand<MIInfo>
|
||||
{
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2000, 2007 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
|
||||
|
@ -38,7 +38,7 @@ public class MIInterpreterExec<V extends MIInfo> extends MICommand<V> {
|
|||
* @param oper
|
||||
*/
|
||||
public MIInterpreterExec(IDMContext ctx, String interpreter, String cmd) {
|
||||
super(ctx, "-interpreter-exec", new String[]{interpreter}, new String[] {cmd}); //$NON-NLS-1$
|
||||
super(ctx, "-interpreter-exec", new String[] {interpreter, cmd}); //$NON-NLS-1$
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -26,7 +26,7 @@ import org.eclipse.cdt.dsf.mi.service.command.output.MIInfo;
|
|||
public class MIStackSelectFrame extends MICommand<MIInfo> {
|
||||
|
||||
public MIStackSelectFrame(IDMContext ctx, int frameNum) {
|
||||
super(ctx, "-stack-select-frame", new String[]{Integer.toString(frameNum)}, new String[0]); //$NON-NLS-1$
|
||||
super(ctx, "-stack-select-frame", new String[]{Integer.toString(frameNum)}); //$NON-NLS-1$
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -28,7 +28,7 @@ import org.eclipse.cdt.dsf.mi.service.command.output.MIInfo;
|
|||
public class MIThreadSelect extends MICommand<MIInfo>
|
||||
{
|
||||
public MIThreadSelect(IDMContext ctx, int threadNum) {
|
||||
super(ctx, "-thread-select", new String[]{Integer.toString(threadNum)}); //$NON-NLS-1$
|
||||
this(ctx, Integer.toString(threadNum));
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2010 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
|
||||
|
@ -35,7 +35,7 @@ public class MIVarUpdate extends MICommand<MIVarUpdateInfo> {
|
|||
* @since 1.1
|
||||
*/
|
||||
public MIVarUpdate(ICommandControlDMContext dmc, String name) {
|
||||
super(dmc, "-var-update", new String[] { "1" }, new String[] { name }); //$NON-NLS-1$//$NON-NLS-2$
|
||||
super(dmc, "-var-update", new String[] { "1", name }); //$NON-NLS-1$//$NON-NLS-2$
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
Loading…
Add table
Reference in a new issue