1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-08-10 09:45:39 +02:00

[248587] Fixed some goofs Marc found on review

This commit is contained in:
John Cortell 2010-04-20 20:12:34 +00:00
parent 9cc57cc9ba
commit 0fa86220d1

View file

@ -78,7 +78,6 @@ public class MIBreakpointHitEvent extends MIStoppedEvent {
} }
} }
} }
MIStoppedEvent stoppedEvent = MIStoppedEvent.parse(dmc, token, results);
// We might be here because of a catchpoint hit; in gdb >= 7.0, // We might be here because of a catchpoint hit; in gdb >= 7.0,
// catchpoints are reported as breakpoints. Unfortunately, there's // catchpoints are reported as breakpoints. Unfortunately, there's
@ -90,18 +89,26 @@ public class MIBreakpointHitEvent extends MIStoppedEvent {
if (bpsTarget != null) { if (bpsTarget != null) {
MIBreakpointDMContext bkpt = new MIBreakpointDMContext(dmc.getSessionId(), new IDMContext[] {bpsTarget}, bkptno); MIBreakpointDMContext bkpt = new MIBreakpointDMContext(dmc.getSessionId(), new IDMContext[] {bpsTarget}, bkptno);
DsfServicesTracker tracker = new DsfServicesTracker(GdbPlugin.getBundleContext(), dmc.getSessionId()); DsfServicesTracker tracker = new DsfServicesTracker(GdbPlugin.getBundleContext(), dmc.getSessionId());
MIBreakpointsManager bkptMgr = tracker.getService(MIBreakpointsManager.class); try {
IBreakpoint platformBkpt = bkptMgr.findPlatformBreakpoint(bkpt); MIBreakpointsManager bkptMgr = tracker.getService(MIBreakpointsManager.class);
if (platformBkpt instanceof CEventBreakpoint) { if (bkptMgr != null) {
try { IBreakpoint platformBkpt = bkptMgr.findPlatformBreakpoint(bkpt);
String eventTypeID = ((CEventBreakpoint)platformBkpt).getEventType(); if (platformBkpt instanceof CEventBreakpoint) {
String gdbKeyword = GdbCatchpoints.eventToGdbCatchpointKeyword(eventTypeID); try {
return MICatchpointHitEvent.parse(stoppedEvent.getDMContext(), token, results, bkptno, gdbKeyword); String eventTypeID = ((CEventBreakpoint)platformBkpt).getEventType();
} catch (DebugException e) { String gdbKeyword = GdbCatchpoints.eventToGdbCatchpointKeyword(eventTypeID);
} return MICatchpointHitEvent.parse(dmc, token, results, bkptno, gdbKeyword);
} catch (DebugException e) {
}
}
}
}
finally {
tracker.dispose();
} }
} }
MIStoppedEvent stoppedEvent = MIStoppedEvent.parse(dmc, token, results);
return new MIBreakpointHitEvent(stoppedEvent.getDMContext(), token, results, stoppedEvent.getFrame(), bkptno); return new MIBreakpointHitEvent(stoppedEvent.getDMContext(), token, results, stoppedEvent.getFrame(), bkptno);
} }
} }