use of org.eclipse.cdt.dsf.service.DsfServiceEventHandler in project usbdm-eclipse-plugins by podonoghue.
the class GdbDsfSessionListener method handleDsfEvent.
/**
*/
@DsfServiceEventHandler
public void handleDsfEvent(IExitedDMEvent event) {
String sessionId = event.getDMContext().getSessionId();
// System.err.println(String.format("handleDsfEvent(IExitedDMEvent, s=%s, r=%s)", sessionId, event.toString()));
UsbdmDevicePeripheralsModel deviceModel = dsfSessions.get(sessionId);
if (deviceModel != null) {
for (GdbSessionListener sessionListener : gdbSessionListeners) {
sessionListener.sessionTerminated(deviceModel);
}
}
}
use of org.eclipse.cdt.dsf.service.DsfServiceEventHandler in project usbdm-eclipse-plugins by podonoghue.
the class GdbDsfSessionListener method handleDsfEvent.
/**
*/
@DsfServiceEventHandler
public void handleDsfEvent(ISuspendedDMEvent event) {
String sessionId = event.getDMContext().getSessionId();
UsbdmDevicePeripheralsModel devicePeripheralsModel = dsfSessions.get(sessionId);
if (devicePeripheralsModel != null) {
DeviceModel deviceModel = devicePeripheralsModel.getModel();
if (deviceModel != null) {
// Set current register values as the 'reference' for changed values
deviceModel.setChangeReference();
// Set all registers as stale
deviceModel.setNeedsUpdate(true);
}
}
for (GdbSessionListener sessionListener : gdbSessionListeners) {
sessionListener.sessionSuspended(devicePeripheralsModel, GdbSessionListener.EventType.getEventFromDsfEvent(event.getReason()));
}
}
Aggregations