Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
View | Details | Raw Unified | Return to bug 237306 | Differences between
and this patch

Collapse All | Expand All

(-)src/org/eclipse/cdt/dsf/mi/service/command/CommandFactory.java (+13 lines)
Lines 41-46 Link Here
41
import org.eclipse.cdt.dsf.mi.service.command.commands.CLIThread;
41
import org.eclipse.cdt.dsf.mi.service.command.commands.CLIThread;
42
import org.eclipse.cdt.dsf.mi.service.command.commands.CLITrace;
42
import org.eclipse.cdt.dsf.mi.service.command.commands.CLITrace;
43
import org.eclipse.cdt.dsf.mi.service.command.commands.CLIUnsetEnv;
43
import org.eclipse.cdt.dsf.mi.service.command.commands.CLIUnsetEnv;
44
import org.eclipse.cdt.dsf.mi.service.command.commands.MIAddInferior;
44
import org.eclipse.cdt.dsf.mi.service.command.commands.MIBreakAfter;
45
import org.eclipse.cdt.dsf.mi.service.command.commands.MIBreakAfter;
45
import org.eclipse.cdt.dsf.mi.service.command.commands.MIBreakCommands;
46
import org.eclipse.cdt.dsf.mi.service.command.commands.MIBreakCommands;
46
import org.eclipse.cdt.dsf.mi.service.command.commands.MIBreakCondition;
47
import org.eclipse.cdt.dsf.mi.service.command.commands.MIBreakCondition;
Lines 94-99 Link Here
94
import org.eclipse.cdt.dsf.mi.service.command.commands.MIInterpreterExec;
95
import org.eclipse.cdt.dsf.mi.service.command.commands.MIInterpreterExec;
95
import org.eclipse.cdt.dsf.mi.service.command.commands.MIInterpreterExecConsole;
96
import org.eclipse.cdt.dsf.mi.service.command.commands.MIInterpreterExecConsole;
96
import org.eclipse.cdt.dsf.mi.service.command.commands.MIListThreadGroups;
97
import org.eclipse.cdt.dsf.mi.service.command.commands.MIListThreadGroups;
98
import org.eclipse.cdt.dsf.mi.service.command.commands.MIRemoveInferior;
97
import org.eclipse.cdt.dsf.mi.service.command.commands.MIStackInfoDepth;
99
import org.eclipse.cdt.dsf.mi.service.command.commands.MIStackInfoDepth;
98
import org.eclipse.cdt.dsf.mi.service.command.commands.MIStackListArguments;
100
import org.eclipse.cdt.dsf.mi.service.command.commands.MIStackListArguments;
99
import org.eclipse.cdt.dsf.mi.service.command.commands.MIStackListFrames;
101
import org.eclipse.cdt.dsf.mi.service.command.commands.MIStackListFrames;
Lines 136-141 Link Here
136
import org.eclipse.cdt.dsf.mi.service.command.output.CLIInfoThreadsInfo;
138
import org.eclipse.cdt.dsf.mi.service.command.output.CLIInfoThreadsInfo;
137
import org.eclipse.cdt.dsf.mi.service.command.output.CLIThreadInfo;
139
import org.eclipse.cdt.dsf.mi.service.command.output.CLIThreadInfo;
138
import org.eclipse.cdt.dsf.mi.service.command.output.CLITraceInfo;
140
import org.eclipse.cdt.dsf.mi.service.command.output.CLITraceInfo;
141
import org.eclipse.cdt.dsf.mi.service.command.output.MIAddInferiorInfo;
139
import org.eclipse.cdt.dsf.mi.service.command.output.MIBreakInsertInfo;
142
import org.eclipse.cdt.dsf.mi.service.command.output.MIBreakInsertInfo;
140
import org.eclipse.cdt.dsf.mi.service.command.output.MIBreakListInfo;
143
import org.eclipse.cdt.dsf.mi.service.command.output.MIBreakListInfo;
141
import org.eclipse.cdt.dsf.mi.service.command.output.MIDataDisassembleInfo;
144
import org.eclipse.cdt.dsf.mi.service.command.output.MIDataDisassembleInfo;
Lines 252-257 Link Here
252
		return new CLIUnsetEnv(ctx, name);
255
		return new CLIUnsetEnv(ctx, name);
253
	}
256
	}
254
257
258
	/** @since 4.0 */
259
	public ICommand<MIAddInferiorInfo> createMIAddInferior(ICommandControlDMContext ctx) {
260
		return new MIAddInferior(ctx);
261
	}
262
	
255
	public ICommand<MIInfo> createMIBreakAfter(IBreakpointsTargetDMContext ctx, int breakpoint, int ignoreCount) {
263
	public ICommand<MIInfo> createMIBreakAfter(IBreakpointsTargetDMContext ctx, int breakpoint, int ignoreCount) {
256
		return new MIBreakAfter(ctx, breakpoint, ignoreCount);
264
		return new MIBreakAfter(ctx, breakpoint, ignoreCount);
257
	}
265
	}
Lines 592-597 Link Here
592
		return new MIListThreadGroups(ctx, listAll);
600
		return new MIListThreadGroups(ctx, listAll);
593
	}
601
	}
594
602
603
	/** @since 4.0 */
604
	public ICommand<MIInfo> createMIRemoveInferior(ICommandControlDMContext ctx, String groupId) {
605
		return new MIRemoveInferior(ctx, groupId);
606
	}
607
595
	public ICommand<MIStackInfoDepthInfo> createMIStackInfoDepth(IMIExecutionDMContext ctx) {
608
	public ICommand<MIStackInfoDepthInfo> createMIStackInfoDepth(IMIExecutionDMContext ctx) {
596
		return new MIStackInfoDepth(ctx);
609
		return new MIStackInfoDepth(ctx);
597
	}
610
	}
(-)src/org/eclipse/cdt/dsf/mi/service/command/commands/MIAddInferior.java (+40 lines)
Added Link Here
1
/*******************************************************************************
2
 * Copyright (c) 2010 Ericsson and others.
3
 * All rights reserved. This program and the accompanying materials
4
 * are made available under the terms of the Eclipse Public License v1.0
5
 * which accompanies this distribution, and is available at
6
 * http://www.eclipse.org/legal/epl-v10.html
7
 *
8
 * Contributors:
9
 *     Ericsson - Initial API and implementation
10
 *******************************************************************************/
11
12
package org.eclipse.cdt.dsf.mi.service.command.commands;
13
14
import org.eclipse.cdt.dsf.debug.service.command.ICommandControlService.ICommandControlDMContext;
15
import org.eclipse.cdt.dsf.mi.service.command.output.MIAddInferiorInfo;
16
import org.eclipse.cdt.dsf.mi.service.command.output.MIOutput;
17
18
19
/**	
20
 *   -add-inferior
21
 *   ^done,inferior="i2"
22
 *   
23
 *   Creates a new inferior. The created inferior is not associated with any executable. 
24
 *   Such association may be established with the '-file-exec-and-symbols' command.
25
 *   The command response has a single field, 'thread-group', whose value is the 
26
 *   identifier of the thread group corresponding to the new inferior.
27
 *   
28
 *   @since 4.0
29
 */
30
public class MIAddInferior extends MICommand<MIAddInferiorInfo>
31
{
32
    public MIAddInferior(ICommandControlDMContext dmc) {
33
        super(dmc, "-add-inferior"); //$NON-NLS-1$
34
    }
35
    
36
    @Override
37
    public MIAddInferiorInfo getResult(MIOutput output) {
38
        return new MIAddInferiorInfo(output);
39
    }
40
}
(-)src/org/eclipse/cdt/dsf/mi/service/command/commands/MIRemoveInferior.java (+30 lines)
Added Link Here
1
/*******************************************************************************
2
 * Copyright (c) 2010 Ericsson and others.
3
 * All rights reserved. This program and the accompanying materials
4
 * are made available under the terms of the Eclipse Public License v1.0
5
 * which accompanies this distribution, and is available at
6
 * http://www.eclipse.org/legal/epl-v10.html
7
 *
8
 * Contributors:
9
 *     Ericsson - Initial API and implementation
10
 *******************************************************************************/
11
12
package org.eclipse.cdt.dsf.mi.service.command.commands;
13
14
import org.eclipse.cdt.dsf.debug.service.command.ICommandControlService.ICommandControlDMContext;
15
import org.eclipse.cdt.dsf.mi.service.command.output.MIInfo;
16
17
/**	
18
 *   -remove-inferior GROUPID
19
 *   ^done
20
 *   
21
 *   Remove the specified inferior.
22
 *   
23
 *   @since 4.0
24
 */
25
public class MIRemoveInferior extends MICommand<MIInfo>
26
{
27
    public MIRemoveInferior(ICommandControlDMContext dmc, String groupId) {
28
        super(dmc, "-remove-inferior", new String[] { groupId }); //$NON-NLS-1$
29
    }
30
}
(-)src/org/eclipse/cdt/dsf/mi/service/command/output/MIAddInferiorInfo.java (+50 lines)
Added Link Here
1
/*******************************************************************************
2
 * Copyright (c) 2010 Ericsson and others.
3
 * All rights reserved. This program and the accompanying materials
4
 * are made available under the terms of the Eclipse Public License v1.0
5
 * which accompanies this distribution, and is available at
6
 * http://www.eclipse.org/legal/epl-v10.html
7
 *
8
 * Contributors:
9
 *     Ericsson - Initial API and implementation
10
 *******************************************************************************/
11
12
package org.eclipse.cdt.dsf.mi.service.command.output;
13
14
/**
15
 *   -add-inferior
16
 *   ^done,inferior="i2"
17
 *   
18
 *   @since 4.0
19
 */
20
public class MIAddInferiorInfo extends MIInfo {
21
22
    private String fGroupId;
23
24
    public MIAddInferiorInfo(MIOutput record) {
25
        super(record);
26
        if (isDone()) {
27
            MIOutput out = getMIOutput();
28
            MIResultRecord rr = out.getMIResultRecord();
29
            if (rr != null) {
30
                MIResult[] results =  rr.getMIResults();
31
                for (int i = 0; i < results.length; i++) {
32
                    String var = results[i].getVariable();
33
                    MIValue resultVal = results[i].getMIValue();
34
                    String str = ""; //$NON-NLS-1$
35
                    if (resultVal instanceof MIConst) {
36
                        str = ((MIConst)resultVal).getString();
37
                    }
38
39
                    if (var.equals("inferior")) { //$NON-NLS-1$
40
                    	fGroupId = str;
41
                    }
42
                }
43
            }
44
        }
45
    }
46
    
47
    public String getGroupId() {
48
    	return fGroupId;
49
    }
50
}

Return to bug 237306