1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-08-04 14:55:41 +02:00

Bug 335324: Make the container (process) the breakpointTarget context

This commit is contained in:
Marc Khouzam 2011-02-08 15:25:03 +00:00
parent 3b39d334c9
commit 906fdd4ad2
4 changed files with 9 additions and 7 deletions

View file

@ -31,6 +31,7 @@ import org.eclipse.cdt.dsf.datamodel.AbstractDMContext;
import org.eclipse.cdt.dsf.datamodel.AbstractDMEvent; import org.eclipse.cdt.dsf.datamodel.AbstractDMEvent;
import org.eclipse.cdt.dsf.datamodel.DMContexts; import org.eclipse.cdt.dsf.datamodel.DMContexts;
import org.eclipse.cdt.dsf.datamodel.IDMContext; import org.eclipse.cdt.dsf.datamodel.IDMContext;
import org.eclipse.cdt.dsf.debug.service.IBreakpoints.IBreakpointsTargetDMContext;
import org.eclipse.cdt.dsf.debug.service.ICachingService; import org.eclipse.cdt.dsf.debug.service.ICachingService;
import org.eclipse.cdt.dsf.debug.service.IMemory.IMemoryDMContext; import org.eclipse.cdt.dsf.debug.service.IMemory.IMemoryDMContext;
import org.eclipse.cdt.dsf.debug.service.IProcesses; import org.eclipse.cdt.dsf.debug.service.IProcesses;
@ -167,7 +168,7 @@ public class GDBProcesses_7_0 extends AbstractDsfService
*/ */
@Immutable @Immutable
private static class MIContainerDMC extends AbstractDMContext private static class MIContainerDMC extends AbstractDMContext
implements IMIContainerDMContext implements IMIContainerDMContext, IBreakpointsTargetDMContext
{ {
/** /**
* String ID that is used to identify the thread group in the GDB/MI protocol. * String ID that is used to identify the thread group in the GDB/MI protocol.

View file

@ -14,6 +14,7 @@ import org.eclipse.cdt.dsf.concurrent.DataRequestMonitor;
import org.eclipse.cdt.dsf.concurrent.RequestMonitor; import org.eclipse.cdt.dsf.concurrent.RequestMonitor;
import org.eclipse.cdt.dsf.datamodel.DMContexts; import org.eclipse.cdt.dsf.datamodel.DMContexts;
import org.eclipse.cdt.dsf.datamodel.IDMContext; import org.eclipse.cdt.dsf.datamodel.IDMContext;
import org.eclipse.cdt.dsf.debug.service.IBreakpoints.IBreakpointsTargetDMContext;
import org.eclipse.cdt.dsf.debug.service.command.ICommandControlService.ICommandControlDMContext; import org.eclipse.cdt.dsf.debug.service.command.ICommandControlService.ICommandControlDMContext;
import org.eclipse.cdt.dsf.gdb.internal.GdbPlugin; import org.eclipse.cdt.dsf.gdb.internal.GdbPlugin;
import org.eclipse.cdt.dsf.gdb.service.command.IGDBControl; import org.eclipse.cdt.dsf.gdb.service.command.IGDBControl;
@ -103,7 +104,8 @@ public class GDBProcesses_7_2 extends GDBProcesses_7_1 {
// Start tracking this process' breakpoints. // Start tracking this process' breakpoints.
MIBreakpointsManager bpmService = getServicesTracker().getService(MIBreakpointsManager.class); MIBreakpointsManager bpmService = getServicesTracker().getService(MIBreakpointsManager.class);
bpmService.startTrackingBreakpoints(containerDmc, rm); IBreakpointsTargetDMContext bpTargetDmc = DMContexts.getAncestorOfType(containerDmc, IBreakpointsTargetDMContext.class);
bpmService.startTrackingBreakpoints(bpTargetDmc, rm);
} }
}); });
} }

View file

@ -1,5 +1,5 @@
/******************************************************************************* /*******************************************************************************
* Copyright (c) 2008, 2011 Ericsson and others. * Copyright (c) 2008, 2009 Ericsson and others.
* All rights reserved. This program and the accompanying materials * All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0 * are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at * which accompanies this distribution, and is available at
@ -7,11 +7,9 @@
* *
* Contributors: * Contributors:
* Ericsson - initial API and implementation * Ericsson - initial API and implementation
* Onur Akdemir (TUBITAK BILGEM-ITI) - Multi-process debugging (Bug 335324)
*******************************************************************************/ *******************************************************************************/
package org.eclipse.cdt.dsf.mi.service; package org.eclipse.cdt.dsf.mi.service;
import org.eclipse.cdt.dsf.debug.service.IBreakpoints.IBreakpointsTargetDMContext;
import org.eclipse.cdt.dsf.debug.service.IRunControl.IContainerDMContext; import org.eclipse.cdt.dsf.debug.service.IRunControl.IContainerDMContext;
/** /**
@ -20,7 +18,7 @@ import org.eclipse.cdt.dsf.debug.service.IRunControl.IContainerDMContext;
* identifier. These thread groups are the basis for this context. * identifier. These thread groups are the basis for this context.
* @since 1.1 * @since 1.1
*/ */
public interface IMIContainerDMContext extends IContainerDMContext, IBreakpointsTargetDMContext public interface IMIContainerDMContext extends IContainerDMContext
{ {
/** /**
* Returns the GDB/MI thread group identifier of this context. * Returns the GDB/MI thread group identifier of this context.

View file

@ -19,6 +19,7 @@ import org.eclipse.cdt.dsf.datamodel.AbstractDMContext;
import org.eclipse.cdt.dsf.datamodel.AbstractDMEvent; import org.eclipse.cdt.dsf.datamodel.AbstractDMEvent;
import org.eclipse.cdt.dsf.datamodel.DMContexts; import org.eclipse.cdt.dsf.datamodel.DMContexts;
import org.eclipse.cdt.dsf.datamodel.IDMContext; import org.eclipse.cdt.dsf.datamodel.IDMContext;
import org.eclipse.cdt.dsf.debug.service.IBreakpoints.IBreakpointsTargetDMContext;
import org.eclipse.cdt.dsf.debug.service.ICachingService; import org.eclipse.cdt.dsf.debug.service.ICachingService;
import org.eclipse.cdt.dsf.debug.service.IRunControl.IContainerDMContext; import org.eclipse.cdt.dsf.debug.service.IRunControl.IContainerDMContext;
import org.eclipse.cdt.dsf.debug.service.IRunControl.IContainerResumedDMEvent; import org.eclipse.cdt.dsf.debug.service.IRunControl.IContainerResumedDMEvent;
@ -135,7 +136,7 @@ public class MIProcesses extends AbstractDsfService implements IMIProcesses, ICa
*/ */
@Immutable @Immutable
protected static class MIContainerDMC extends AbstractDMContext protected static class MIContainerDMC extends AbstractDMContext
implements IMIContainerDMContext implements IMIContainerDMContext, IBreakpointsTargetDMContext
{ {
/** /**
* String ID that is used to identify the thread group in the GDB/MI protocol. * String ID that is used to identify the thread group in the GDB/MI protocol.