mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-06-07 09:46:02 +02:00
bug 415362: [visualizer] occasional exception when exercising step into
selection https://bugs.eclipse.org/bugs/show_bug.cgi?id=415362 Change-Id: Ifea7bc53881bbb1d10dfd55c85fb3116dcb0817d Signed-off-by: Alvaro Sanchez-Leon <alvsan09@gmail.com> Reviewed-on: https://git.eclipse.org/r/16106 Reviewed-by: Marc Khouzam <marc.khouzam@ericsson.com> IP-Clean: Marc Khouzam <marc.khouzam@ericsson.com> Tested-by: Marc Khouzam <marc.khouzam@ericsson.com>
This commit is contained in:
parent
9d1233f05a
commit
2519bcb8cb
3 changed files with 46 additions and 2 deletions
|
@ -10,6 +10,7 @@
|
||||||
* Ericsson AB - Modified for additional functionality
|
* Ericsson AB - Modified for additional functionality
|
||||||
* Nokia - create and use backend service.
|
* Nokia - create and use backend service.
|
||||||
* Alvaro Sanchez-Leon (Ericsson AB) - Support for Step into selection (bug 244865)
|
* Alvaro Sanchez-Leon (Ericsson AB) - Support for Step into selection (bug 244865)
|
||||||
|
* Alvaro Sanchez-Leon (Ericsson AB) - Bug 415362
|
||||||
*******************************************************************************/
|
*******************************************************************************/
|
||||||
|
|
||||||
package org.eclipse.cdt.dsf.gdb.service;
|
package org.eclipse.cdt.dsf.gdb.service;
|
||||||
|
@ -48,6 +49,7 @@ import org.eclipse.cdt.dsf.mi.service.command.CommandFactory;
|
||||||
import org.eclipse.cdt.dsf.mi.service.command.events.MIBreakpointHitEvent;
|
import org.eclipse.cdt.dsf.mi.service.command.events.MIBreakpointHitEvent;
|
||||||
import org.eclipse.cdt.dsf.mi.service.command.events.MIEvent;
|
import org.eclipse.cdt.dsf.mi.service.command.events.MIEvent;
|
||||||
import org.eclipse.cdt.dsf.mi.service.command.events.MIInferiorExitEvent;
|
import org.eclipse.cdt.dsf.mi.service.command.events.MIInferiorExitEvent;
|
||||||
|
import org.eclipse.cdt.dsf.mi.service.command.events.MIRunningEvent;
|
||||||
import org.eclipse.cdt.dsf.mi.service.command.events.MIStoppedEvent;
|
import org.eclipse.cdt.dsf.mi.service.command.events.MIStoppedEvent;
|
||||||
import org.eclipse.cdt.dsf.mi.service.command.events.MIThreadExitEvent;
|
import org.eclipse.cdt.dsf.mi.service.command.events.MIThreadExitEvent;
|
||||||
import org.eclipse.cdt.dsf.mi.service.command.output.MIBreakInsertInfo;
|
import org.eclipse.cdt.dsf.mi.service.command.output.MIBreakInsertInfo;
|
||||||
|
@ -393,6 +395,34 @@ public class GDBRunControl extends MIRunControl {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* (non-Javadoc)
|
||||||
|
* @see org.eclipse.cdt.dsf.mi.service.MIRunControl#eventDispatched(org.eclipse.cdt.dsf.mi.service.command.events.MIRunningEvent)
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
@DsfServiceEventHandler
|
||||||
|
public void eventDispatched(final MIRunningEvent e) {
|
||||||
|
if (fDisableNextRunningEvent) {
|
||||||
|
// Leave the action to the super class
|
||||||
|
super.eventDispatched(e);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (fRunToLineActiveOperation == null && fStepInToSelectionActiveOperation == null) {
|
||||||
|
// No special case here, i.e. send notification
|
||||||
|
super.eventDispatched(e);
|
||||||
|
} else {
|
||||||
|
// Either RuntoLine or StepIntoSelection operations are active
|
||||||
|
if (fLatestEvent instanceof ISuspendedDMEvent) {
|
||||||
|
// Need to send out Running event notification only once per operation, then a stop event is expected at
|
||||||
|
// the end of it
|
||||||
|
super.eventDispatched(e);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// No event dispatched if RuntoLine or StepIntoSelection operations are active and a previous event is not a
|
||||||
|
// Suspended event, i.e. only one Running event distributed per operation
|
||||||
|
}
|
||||||
|
|
||||||
private boolean processRunToLineStoppedEvent(final MIStoppedEvent e) {
|
private boolean processRunToLineStoppedEvent(final MIStoppedEvent e) {
|
||||||
if (fRunToLineActiveOperation != null) {
|
if (fRunToLineActiveOperation != null) {
|
||||||
int bpId = 0;
|
int bpId = 0;
|
||||||
|
|
|
@ -11,6 +11,7 @@
|
||||||
* Indel AG - [369622] fixed moveToLine using MinGW
|
* Indel AG - [369622] fixed moveToLine using MinGW
|
||||||
* Marc Khouzam (Ericsson) - Support for operations on multiple execution contexts (bug 330974)
|
* Marc Khouzam (Ericsson) - Support for operations on multiple execution contexts (bug 330974)
|
||||||
* Alvaro Sanchez-Leon (Ericsson AB) - Support for Step into selection (bug 244865)
|
* Alvaro Sanchez-Leon (Ericsson AB) - Support for Step into selection (bug 244865)
|
||||||
|
* Alvaro Sanchez-Leon (Ericsson AB) - Bug 415362
|
||||||
*******************************************************************************/
|
*******************************************************************************/
|
||||||
|
|
||||||
package org.eclipse.cdt.dsf.gdb.service;
|
package org.eclipse.cdt.dsf.gdb.service;
|
||||||
|
@ -1528,7 +1529,18 @@ public class GDBRunControl_7_0_NS extends AbstractDsfService implements IMIRunCo
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (fRunToLineActiveOperation == null && fStepInToSelectionActiveOperation == null) {
|
||||||
|
// No special case here, i.e. send notification
|
||||||
getSession().dispatchEvent(new ResumedEvent(e.getDMContext(), e), getProperties());
|
getSession().dispatchEvent(new ResumedEvent(e.getDMContext(), e), getProperties());
|
||||||
|
} else {
|
||||||
|
// Either RunToLine or StepIntoSelection operations are active
|
||||||
|
MIThreadRunState threadState = fThreadRunStates.get(e.getDMContext());
|
||||||
|
if (threadState == null || threadState.fLatestEvent instanceof ISuspendedDMEvent) {
|
||||||
|
// Need to send out Running event notification, only once per operation, then a stop event is expected
|
||||||
|
// at the end of the operation
|
||||||
|
getSession().dispatchEvent(new ResumedEvent(e.getDMContext(), e), getProperties());
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -12,6 +12,7 @@
|
||||||
* Indel AG - [369622] fixed moveToLine using MinGW
|
* Indel AG - [369622] fixed moveToLine using MinGW
|
||||||
* Marc Khouzam (Ericsson) - Make each thread an IDisassemblyDMContext (bug 352748)
|
* Marc Khouzam (Ericsson) - Make each thread an IDisassemblyDMContext (bug 352748)
|
||||||
* Alvaro Sanchez-Leon (Ericsson AB) - Support for Step into selection (bug 244865)
|
* Alvaro Sanchez-Leon (Ericsson AB) - Support for Step into selection (bug 244865)
|
||||||
|
* Alvaro Sanchez-Leon (Ericsson AB) - Bug 415362
|
||||||
*******************************************************************************/
|
*******************************************************************************/
|
||||||
package org.eclipse.cdt.dsf.mi.service;
|
package org.eclipse.cdt.dsf.mi.service;
|
||||||
|
|
||||||
|
@ -400,8 +401,9 @@ public class MIRunControl extends AbstractDsfService implements IMIRunControl, I
|
||||||
private IExecutionDMContext fStateChangeTriggeringContext;
|
private IExecutionDMContext fStateChangeTriggeringContext;
|
||||||
/**
|
/**
|
||||||
* Indicates that the next MIRunning event should be silenced.
|
* Indicates that the next MIRunning event should be silenced.
|
||||||
|
* @since 4.3
|
||||||
*/
|
*/
|
||||||
private boolean fDisableNextRunningEvent;
|
protected boolean fDisableNextRunningEvent;
|
||||||
/**
|
/**
|
||||||
* Indicates that the next MISignal (MIStopped) event should be silenced.
|
* Indicates that the next MISignal (MIStopped) event should be silenced.
|
||||||
*/
|
*/
|
||||||
|
|
Loading…
Add table
Reference in a new issue