mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-29 19:45:01 +02:00
Bug 388793: Breakpoint actions do not work with non-stop mode
Change-Id: Ied37f0289d6ab6fe2ab6ac250bf4ecdce82faaff Reviewed-on: https://git.eclipse.org/r/7657 Reviewed-by: Pawel Piech <pawel.piech@windriver.com> IP-Clean: Pawel Piech <pawel.piech@windriver.com> Tested-by: Pawel Piech <pawel.piech@windriver.com>
This commit is contained in:
parent
d62945a3d9
commit
1735542b2d
1 changed files with 28 additions and 13 deletions
|
@ -54,6 +54,7 @@ import org.eclipse.cdt.dsf.debug.service.IDsfBreakpointExtension;
|
|||
import org.eclipse.cdt.dsf.debug.service.IRunControl;
|
||||
import org.eclipse.cdt.dsf.debug.service.IRunControl.IContainerDMContext;
|
||||
import org.eclipse.cdt.dsf.debug.service.IRunControl.IExecutionDMContext;
|
||||
import org.eclipse.cdt.dsf.debug.service.IRunControl.ISuspendedDMEvent;
|
||||
import org.eclipse.cdt.dsf.debug.service.ISourceLookup;
|
||||
import org.eclipse.cdt.dsf.debug.service.ISourceLookup.ISourceLookupDMContext;
|
||||
import org.eclipse.cdt.dsf.debug.service.command.ICommandControl;
|
||||
|
@ -65,6 +66,7 @@ import org.eclipse.cdt.dsf.mi.service.MIBreakpoints.BreakpointUpdatedEvent;
|
|||
import org.eclipse.cdt.dsf.mi.service.MIBreakpoints.MIBreakpointDMContext;
|
||||
import org.eclipse.cdt.dsf.mi.service.MIRunControl.SuspendedEvent;
|
||||
import org.eclipse.cdt.dsf.mi.service.breakpoint.actions.BreakpointActionAdapter;
|
||||
import org.eclipse.cdt.dsf.mi.service.command.events.IMIDMEvent;
|
||||
import org.eclipse.cdt.dsf.mi.service.command.events.MIBreakpointHitEvent;
|
||||
import org.eclipse.cdt.dsf.mi.service.command.events.MIWatchpointScopeEvent;
|
||||
import org.eclipse.cdt.dsf.mi.service.command.events.MIWatchpointTriggerEvent;
|
||||
|
@ -1340,21 +1342,34 @@ public class MIBreakpointsManager extends AbstractDsfService implements IBreakpo
|
|||
// Breakpoint actions
|
||||
//-------------------------------------------------------------------------
|
||||
|
||||
/** @since 4.2 */
|
||||
@DsfServiceEventHandler
|
||||
public void eventDispatched(ISuspendedDMEvent e) {
|
||||
assert e instanceof IMIDMEvent;
|
||||
if (e instanceof IMIDMEvent) {
|
||||
Object miEvent = ((IMIDMEvent)e).getMIEvent();
|
||||
|
||||
if (miEvent instanceof MIBreakpointHitEvent) {
|
||||
// This covers catchpoints, too
|
||||
MIBreakpointHitEvent evt = (MIBreakpointHitEvent)miEvent;
|
||||
performBreakpointAction(evt.getDMContext(), evt.getNumber());
|
||||
return;
|
||||
}
|
||||
|
||||
if (miEvent instanceof MIWatchpointTriggerEvent) {
|
||||
MIWatchpointTriggerEvent evt = (MIWatchpointTriggerEvent)miEvent;
|
||||
performBreakpointAction(evt.getDMContext(), evt.getNumber());
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated Replaced by the generic {@link #eventDispatched(ISuspendedDMEvent)}
|
||||
*/
|
||||
@Deprecated
|
||||
@DsfServiceEventHandler
|
||||
public void eventDispatched(SuspendedEvent e) {
|
||||
|
||||
if (e.getMIEvent() instanceof MIBreakpointHitEvent) {
|
||||
// This covers catchpoints, too
|
||||
MIBreakpointHitEvent evt = (MIBreakpointHitEvent) e.getMIEvent();
|
||||
performBreakpointAction(evt.getDMContext(), evt.getNumber());
|
||||
return;
|
||||
}
|
||||
|
||||
if (e.getMIEvent() instanceof MIWatchpointTriggerEvent) {
|
||||
MIWatchpointTriggerEvent evt = (MIWatchpointTriggerEvent) e.getMIEvent();
|
||||
performBreakpointAction(evt.getDMContext(), evt.getNumber());
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
private void performBreakpointAction(final IDMContext context, int number) {
|
||||
|
|
Loading…
Add table
Reference in a new issue