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/debug/service/IBreakpoints.java (-1 / +2 lines)
Lines 20-25 Link Here
20
import org.eclipse.cdt.dsf.datamodel.IDMContext;
20
import org.eclipse.cdt.dsf.datamodel.IDMContext;
21
import org.eclipse.cdt.dsf.datamodel.IDMData;
21
import org.eclipse.cdt.dsf.datamodel.IDMData;
22
import org.eclipse.cdt.dsf.datamodel.IDMEvent;
22
import org.eclipse.cdt.dsf.datamodel.IDMEvent;
23
import org.eclipse.cdt.dsf.debug.service.IRunControl.IContainerDMContext;
23
import org.eclipse.cdt.dsf.service.IDsfService;
24
import org.eclipse.cdt.dsf.service.IDsfService;
24
25
25
/**
26
/**
Lines 33-39 Link Here
33
    /**
34
    /**
34
     * Marker interface for a context for which breakpoints can be installed
35
     * Marker interface for a context for which breakpoints can be installed
35
     */
36
     */
36
    public interface IBreakpointsTargetDMContext extends IDMContext {}
37
    public interface IBreakpointsTargetDMContext extends IContainerDMContext {}
37
    
38
    
38
    /**
39
    /**
39
     * Specific breakpoint context
40
     * Specific breakpoint context
(-)src/org/eclipse/cdt/dsf/gdb/launching/FinalLaunchSequence.java (-3 / +12 lines)
Lines 26-31 Link Here
26
import org.eclipse.cdt.dsf.datamodel.DataModelInitializedEvent;
26
import org.eclipse.cdt.dsf.datamodel.DataModelInitializedEvent;
27
import org.eclipse.cdt.dsf.datamodel.IDMContext;
27
import org.eclipse.cdt.dsf.datamodel.IDMContext;
28
import org.eclipse.cdt.dsf.debug.service.IBreakpoints.IBreakpointsTargetDMContext;
28
import org.eclipse.cdt.dsf.debug.service.IBreakpoints.IBreakpointsTargetDMContext;
29
import org.eclipse.cdt.dsf.debug.service.IProcesses.IProcessDMContext;
29
import org.eclipse.cdt.dsf.debug.service.ISourceLookup.ISourceLookupDMContext;
30
import org.eclipse.cdt.dsf.debug.service.ISourceLookup.ISourceLookupDMContext;
30
import org.eclipse.cdt.dsf.gdb.IGDBLaunchConfigurationConstants;
31
import org.eclipse.cdt.dsf.gdb.IGDBLaunchConfigurationConstants;
31
import org.eclipse.cdt.dsf.gdb.IGdbDebugPreferenceConstants;
32
import org.eclipse.cdt.dsf.gdb.IGdbDebugPreferenceConstants;
Lines 37-42 Link Here
37
import org.eclipse.cdt.dsf.gdb.service.SessionType;
38
import org.eclipse.cdt.dsf.gdb.service.SessionType;
38
import org.eclipse.cdt.dsf.gdb.service.command.IGDBControl;
39
import org.eclipse.cdt.dsf.gdb.service.command.IGDBControl;
39
import org.eclipse.cdt.dsf.mi.service.CSourceLookup;
40
import org.eclipse.cdt.dsf.mi.service.CSourceLookup;
41
import org.eclipse.cdt.dsf.mi.service.IMIContainerDMContext;
40
import org.eclipse.cdt.dsf.mi.service.IMIProcesses;
42
import org.eclipse.cdt.dsf.mi.service.IMIProcesses;
41
import org.eclipse.cdt.dsf.mi.service.MIBreakpointsManager;
43
import org.eclipse.cdt.dsf.mi.service.MIBreakpointsManager;
42
import org.eclipse.cdt.dsf.mi.service.command.CommandFactory;
44
import org.eclipse.cdt.dsf.mi.service.command.CommandFactory;
Lines 64-70 Link Here
64
	private CommandFactory fCommandFactory;
66
	private CommandFactory fCommandFactory;
65
67
66
	private DsfServicesTracker fTracker;
68
	private DsfServicesTracker fTracker;
67
69
	private IMIContainerDMContext fInitialContainerCtx;
70
	
68
	public FinalLaunchSequence(DsfExecutor executor, GdbLaunch launch, SessionType sessionType, boolean attach, IProgressMonitor pm) {
71
	public FinalLaunchSequence(DsfExecutor executor, GdbLaunch launch, SessionType sessionType, boolean attach, IProgressMonitor pm) {
69
		super(executor, pm, LaunchMessages.getString("FinalLaunchSequence.0"), LaunchMessages.getString("FinalLaunchSequence.1"));     //$NON-NLS-1$ //$NON-NLS-2$
72
		super(executor, pm, LaunchMessages.getString("FinalLaunchSequence.0"), LaunchMessages.getString("FinalLaunchSequence.1"));     //$NON-NLS-1$ //$NON-NLS-2$
70
		fLaunch = launch;
73
		fLaunch = launch;
Lines 131-136 Link Here
131
			return;
134
			return;
132
		}
135
		}
133
136
137
        // We can cheat a little.  Since we know GDB starts off focused on the one
138
		// groupId it automatically created, we can simply create a container with the 'null'
139
		// groupId, which will get ignored and will use the process currently in focus.
140
		IProcessDMContext procCtx = fProcService.createProcessContext(fCommandControl.getContext(), null);
141
		fInitialContainerCtx = fProcService.createContainerContext(procCtx, null);
142
		
134
		requestMonitor.done();
143
		requestMonitor.done();
135
	}
144
	}
136
145
Lines 285-291 Link Here
285
		final IPath execPath = fGDBBackend.getProgramPath();
294
		final IPath execPath = fGDBBackend.getProgramPath();
286
		if (!noFileCommand && execPath != null && !execPath.isEmpty()) {
295
		if (!noFileCommand && execPath != null && !execPath.isEmpty()) {
287
			fCommandControl.queueCommand(
296
			fCommandControl.queueCommand(
288
					fCommandFactory.createMIFileExecAndSymbols(fCommandControl.getContext(), 
297
					fCommandFactory.createMIFileExecAndSymbols(fInitialContainerCtx, 
289
							execPath.toPortableString()), 
298
							execPath.toPortableString()), 
290
							new DataRequestMonitor<MIInfo>(getExecutor(), requestMonitor));
299
							new DataRequestMonitor<MIInfo>(getExecutor(), requestMonitor));
291
		} else {
300
		} else {
Lines 670-676 Link Here
670
	public void stepStartTrackingBreakpoints(final RequestMonitor requestMonitor) {
679
	public void stepStartTrackingBreakpoints(final RequestMonitor requestMonitor) {
671
		if (fSessionType != SessionType.CORE) {
680
		if (fSessionType != SessionType.CORE) {
672
			MIBreakpointsManager bpmService = fTracker.getService(MIBreakpointsManager.class);
681
			MIBreakpointsManager bpmService = fTracker.getService(MIBreakpointsManager.class);
673
			IBreakpointsTargetDMContext breakpointDmc = (IBreakpointsTargetDMContext)fCommandControl.getContext();
682
			IBreakpointsTargetDMContext breakpointDmc = fInitialContainerCtx;
674
683
675
			bpmService.startTrackingBreakpoints(breakpointDmc, requestMonitor);
684
			bpmService.startTrackingBreakpoints(breakpointDmc, requestMonitor);
676
		} else {
685
		} else {
(-)src/org/eclipse/cdt/dsf/gdb/service/GDBProcesses_7_0.java (-19 / +39 lines)
Lines 28-33 Link Here
28
import org.eclipse.cdt.dsf.datamodel.AbstractDMEvent;
28
import org.eclipse.cdt.dsf.datamodel.AbstractDMEvent;
29
import org.eclipse.cdt.dsf.datamodel.DMContexts;
29
import org.eclipse.cdt.dsf.datamodel.DMContexts;
30
import org.eclipse.cdt.dsf.datamodel.IDMContext;
30
import org.eclipse.cdt.dsf.datamodel.IDMContext;
31
import org.eclipse.cdt.dsf.debug.service.IBreakpoints.IBreakpointsTargetDMContext;
31
import org.eclipse.cdt.dsf.debug.service.ICachingService;
32
import org.eclipse.cdt.dsf.debug.service.ICachingService;
32
import org.eclipse.cdt.dsf.debug.service.IMemory.IMemoryDMContext;
33
import org.eclipse.cdt.dsf.debug.service.IMemory.IMemoryDMContext;
33
import org.eclipse.cdt.dsf.debug.service.IProcesses;
34
import org.eclipse.cdt.dsf.debug.service.IProcesses;
Lines 164-175 Link Here
164
	 */
165
	 */
165
    @Immutable
166
    @Immutable
166
	private static class MIContainerDMC extends AbstractDMContext
167
	private static class MIContainerDMC extends AbstractDMContext
167
	implements IMIContainerDMContext
168
	implements IMIContainerDMContext,IBreakpointsTargetDMContext
168
	{
169
	{
169
		/**
170
		/**
170
		 * String ID that is used to identify the thread group in the GDB/MI protocol.
171
		 * String ID that is used to identify the thread group in the GDB/MI protocol.
171
		 */
172
		 */
172
		private final String fId;
173
		private String fId;
173
174
174
		/**
175
		/**
175
		 * Constructor for the context.  It should not be called directly by clients.
176
		 * Constructor for the context.  It should not be called directly by clients.
Lines 201-206 Link Here
201
202
202
		@Override
203
		@Override
203
		public int hashCode() { return baseHashCode() ^ (fId == null ? 0 : fId.hashCode()); }
204
		public int hashCode() { return baseHashCode() ^ (fId == null ? 0 : fId.hashCode()); }
205
206
		public void setGroupId(String gId) {
207
			fId = gId;
208
			
209
		}
204
	}
210
	}
205
211
206
	private class GDBContainerDMC extends MIContainerDMC 
212
	private class GDBContainerDMC extends MIContainerDMC 
Lines 592-613 Link Here
592
    	return createContainerContext(processDmc, groupId);
598
    	return createContainerContext(processDmc, groupId);
593
    }
599
    }
594
    
600
    
595
    public IMIExecutionDMContext[] getExecutionContexts(IMIContainerDMContext containerDmc) {
601
    
596
    	String groupId = containerDmc.getGroupId();
602
    public IDMContext[] getExecutionContexts(IMIContainerDMContext containerDmc) {
597
    	List<IMIExecutionDMContext> execDmcList = new ArrayList<IMIExecutionDMContext>(); 
603
    	if ( containerDmc != null) {
598
    	Iterator<Map.Entry<String, String>> iterator = getThreadToGroupMap().entrySet().iterator();
604
	    	String groupId = containerDmc.getGroupId();
599
    	while (iterator.hasNext()){
605
	    	List<IMIExecutionDMContext> execDmcList = new ArrayList<IMIExecutionDMContext>(); 
600
    		Map.Entry<String, String> entry = iterator.next();
606
	    	Iterator<Map.Entry<String, String>> iterator = fThreadToGroupMap.entrySet().iterator();
601
    		if (entry.getValue().equals(groupId)) {
607
	    	while (iterator.hasNext()){
602
    			String threadId = entry.getKey();
608
	    		Map.Entry<String, String> entry = iterator.next();
603
    			IProcessDMContext procDmc = DMContexts.getAncestorOfType(containerDmc, IProcessDMContext.class);
609
	    		if (entry.getValue().equals(groupId)) {
604
    			IMIExecutionDMContext execDmc = createExecutionContext(containerDmc, 
610
	    			String threadId = entry.getKey();
605
    																   createThreadContext(procDmc, threadId),
611
	    			IProcessDMContext procDmc = DMContexts.getAncestorOfType(containerDmc, IProcessDMContext.class);
606
    																   threadId);
612
	    			IMIExecutionDMContext execDmc = createExecutionContext(containerDmc, 
607
    			execDmcList.add(execDmc);
613
	    																   createThreadContext(procDmc, threadId),
608
    		}
614
	    																   threadId);
615
	    			execDmcList.add(execDmc);
616
	    		}
617
	    	}
618
	    	return execDmcList.toArray(new IDMContext[0]);
619
    	}else{ // containerDmc null , return all group information.
620
    		List<IMIContainerDMContext> containerDmcList = new ArrayList<IMIContainerDMContext>(); 
621
	    	Iterator<Map.Entry<String, String>> iterator = fThreadToGroupMap.entrySet().iterator();
622
	    	while (iterator.hasNext()){
623
	    		Map.Entry<String, String> entry = iterator.next();
624
	    		IMIContainerDMContext conDmc = createContainerContextFromGroupId(fCommandControl.getContext(), entry.getValue());
625
	    		containerDmcList.add(conDmc);
626
	    	}
627
	    	return containerDmcList.toArray(new IDMContext[0]);
609
    	}
628
    	}
610
    	return execDmcList.toArray(new IMIExecutionDMContext[0]);
611
    }
629
    }
612
630
613
	public void getExecutionData(IThreadDMContext dmc, final DataRequestMonitor<IThreadDMData> rm) {
631
	public void getExecutionData(IThreadDMContext dmc, final DataRequestMonitor<IThreadDMData> rm) {
Lines 689-695 Link Here
689
    	rm.done();
707
    	rm.done();
690
    }
708
    }
691
    
709
    
692
    private boolean doIsDebuggerAttachSupported() {
710
    /** @since 4.0 */
711
    protected boolean doIsDebuggerAttachSupported() {
693
    	IGDBBackend backend = getServicesTracker().getService(IGDBBackend.class);
712
    	IGDBBackend backend = getServicesTracker().getService(IGDBBackend.class);
694
    	if (backend != null) {
713
    	if (backend != null) {
695
    		return backend.getIsAttachSession();
714
    		return backend.getIsAttachSession();
Lines 728-734 Link Here
728
	    }
747
	    }
729
	}
748
	}
730
749
731
    private boolean doCanDetachDebuggerFromProcess() {
750
    /** @since 4.0 */
751
    protected boolean doCanDetachDebuggerFromProcess() {
732
    	IGDBBackend backend = getServicesTracker().getService(IGDBBackend.class);
752
    	IGDBBackend backend = getServicesTracker().getService(IGDBBackend.class);
733
    	if (backend != null) {
753
    	if (backend != null) {
734
    		return backend.getIsAttachSession() && fCommandControl.isConnected();
754
    		return backend.getIsAttachSession() && fCommandControl.isConnected();
(-)src/org/eclipse/cdt/dsf/gdb/service/IGDBProcesses.java (-2 / +2 lines)
Lines 11-18 Link Here
11
 *******************************************************************************/
11
 *******************************************************************************/
12
package org.eclipse.cdt.dsf.gdb.service;
12
package org.eclipse.cdt.dsf.gdb.service;
13
13
14
import org.eclipse.cdt.dsf.datamodel.IDMContext;
14
import org.eclipse.cdt.dsf.mi.service.IMIContainerDMContext;
15
import org.eclipse.cdt.dsf.mi.service.IMIContainerDMContext;
15
import org.eclipse.cdt.dsf.mi.service.IMIExecutionDMContext;
16
import org.eclipse.cdt.dsf.mi.service.IMIProcesses;
16
import org.eclipse.cdt.dsf.mi.service.IMIProcesses;
17
17
18
public interface IGDBProcesses extends IMIProcesses {
18
public interface IGDBProcesses extends IMIProcesses {
Lines 49-54 Link Here
49
     *
49
     *
50
     * @param containerDmc The container for which we want to get the execution contexts
50
     * @param containerDmc The container for which we want to get the execution contexts
51
     */
51
     */
52
    IMIExecutionDMContext[] getExecutionContexts(IMIContainerDMContext containerDmc);
52
    IDMContext[] getExecutionContexts(IMIContainerDMContext containerDmc);
53
53
54
}
54
}
(-)src/org/eclipse/cdt/dsf/mi/service/IMIContainerDMContext.java (-1 / +2 lines)
Lines 10-15 Link Here
10
 *******************************************************************************/
10
 *******************************************************************************/
11
package org.eclipse.cdt.dsf.mi.service;
11
package org.eclipse.cdt.dsf.mi.service;
12
12
13
import org.eclipse.cdt.dsf.debug.service.IBreakpoints.IBreakpointsTargetDMContext;
13
import org.eclipse.cdt.dsf.debug.service.IRunControl.IContainerDMContext;
14
import org.eclipse.cdt.dsf.debug.service.IRunControl.IContainerDMContext;
14
15
15
/**
16
/**
Lines 18-24 Link Here
18
 * identifier.  These thread groups are the basis for this context.
19
 * identifier.  These thread groups are the basis for this context.
19
 * @since 1.1
20
 * @since 1.1
20
 */
21
 */
21
public interface IMIContainerDMContext extends IContainerDMContext 
22
public interface IMIContainerDMContext extends IContainerDMContext , IBreakpointsTargetDMContext
22
{
23
{
23
    /**
24
    /**
24
     * Returns the GDB/MI thread group identifier of this context.
25
     * Returns the GDB/MI thread group identifier of this context.
(-)src/org/eclipse/cdt/dsf/mi/service/MIBreakpointsManager.java (-64 / +79 lines)
Lines 55-60 Link Here
55
import org.eclipse.cdt.dsf.debug.service.command.ICommandControl;
55
import org.eclipse.cdt.dsf.debug.service.command.ICommandControl;
56
import org.eclipse.cdt.dsf.debug.service.command.ICommandControlService.ICommandControlShutdownDMEvent;
56
import org.eclipse.cdt.dsf.debug.service.command.ICommandControlService.ICommandControlShutdownDMEvent;
57
import org.eclipse.cdt.dsf.gdb.internal.GdbPlugin;
57
import org.eclipse.cdt.dsf.gdb.internal.GdbPlugin;
58
import org.eclipse.cdt.dsf.gdb.service.IGDBProcesses;
58
import org.eclipse.cdt.dsf.mi.service.MIBreakpoints.BreakpointAddedEvent;
59
import org.eclipse.cdt.dsf.mi.service.MIBreakpoints.BreakpointAddedEvent;
59
import org.eclipse.cdt.dsf.mi.service.MIBreakpoints.BreakpointRemovedEvent;
60
import org.eclipse.cdt.dsf.mi.service.MIBreakpoints.BreakpointRemovedEvent;
60
import org.eclipse.cdt.dsf.mi.service.MIBreakpoints.BreakpointUpdatedEvent;
61
import org.eclipse.cdt.dsf.mi.service.MIBreakpoints.BreakpointUpdatedEvent;
Lines 113-118 Link Here
113
    IBreakpoints       fBreakpoints;
114
    IBreakpoints       fBreakpoints;
114
    IBreakpointManager fBreakpointManager;  // Platform breakpoint manager (not this!)
115
    IBreakpointManager fBreakpointManager;  // Platform breakpoint manager (not this!)
115
    BreakpointActionManager fBreakpointActionManager;
116
    BreakpointActionManager fBreakpointActionManager;
117
    IGDBProcesses fProcService;
116
    
118
    
117
    ///////////////////////////////////////////////////////////////////////////
119
    ///////////////////////////////////////////////////////////////////////////
118
    // Breakpoints tracking
120
    // Breakpoints tracking
Lines 122-128 Link Here
122
    
124
    
123
    // Holds the set of platform breakpoints with their corresponding back-end
125
    // Holds the set of platform breakpoints with their corresponding back-end
124
    // breakpoint attributes, per context (i.e. each platform breakpoint is
126
    // breakpoint attributes, per context (i.e. each platform breakpoint is
125
    // replicated for each execution context).
127
    // replicated import org.eclipse.cdt.dsf.debug.service.IBreakpoints.IBreakpointDMContext;for each execution context).
126
    // - Context entry added/removed on start/stopTrackingBreakpoints()
128
    // - Context entry added/removed on start/stopTrackingBreakpoints()
127
    // - Augmented on breakpointAdded()
129
    // - Augmented on breakpointAdded()
128
    // - Modified on breakpointChanged()
130
    // - Modified on breakpointChanged()
Lines 244-249 Link Here
244
        fBreakpoints    = getServicesTracker().getService(IBreakpoints.class);
246
        fBreakpoints    = getServicesTracker().getService(IBreakpoints.class);
245
        fBreakpointManager = DebugPlugin.getDefault().getBreakpointManager();
247
        fBreakpointManager = DebugPlugin.getDefault().getBreakpointManager();
246
        fBreakpointActionManager = CDebugCorePlugin.getDefault().getBreakpointActionManager();
248
        fBreakpointActionManager = CDebugCorePlugin.getDefault().getBreakpointActionManager();
249
        fProcService = getServicesTracker().getService(IGDBProcesses.class);
247
250
248
        // Register to the useful events
251
        // Register to the useful events
249
        getSession().addServiceEventListener(this, null);
252
        getSession().addServiceEventListener(this, null);
Lines 547-552 Link Here
547
        // breakpoint creation. However, it is conceivable that an enhanced Editor
550
        // breakpoint creation. However, it is conceivable that an enhanced Editor
548
        // would permit it.
551
        // would permit it.
549
        final Set<String> threads = getThreads(attributes);
552
        final Set<String> threads = getThreads(attributes);
553
        final Set<String> threadGroups = getThreadGroups();
550
554
551
        // Update the breakpoint state when all back-end breakpoints have been installed
555
        // Update the breakpoint state when all back-end breakpoints have been installed
552
        final CountingRequestMonitor installRM = new CountingRequestMonitor(getExecutor(), rm) {
556
        final CountingRequestMonitor installRM = new CountingRequestMonitor(getExecutor(), rm) {
Lines 561-629 Link Here
561
565
562
        // Install the back-end breakpoint(s)
566
        // Install the back-end breakpoint(s)
563
        for (final String thread : threads) {
567
        for (final String thread : threads) {
564
            DataRequestMonitor<IBreakpointDMContext> drm =
568
            for (final String threadgroup : threadGroups) {
565
                new DataRequestMonitor<IBreakpointDMContext>(getExecutor(), installRM) {
569
	            DataRequestMonitor<IBreakpointDMContext> drm =
566
                    @Override
570
	                new DataRequestMonitor<IBreakpointDMContext>(getExecutor(), installRM) {
567
                    protected void handleSuccess() {
571
	                    @Override
568
                        // Add the new back-end breakpoint to the map
572
	                    protected void handleSuccess() {
569
                        Vector<IBreakpointDMContext> list = breakpointIDs.get(breakpoint);
573
	                        // Add the new back-end breakpoint to the map
570
                        if (list == null)
574
	                        Vector<IBreakpointDMContext> list = breakpointIDs.get(breakpoint);
571
                            list = new Vector<IBreakpointDMContext>();
575
	                        if (list == null)
572
                        IBreakpointDMContext targetBP = getData();
576
	                            list = new Vector<IBreakpointDMContext>();
573
                        list.add(targetBP);
577
	                        IBreakpointDMContext targetBP = getData();
574
                        breakpointIDs.put(breakpoint, list);
578
	                        list.add(targetBP);
575
579
	                        breakpointIDs.put(breakpoint, list);
576
                        // Add the reverse mapping
580
	
577
                        targetBPs.put(targetBP, breakpoint);
581
	                        // Add the reverse mapping
578
582
	                        targetBPs.put(targetBP, breakpoint);
579
                        // And update the corresponding thread list
583
	
580
                        Set<String> thrds = threadsIDs.get(breakpoint);
584
	                        // And update the corresponding thread list
581
                        if (thrds == null)
585
	                        Set<String> thrds = threadsIDs.get(breakpoint);
582
                            thrds = new HashSet<String>();
586
	                        if (thrds == null)
583
                        thrds.add(thread);
587
	                            thrds = new HashSet<String>();
584
                        threadsIDs.put(breakpoint, thrds);
588
	                        thrds.add(thread);
585
589
	                        threadsIDs.put(breakpoint, thrds);
586
                        // Reset the thread (is it necessary?)
590
	
587
                        attributes.put(ATTR_THREAD_ID, NULL_STRING);
591
	                        // Reset the thread (is it necessary?)
588
592
	                        attributes.put(ATTR_THREAD_ID, NULL_STRING);
589
                        // Remove breakpoint problem marker (if any)
593
	
590
                        removeBreakpointProblemMarker(breakpoint);
594
	                        // Remove breakpoint problem marker (if any)
591
595
	                        removeBreakpointProblemMarker(breakpoint);
592
                        // Check for a pending breakpoint before showing that it was properly installed
596
	
593
                        fBreakpoints.getBreakpointDMData(targetBP, new DataRequestMonitor<IBreakpointDMData>(getExecutor(), null) {
597
	                        // Check for a pending breakpoint before showing that it was properly installed
594
                        	@Override
598
	                        fBreakpoints.getBreakpointDMData(targetBP, new DataRequestMonitor<IBreakpointDMData>(getExecutor(), null) {
595
                        	protected void handleCompleted() {
599
	                        	@Override
596
                        		boolean pending = false;
600
	                        	protected void handleCompleted() {
597
                        		if (isSuccess()) {
601
	                        		boolean pending = false;
598
                        			IBreakpointDMData data = getData();
602
	                        		if (isSuccess()) {
599
                        			if (data instanceof MIBreakpointDMData) {
603
	                        			IBreakpointDMData data = getData();
600
                        				pending = ((MIBreakpointDMData)data).isPending();
604
	                        			if (data instanceof MIBreakpointDMData) {
601
                        			}
605
	                        				pending = ((MIBreakpointDMData)data).isPending();
602
                        		}
606
	                        			}
603
                        		// Finally, update the platform breakpoint to show it was installed, unless we have a pending breakpoint
607
	                        		}
604
                        		if (!pending) {
608
	                        		// Finally, update the platform breakpoint to show it was installed, unless we have a pending breakpoint
605
                        			try {
609
	                        		if (!pending) {
606
                        				breakpoint.incrementInstallCount();
610
	                        			try {
607
                        			} catch (CoreException e) {
611
	                        				breakpoint.incrementInstallCount();
608
                        			}
612
	                        			} catch (CoreException e) {
609
                        		}
613
	                        			}
610
                        		installRM.done();                        		
614
	                        		}
611
                        	}
615
	                        		installRM.done();                        		
612
                        });
616
	                        	}
613
                    }
617
	                        });
614
618
	                    }
615
                    @Override
619
	
616
                    protected void handleError() {
620
	                    @Override
617
                    	String description = MessageFormat.format(Messages.Breakpoint_attribute_problem, new Object[] { Messages.Breakpoint_installation_failed });
621
	                    protected void handleError() {
618
                        addBreakpointProblemMarker(breakpoint, description, IMarker.SEVERITY_WARNING);
622
	                    	String description = MessageFormat.format(Messages.Breakpoint_attribute_problem, new Object[] { Messages.Breakpoint_installation_failed });
619
                        installRM.done();
623
	                        addBreakpointProblemMarker(breakpoint, description, IMarker.SEVERITY_WARNING);
620
                    }
624
	                        installRM.done();
621
                };
625
	                    }
622
626
	                };
623
            // Convert the breakpoint attributes for the back-end
627
	
624
            attributes.put(ATTR_THREAD_ID, thread);
628
	            // Convert the breakpoint attributes for the back-end
625
            Map<String,Object> targetAttributes = convertToTargetBreakpoint(breakpoint, attributes);
629
	            attributes.put(ATTR_THREAD_ID, thread);
626
            fBreakpoints.insertBreakpoint(dmc, targetAttributes, drm);
630
	            Map<String,Object> targetAttributes = convertToTargetBreakpoint(breakpoint, attributes);      
631
	            fBreakpoints.insertBreakpoint(dmc, targetAttributes, drm);
632
            }
627
        }
633
        }
628
    }
634
    }
629
635
Lines 1647-1652 Link Here
1647
        return threads;
1653
        return threads;
1648
    }
1654
    }
1649
1655
1656
    private Set<String> getThreadGroups() {
1657
    	Set<String> groupIds = new HashSet<String>();
1658
    	IDMContext[] containerList = fProcService.getExecutionContexts(null);
1659
    	for ( int i = 0 ; i < containerList.length ; i++ ){
1660
    		groupIds.add(((IMIContainerDMContext)containerList[i]).getGroupId());
1661
    	}
1662
    	return groupIds;
1663
	}
1664
    
1650
    /**
1665
    /**
1651
     * Get the list of threads from the platform breakpoint attributes
1666
     * Get the list of threads from the platform breakpoint attributes
1652
     * 
1667
     * 

Return to bug 237306