Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohn Cortell2010-04-07 15:11:59 +0000
committerJohn Cortell2010-04-07 15:11:59 +0000
commit5d4fc7432caeec24a872ef9024404d5a79d4fdb1 (patch)
tree9ad05177fa6cbe2ffa47882daabfe6e2fa8b382f
parentce0a5734a5c6a9425761591078efa970f721edc3 (diff)
downloadorg.eclipse.cdt-5d4fc7432caeec24a872ef9024404d5a79d4fdb1.tar.gz
org.eclipse.cdt-5d4fc7432caeec24a872ef9024404d5a79d4fdb1.tar.xz
org.eclipse.cdt-5d4fc7432caeec24a872ef9024404d5a79d4fdb1.zip
[248587] Support "Event' Breakpoints
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/MIRunControlEventProcessor.java20
1 files changed, 15 insertions, 5 deletions
diff --git a/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/MIRunControlEventProcessor.java b/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/MIRunControlEventProcessor.java
index b598a890838..c0631c4e074 100644
--- a/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/MIRunControlEventProcessor.java
+++ b/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/MIRunControlEventProcessor.java
@@ -130,7 +130,7 @@ public class MIRunControlEventProcessor
if (var.equals("reason")) { //$NON-NLS-1$
if (val instanceof MIConst) {
String reason = ((MIConst) val).getString();
- MIEvent<?> e = createEvent(reason, exec);
+ MIEvent<?> e = createEvent(reason, exec, ((MIOutput)output).getStreamRecords());
if (e != null) {
events.add(e);
continue;
@@ -157,7 +157,7 @@ public class MIRunControlEventProcessor
// GDB for temporary breakpoints will not send the
// "reason" ??? still fire a stopped event.
if (events.isEmpty()) {
- MIEvent<?> e = createEvent(STOPPED_REASON, exec);
+ MIEvent<?> e = createEvent(STOPPED_REASON, exec, ((MIOutput)output).getStreamRecords());
if (e != null) {
events.add(e);
}
@@ -209,12 +209,22 @@ public class MIRunControlEventProcessor
return execDmc;
}
-
- protected MIEvent<?> createEvent(String reason, MIExecAsyncOutput exec) {
+
+ /**
+ * @param miStreamRecords
+ * the stream records that preceded 'exec'. Determining which
+ * type of event to create may require additional insight
+ * available in those records. One example is catchpoint hits.
+ * They are reported by gdb (>= 7.0)as a simple breakpoint hit.
+ * However, gdb also sends a stream record that reveals that it's
+ * a catchpoint hit.
+ * @since 3.0
+ */
+ protected MIEvent<?> createEvent(String reason, MIExecAsyncOutput exec, MIStreamRecord[] miStreamRecords) {
IExecutionDMContext execDmc = getExecutionContext(exec);
MIEvent<?> event = null;
if ("breakpoint-hit".equals(reason)) { //$NON-NLS-1$
- event = MIBreakpointHitEvent.parse(execDmc, exec.getToken(), exec.getMIResults());
+ event = MIBreakpointHitEvent.parse(execDmc, exec.getToken(), exec.getMIResults(), miStreamRecords);
} else if (
"watchpoint-trigger".equals(reason) //$NON-NLS-1$
|| "read-watchpoint-trigger".equals(reason) //$NON-NLS-1$

Back to the top