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/gdb/launching/FinalLaunchSequence.java (-1 / +5 lines)
Lines 25-30 Link Here
25
import org.eclipse.cdt.dsf.datamodel.DataModelInitializedEvent;
25
import org.eclipse.cdt.dsf.datamodel.DataModelInitializedEvent;
26
import org.eclipse.cdt.dsf.datamodel.IDMContext;
26
import org.eclipse.cdt.dsf.datamodel.IDMContext;
27
import org.eclipse.cdt.dsf.debug.service.IBreakpoints.IBreakpointsTargetDMContext;
27
import org.eclipse.cdt.dsf.debug.service.IBreakpoints.IBreakpointsTargetDMContext;
28
import org.eclipse.cdt.dsf.debug.service.IProcesses.IProcessDMContext;
28
import org.eclipse.cdt.dsf.debug.service.ISourceLookup.ISourceLookupDMContext;
29
import org.eclipse.cdt.dsf.debug.service.ISourceLookup.ISourceLookupDMContext;
29
import org.eclipse.cdt.dsf.gdb.IGDBLaunchConfigurationConstants;
30
import org.eclipse.cdt.dsf.gdb.IGDBLaunchConfigurationConstants;
30
import org.eclipse.cdt.dsf.gdb.actions.IConnect;
31
import org.eclipse.cdt.dsf.gdb.actions.IConnect;
Lines 35-40 Link Here
35
import org.eclipse.cdt.dsf.gdb.service.SessionType;
36
import org.eclipse.cdt.dsf.gdb.service.SessionType;
36
import org.eclipse.cdt.dsf.gdb.service.command.IGDBControl;
37
import org.eclipse.cdt.dsf.gdb.service.command.IGDBControl;
37
import org.eclipse.cdt.dsf.mi.service.CSourceLookup;
38
import org.eclipse.cdt.dsf.mi.service.CSourceLookup;
39
import org.eclipse.cdt.dsf.mi.service.IMIContainerDMContext;
38
import org.eclipse.cdt.dsf.mi.service.IMIProcesses;
40
import org.eclipse.cdt.dsf.mi.service.IMIProcesses;
39
import org.eclipse.cdt.dsf.mi.service.MIBreakpointsManager;
41
import org.eclipse.cdt.dsf.mi.service.MIBreakpointsManager;
40
import org.eclipse.cdt.dsf.mi.service.command.CommandFactory;
42
import org.eclipse.cdt.dsf.mi.service.command.CommandFactory;
Lines 256-264 Link Here
256
		}
258
		}
257
259
258
		final IPath execPath = fGDBBackend.getProgramPath();
260
		final IPath execPath = fGDBBackend.getProgramPath();
261
		final IProcessDMContext procCtx = fProcService.createProcessContext(fCommandControl.getContext(), null);
262
		final IMIContainerDMContext containerCtx = fProcService.createContainerContext(procCtx, null);
259
		if (!noFileCommand && execPath != null && !execPath.isEmpty()) {
263
		if (!noFileCommand && execPath != null && !execPath.isEmpty()) {
260
			fCommandControl.queueCommand(
264
			fCommandControl.queueCommand(
261
					fCommandFactory.createMIFileExecAndSymbols(fCommandControl.getContext(), 
265
					fCommandFactory.createMIFileExecAndSymbols(containerCtx, 
262
							execPath.toPortableString()), 
266
							execPath.toPortableString()), 
263
							new DataRequestMonitor<MIInfo>(getExecutor(), requestMonitor));
267
							new DataRequestMonitor<MIInfo>(getExecutor(), requestMonitor));
264
		} else {
268
		} else {
(-)src/org/eclipse/cdt/dsf/gdb/service/GDBProcesses_7_0.java (-2 / +8 lines)
Lines 663-669 Link Here
663
    	rm.done();
663
    	rm.done();
664
    }
664
    }
665
    
665
    
666
    private boolean doIsDebuggerAttachSupported() {
666
    /**
667
	 * @since 4.0
668
	 */
669
    protected boolean doIsDebuggerAttachSupported() {
667
    	IGDBBackend backend = getServicesTracker().getService(IGDBBackend.class);
670
    	IGDBBackend backend = getServicesTracker().getService(IGDBBackend.class);
668
    	if (backend != null) {
671
    	if (backend != null) {
669
    		return backend.getIsAttachSession();
672
    		return backend.getIsAttachSession();
Lines 703-709 Link Here
703
	    }
706
	    }
704
	}
707
	}
705
708
706
    private boolean doCanDetachDebuggerFromProcess() {
709
    /**
710
	 * @since 4.0
711
	 */
712
    protected boolean doCanDetachDebuggerFromProcess() {
707
    	IGDBBackend backend = getServicesTracker().getService(IGDBBackend.class);
713
    	IGDBBackend backend = getServicesTracker().getService(IGDBBackend.class);
708
    	if (backend != null) {
714
    	if (backend != null) {
709
    		return backend.getIsAttachSession() && fCommandControl.isConnected();
715
    		return backend.getIsAttachSession() && fCommandControl.isConnected();
(-)src/org/eclipse/cdt/dsf/gdb/service/GDBProcesses_7_2.java (+132 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
package org.eclipse.cdt.dsf.gdb.service;
12
13
import org.eclipse.cdt.dsf.concurrent.DataRequestMonitor;
14
import org.eclipse.cdt.dsf.concurrent.RequestMonitor;
15
import org.eclipse.cdt.dsf.datamodel.DMContexts;
16
import org.eclipse.cdt.dsf.datamodel.IDMContext;
17
import org.eclipse.cdt.dsf.debug.service.command.ICommandControlService.ICommandControlDMContext;
18
import org.eclipse.cdt.dsf.gdb.internal.GdbPlugin;
19
import org.eclipse.cdt.dsf.gdb.service.command.IGDBControl;
20
import org.eclipse.cdt.dsf.mi.service.IMICommandControl;
21
import org.eclipse.cdt.dsf.mi.service.IMIContainerDMContext;
22
import org.eclipse.cdt.dsf.mi.service.IMIProcessDMContext;
23
import org.eclipse.cdt.dsf.mi.service.command.CommandFactory;
24
import org.eclipse.cdt.dsf.mi.service.command.output.MIAddInferiorInfo;
25
import org.eclipse.cdt.dsf.mi.service.command.output.MIInfo;
26
import org.eclipse.cdt.dsf.service.DsfSession;
27
import org.eclipse.core.runtime.IStatus;
28
import org.eclipse.core.runtime.Status;
29
30
/**
31
 * @since 4.0
32
 */
33
public class GDBProcesses_7_2 extends GDBProcesses_7_1 {
34
35
    private CommandFactory fCommandFactory;
36
    private IGDBControl fCommandControl;
37
    
38
	public GDBProcesses_7_2(DsfSession session) {
39
		super(session);
40
	}
41
42
	@Override
43
	public void initialize(final RequestMonitor requestMonitor) {
44
		super.initialize(new RequestMonitor(getExecutor(), requestMonitor) {
45
			@Override
46
			protected void handleSuccess() {
47
				doInitialize(requestMonitor);
48
			}
49
		});
50
	}
51
52
	/**
53
	 * This method initializes this service after our superclass's initialize()
54
	 * method succeeds.
55
	 * 
56
	 * @param requestMonitor
57
	 *            The call-back object to notify when this service's
58
	 *            initialization is done.
59
	 */
60
	private void doInitialize(RequestMonitor requestMonitor) {
61
		fCommandControl = getServicesTracker().getService(IGDBControl.class);
62
        fCommandFactory = getServicesTracker().getService(IMICommandControl.class).getCommandFactory();
63
        requestMonitor.done();
64
	}
65
66
	@Override
67
	public void shutdown(RequestMonitor requestMonitor) {
68
		super.shutdown(requestMonitor);
69
	}
70
71
	@Override
72
    public void attachDebuggerToProcess(final IProcessDMContext procCtx, final DataRequestMonitor<IDMContext> rm) {
73
		if (procCtx instanceof IMIProcessDMContext) {
74
	    	if (!doIsDebuggerAttachSupported()) {
75
	            rm.setStatus(new Status(IStatus.ERROR, GdbPlugin.PLUGIN_ID, INTERNAL_ERROR, "Attach not supported.", null)); //$NON-NLS-1$
76
	            rm.done();    		
77
	    		return;
78
	    	}
79
	    	
80
	    	ICommandControlDMContext controlDmc = DMContexts.getAncestorOfType(procCtx, ICommandControlDMContext.class);
81
	        fCommandControl.queueCommand(
82
	        		fCommandFactory.createMIAddInferior(controlDmc),
83
	        		new DataRequestMonitor<MIAddInferiorInfo>(getExecutor(), rm) {
84
	        			@Override
85
	        			protected void handleSuccess() {
86
	        				final String groupId = getData().getGroupId();
87
	        				if (groupId == null || groupId.trim().length() == 0) {
88
     				           rm.setStatus(new Status(IStatus.ERROR, GdbPlugin.PLUGIN_ID, INTERNAL_ERROR, "Invalid gdb group id.", null)); //$NON-NLS-1$
89
    				           rm.done();
90
    				           return;
91
        					}
92
	        				
93
	        				final IMIContainerDMContext containerDmc = createContainerContext(procCtx, groupId);
94
	        				fCommandControl.queueCommand(
95
	        						fCommandFactory.createMITargetAttach(containerDmc, ((IMIProcessDMContext)procCtx).getProcId()),
96
	        						new DataRequestMonitor<MIInfo>(getExecutor(), rm) {
97
	        							@Override
98
	        							protected void handleSuccess() {
99
	        								rm.setData(containerDmc);
100
	        								rm.done();
101
	        							}
102
	        						});
103
	        			}
104
	        		});
105
	    } else {
106
            rm.setStatus(new Status(IStatus.ERROR, GdbPlugin.PLUGIN_ID, INTERNAL_ERROR, "Invalid process context.", null)); //$NON-NLS-1$
107
            rm.done();
108
	    }
109
	}
110
	
111
	@Override
112
    public void detachDebuggerFromProcess(IDMContext dmc, final RequestMonitor rm) {
113
    	
114
		IMIContainerDMContext containerDmc = DMContexts.getAncestorOfType(dmc, IMIContainerDMContext.class);
115
116
    	if (containerDmc != null) {
117
        	if (!doCanDetachDebuggerFromProcess()) {
118
                rm.setStatus(new Status(IStatus.ERROR, GdbPlugin.PLUGIN_ID, INTERNAL_ERROR, "Detach not supported.", null)); //$NON-NLS-1$
119
                rm.done();
120
                return;
121
        	}
122
123
        	fCommandControl.queueCommand(
124
        			fCommandFactory.createMITargetDetach(containerDmc),
125
    				new DataRequestMonitor<MIInfo>(getExecutor(), rm));
126
    	} else {
127
            rm.setStatus(new Status(IStatus.ERROR, GdbPlugin.PLUGIN_ID, INTERNAL_ERROR, "Invalid context.", null)); //$NON-NLS-1$
128
            rm.done();
129
	    }
130
	}
131
}
132
(-)src/org/eclipse/cdt/dsf/gdb/service/GdbDebugServicesFactory.java (+3 lines)
Lines 139-144 Link Here
139
		
139
		
140
	@Override
140
	@Override
141
	protected IProcesses createProcessesService(DsfSession session) {
141
	protected IProcesses createProcessesService(DsfSession session) {
142
		if (GDB_7_2_VERSION.compareTo(fVersion) <= 0) {
143
			return new GDBProcesses_7_2(session);
144
		}
142
		if (GDB_7_1_VERSION.compareTo(fVersion) <= 0) {
145
		if (GDB_7_1_VERSION.compareTo(fVersion) <= 0) {
143
			return new GDBProcesses_7_1(session);
146
			return new GDBProcesses_7_1(session);
144
		}
147
		}
(-)src/org/eclipse/cdt/dsf/gdb/service/command/GDBControl_7_0.java (-1 / +2 lines)
Lines 125-131 Link Here
125
     * @since 3.0
125
     * @since 3.0
126
     */
126
     */
127
    public GDBControl_7_0(DsfSession session, ILaunchConfiguration config, CommandFactory factory) {
127
    public GDBControl_7_0(DsfSession session, ILaunchConfiguration config, CommandFactory factory) {
128
    	super(session, true, factory);
128
    	//super(session, true, factory);
129
    	super(session, true, true, factory);
129
    }
130
    }
130
131
131
    @Override
132
    @Override
(-)src/org/eclipse/cdt/dsf/mi/service/command/AbstractMIControl.java (-4 / +34 lines)
Lines 40-45 Link Here
40
import org.eclipse.cdt.dsf.debug.service.command.IEventListener;
40
import org.eclipse.cdt.dsf.debug.service.command.IEventListener;
41
import org.eclipse.cdt.dsf.gdb.internal.GdbPlugin;
41
import org.eclipse.cdt.dsf.gdb.internal.GdbPlugin;
42
import org.eclipse.cdt.dsf.mi.service.IMICommandControl;
42
import org.eclipse.cdt.dsf.mi.service.IMICommandControl;
43
import org.eclipse.cdt.dsf.mi.service.IMIContainerDMContext;
43
import org.eclipse.cdt.dsf.mi.service.IMIExecutionDMContext;
44
import org.eclipse.cdt.dsf.mi.service.IMIExecutionDMContext;
44
import org.eclipse.cdt.dsf.mi.service.command.commands.MICommand;
45
import org.eclipse.cdt.dsf.mi.service.command.commands.MICommand;
45
import org.eclipse.cdt.dsf.mi.service.command.commands.RawCommand;
46
import org.eclipse.cdt.dsf.mi.service.command.commands.RawCommand;
Lines 86-91 Link Here
86
    private int fCurrentStackLevel  = -1;
87
    private int fCurrentStackLevel  = -1;
87
    private String fCurrentThreadId = null;
88
    private String fCurrentThreadId = null;
88
    
89
    
90
    // boolean for --thread-group option which helps to handle multiple inferior behaviour.
91
    // Since GDB.7.1
92
    private boolean fUseThreadGroupOption;
93
    
89
    
94
    
90
    private final BlockingQueue<CommandHandle> fTxCommands = new LinkedBlockingQueue<CommandHandle>();
95
    private final BlockingQueue<CommandHandle> fTxCommands = new LinkedBlockingQueue<CommandHandle>();
91
    private final Map<Integer, CommandHandle>  fRxCommands = Collections.synchronizedMap(new HashMap<Integer, CommandHandle>());
96
    private final Map<Integer, CommandHandle>  fRxCommands = Collections.synchronizedMap(new HashMap<Integer, CommandHandle>());
Lines 139-144 Link Here
139
    }
144
    }
140
145
141
    /**
146
    /**
147
	 * @since 4.0
148
	 */
149
    public AbstractMIControl(DsfSession session, boolean useThreadGroupOption, boolean useThreadAndFrameOptions, CommandFactory factory) {
150
        super(session);
151
        fUseThreadGroupOption     = useThreadGroupOption;
152
        fUseThreadAndFrameOptions = useThreadAndFrameOptions;
153
        fCommandFactory = factory;
154
    }
155
    
156
    /**
142
     * Set the tracing stream for the MI communication.  If this method is never
157
     * Set the tracing stream for the MI communication.  If this method is never
143
     * called, tracing will be off, by default.
158
     * called, tracing will be off, by default.
144
     * 
159
     * 
Lines 510-515 Link Here
510
        	return null;
525
        	return null;
511
        } 
526
        } 
512
        
527
        
528
        public String getGroupId() {
529
        	IMIContainerDMContext containerCtx = DMContexts.getAncestorOfType(fCommand.getContext(), IMIContainerDMContext.class);
530
        	if(containerCtx != null)
531
        		return containerCtx.getGroupId();
532
        	return null;
533
        } 
534
        
513
        @Override
535
        @Override
514
        public String toString() {
536
        public String toString() {
515
            return Integer.toString(fTokenId) + fCommand;
537
            return Integer.toString(fTokenId) + fCommand;
Lines 567-577 Link Here
567
                 */
589
                 */
568
590
569
                final String str;
591
                final String str;
570
				// Not all commands support the --thread/--frame options (e.g., CLI commands)
592
                
571
                if (fUseThreadAndFrameOptions && commandHandle.getCommand().supportsThreadAndFrameOptions()) {
593
				// --thread-group support for multiple process debug
594
                if( fUseThreadGroupOption && commandHandle.getCommand().supportsThreadGroupOption() && 
595
                		fUseThreadAndFrameOptions && commandHandle.getCommand().supportsThreadAndFrameOptions() ){
596
                		// Not all commands support the --thread/--frame options (e.g., CLI commands)
597
                	str = commandHandle.getTokenId() + commandHandle.getCommand().constructCommand(commandHandle.getGroupId(),
598
	                																				   commandHandle.getThreadId(),
599
	                			                                                                       commandHandle.getStackFrameId());
600
                } else if ( fUseThreadAndFrameOptions && commandHandle.getCommand().supportsThreadAndFrameOptions() ){
601
                		
572
                	str = commandHandle.getTokenId() + commandHandle.getCommand().constructCommand(commandHandle.getThreadId(),
602
                	str = commandHandle.getTokenId() + commandHandle.getCommand().constructCommand(commandHandle.getThreadId(),
573
                			                                                                       commandHandle.getStackFrameId());
603
                            commandHandle.getStackFrameId());
574
                } else if (commandHandle.getCommand() instanceof RawCommand) {
604
                }else if (commandHandle.getCommand() instanceof RawCommand) {
575
                	// RawCommands CANNOT have a token id: GDB would read it as part of the RawCommand!
605
                	// RawCommands CANNOT have a token id: GDB would read it as part of the RawCommand!
576
                	str = commandHandle.getCommand().constructCommand();
606
                	str = commandHandle.getCommand().constructCommand();
577
                } else {
607
                } else {
(-)src/org/eclipse/cdt/dsf/mi/service/command/CommandFactory.java (-2 / +23 lines)
Lines 27-32 Link Here
27
import org.eclipse.cdt.dsf.debug.service.command.ICommand;
27
import org.eclipse.cdt.dsf.debug.service.command.ICommand;
28
import org.eclipse.cdt.dsf.debug.service.command.ICommandControlService.ICommandControlDMContext;
28
import org.eclipse.cdt.dsf.debug.service.command.ICommandControlService.ICommandControlDMContext;
29
import org.eclipse.cdt.dsf.gdb.service.IGDBTraceControl.ITraceTargetDMContext;
29
import org.eclipse.cdt.dsf.gdb.service.IGDBTraceControl.ITraceTargetDMContext;
30
import org.eclipse.cdt.dsf.mi.service.IMIContainerDMContext;
30
import org.eclipse.cdt.dsf.mi.service.IMIExecutionDMContext;
31
import org.eclipse.cdt.dsf.mi.service.IMIExecutionDMContext;
31
import org.eclipse.cdt.dsf.mi.service.command.commands.CLIAttach;
32
import org.eclipse.cdt.dsf.mi.service.command.commands.CLIAttach;
32
import org.eclipse.cdt.dsf.mi.service.command.commands.CLICatch;
33
import org.eclipse.cdt.dsf.mi.service.command.commands.CLICatch;
Lines 511-521 Link Here
511
		return new MIExecUntil(dmc, loc);
512
		return new MIExecUntil(dmc, loc);
512
	}
513
	}
513
514
514
	public ICommand<MIInfo> createMIFileExecAndSymbols(ICommandControlDMContext dmc, String file) {
515
	/**
516
	 * @since 4.0
517
	 */
518
	public ICommand<MIInfo> createMIFileExecAndSymbols(IMIContainerDMContext dmc, String file) {
515
		return new MIFileExecAndSymbols(dmc, file);
519
		return new MIFileExecAndSymbols(dmc, file);
516
	}
520
	}
517
521
518
	public ICommand<MIInfo> createMIFileExecAndSymbols(ICommandControlDMContext dmc) {
522
	/**
523
	 * @since 4.0
524
	 */
525
	public ICommand<MIInfo> createMIFileExecAndSymbols(IMIContainerDMContext dmc) {
519
		return new MIFileExecAndSymbols(dmc);
526
		return new MIFileExecAndSymbols(dmc);
520
	}
527
	}
521
528
Lines 667-676 Link Here
667
		return new MITargetAttach(ctx, groupId);
674
		return new MITargetAttach(ctx, groupId);
668
	}
675
	}
669
676
677
	/**
678
	 * @since 4.0
679
	 */
680
	public ICommand<MIInfo> createMITargetAttach(IMIContainerDMContext ctx, String groupId) {
681
		return new MITargetAttach(ctx, groupId);
682
	}
683
670
	public ICommand<MIInfo> createMITargetDetach(ICommandControlDMContext ctx, String groupId) {
684
	public ICommand<MIInfo> createMITargetDetach(ICommandControlDMContext ctx, String groupId) {
671
		return new MITargetDetach(ctx, groupId);
685
		return new MITargetDetach(ctx, groupId);
672
	}
686
	}
673
687
688
	/**
689
	 * @since 4.0
690
	 */
691
	public ICommand<MIInfo> createMITargetDetach(IMIContainerDMContext ctx) {
692
		return new MITargetDetach(ctx);
693
	}
694
674
    public ICommand<MIInfo> createMITargetSelect(IDMContext ctx, String[] params) {
695
    public ICommand<MIInfo> createMITargetSelect(IDMContext ctx, String[] params) {
675
        return new MITargetSelect(ctx, params);
696
        return new MITargetSelect(ctx, params);
676
    }
697
    }
(-)src/org/eclipse/cdt/dsf/mi/service/command/commands/MICommand.java (-2 / +18 lines)
Lines 141-148 Link Here
141
     * @since 1.1
141
     * @since 1.1
142
     */
142
     */
143
    public String constructCommand(String threadId, int frameId) {
143
    public String constructCommand(String threadId, int frameId) {
144
    	return constructCommand(null, threadId, frameId);
145
    }
146
147
    /**
148
     * GDB 7.2 thread-group needed to support multiple behaviour.
149
     * @since 4.0
150
     */
151
    public String constructCommand(String groupId, String threadId, int frameId) {
144
        StringBuffer command = new StringBuffer(getOperation());
152
        StringBuffer command = new StringBuffer(getOperation());
145
        
153
      
154
        // Add the --thread-group option
155
        if (groupId != null) {
156
       		command.append(" --thread-group " + groupId); //$NON-NLS-1$
157
       	}
146
        // Add the --thread option
158
        // Add the --thread option
147
        if (threadId != null) {
159
        if (threadId != null) {
148
        	command.append(" --thread " + threadId); //$NON-NLS-1$
160
        	command.append(" --thread " + threadId); //$NON-NLS-1$
Lines 164-170 Link Here
164
        command.append('\n');
176
        command.append('\n');
165
        return command.toString();
177
        return command.toString();
166
    }
178
    }
167
    
168
//    /*
179
//    /*
169
//     * Checks to see if the current command can be coalesced with the 
180
//     * Checks to see if the current command can be coalesced with the 
170
//     * supplied command.
181
//     * supplied command.
Lines 241-246 Link Here
241
     * @since 1.1
252
     * @since 1.1
242
     */
253
     */
243
    public boolean supportsThreadAndFrameOptions() { return true; }
254
    public boolean supportsThreadAndFrameOptions() { return true; }
255
256
    /**
257
     * @since 4.0
258
     */
259
    public boolean supportsThreadGroupOption() { return false; }
244
    
260
    
245
    /**
261
    /**
246
     * Compare commands based on the MI command string that they generate, 
262
     * Compare commands based on the MI command string that they generate, 
(-)src/org/eclipse/cdt/dsf/mi/service/command/commands/MIFileExecAndSymbols.java (-5 / +12 lines)
Lines 11-17 Link Here
11
11
12
package org.eclipse.cdt.dsf.mi.service.command.commands;
12
package org.eclipse.cdt.dsf.mi.service.command.commands;
13
13
14
import org.eclipse.cdt.dsf.debug.service.command.ICommandControlService.ICommandControlDMContext;
14
import org.eclipse.cdt.dsf.mi.service.IMIContainerDMContext;
15
import org.eclipse.cdt.dsf.mi.service.command.output.MIInfo;
15
import org.eclipse.cdt.dsf.mi.service.command.output.MIInfo;
16
16
17
/**
17
/**
Lines 26-41 Link Here
26
public class MIFileExecAndSymbols extends MICommand<MIInfo>
26
public class MIFileExecAndSymbols extends MICommand<MIInfo>
27
{
27
{
28
    /**
28
    /**
29
     * @since 1.1
29
     * @since 4.0
30
     */
30
     */
31
    public MIFileExecAndSymbols(ICommandControlDMContext dmc, String file) {
31
    public MIFileExecAndSymbols(IMIContainerDMContext dmc, String file) {
32
        super(dmc, "-file-exec-and-symbols", null, new String[] {file}); //$NON-NLS-1$
32
        super(dmc, "-file-exec-and-symbols", null, new String[] {file}); //$NON-NLS-1$
33
    }
33
    }
34
   
34
   
35
    /**
35
    /**
36
     * @since 1.1
36
     * @since 4.0
37
     */
37
     */
38
    public MIFileExecAndSymbols(ICommandControlDMContext dmc) {
38
    public MIFileExecAndSymbols(IMIContainerDMContext dmc) {
39
        super(dmc, "-file-exec-and-symbols"); //$NON-NLS-1$
39
        super(dmc, "-file-exec-and-symbols"); //$NON-NLS-1$
40
    }
40
    }
41
42
    @Override
43
    public boolean supportsThreadGroupOption() {
44
    	return true;
45
    }
46
    
47
    
41
}
48
}
(-)src/org/eclipse/cdt/dsf/mi/service/command/commands/MITargetAttach.java (-1 / +19 lines)
Lines 1-5 Link Here
1
/*******************************************************************************
1
/*******************************************************************************
2
 * Copyright (c) 2008, 2009 Ericsson and others.
2
 * Copyright (c) 2008, 2010 Ericsson and others.
3
 * All rights reserved. This program and the accompanying materials
3
 * All rights reserved. This program and the accompanying materials
4
 * are made available under the terms of the Eclipse Public License v1.0
4
 * are made available under the terms of the Eclipse Public License v1.0
5
 * which accompanies this distribution, and is available at
5
 * which accompanies this distribution, and is available at
Lines 11-16 Link Here
11
package org.eclipse.cdt.dsf.mi.service.command.commands;
11
package org.eclipse.cdt.dsf.mi.service.command.commands;
12
12
13
import org.eclipse.cdt.dsf.debug.service.command.ICommandControlService.ICommandControlDMContext;
13
import org.eclipse.cdt.dsf.debug.service.command.ICommandControlService.ICommandControlDMContext;
14
import org.eclipse.cdt.dsf.mi.service.IMIContainerDMContext;
14
import org.eclipse.cdt.dsf.mi.service.command.output.MIInfo;
15
import org.eclipse.cdt.dsf.mi.service.command.output.MIInfo;
15
16
16
/**
17
/**
Lines 25-28 Link Here
25
	public MITargetAttach(ICommandControlDMContext ctx, String groupId) {
26
	public MITargetAttach(ICommandControlDMContext ctx, String groupId) {
26
		super(ctx, "-target-attach", new String[] {groupId}); //$NON-NLS-1$
27
		super(ctx, "-target-attach", new String[] {groupId}); //$NON-NLS-1$
27
	}
28
	}
29
	
30
	/**
31
	 * @since 4.0
32
	 */
33
	/*
34
	public MITargetAttach(IMIContainerDMContext ctx, String pid) {
35
		super(ctx, "-target-attach", new String[] {"--thread-group", ctx.getGroupId()}, new String[] {pid}); //$NON-NLS-1$ //$NON-NLS-2$
36
	}
37
	*/
38
	public MITargetAttach(IMIContainerDMContext ctx, String pid) {
39
		super(ctx, "-target-attach", new String[] {pid}); //$NON-NLS-1$
40
	}
41
	
42
    @Override
43
    public boolean supportsThreadGroupOption() {
44
    	return true;
45
    }
28
}
46
}
(-)src/org/eclipse/cdt/dsf/mi/service/command/commands/MITargetDetach.java (+8 lines)
Lines 11-16 Link Here
11
package org.eclipse.cdt.dsf.mi.service.command.commands;
11
package org.eclipse.cdt.dsf.mi.service.command.commands;
12
12
13
import org.eclipse.cdt.dsf.debug.service.command.ICommandControlService.ICommandControlDMContext;
13
import org.eclipse.cdt.dsf.debug.service.command.ICommandControlService.ICommandControlDMContext;
14
import org.eclipse.cdt.dsf.mi.service.IMIContainerDMContext;
14
import org.eclipse.cdt.dsf.mi.service.command.output.MIInfo;
15
import org.eclipse.cdt.dsf.mi.service.command.output.MIInfo;
15
16
16
/**
17
/**
Lines 25-28 Link Here
25
	public MITargetDetach(ICommandControlDMContext ctx, String groupId) {
26
	public MITargetDetach(ICommandControlDMContext ctx, String groupId) {
26
		super(ctx, "-target-detach", new String[] {groupId}); //$NON-NLS-1$
27
		super(ctx, "-target-detach", new String[] {groupId}); //$NON-NLS-1$
27
	}
28
	}
29
	
30
	/**
31
	* @since 4.0
32
	*/
33
	public MITargetDetach(IMIContainerDMContext ctx) {
34
		super(ctx, "-target-detach", new String[] {"--thread-group", ctx.getGroupId()}); //$NON-NLS-1$ //$NON-NLS-2$
35
	}
28
}
36
}

Return to bug 237306