mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-20 15:35:24 +02:00
[248587] Support "Event' Breakpoints
This commit is contained in:
parent
ce0a5734a5
commit
5d4fc7432c
1 changed files with 15 additions and 5 deletions
|
@ -130,7 +130,7 @@ public class MIRunControlEventProcessor
|
||||||
if (var.equals("reason")) { //$NON-NLS-1$
|
if (var.equals("reason")) { //$NON-NLS-1$
|
||||||
if (val instanceof MIConst) {
|
if (val instanceof MIConst) {
|
||||||
String reason = ((MIConst) val).getString();
|
String reason = ((MIConst) val).getString();
|
||||||
MIEvent<?> e = createEvent(reason, exec);
|
MIEvent<?> e = createEvent(reason, exec, ((MIOutput)output).getStreamRecords());
|
||||||
if (e != null) {
|
if (e != null) {
|
||||||
events.add(e);
|
events.add(e);
|
||||||
continue;
|
continue;
|
||||||
|
@ -157,7 +157,7 @@ public class MIRunControlEventProcessor
|
||||||
// GDB for temporary breakpoints will not send the
|
// GDB for temporary breakpoints will not send the
|
||||||
// "reason" ??? still fire a stopped event.
|
// "reason" ??? still fire a stopped event.
|
||||||
if (events.isEmpty()) {
|
if (events.isEmpty()) {
|
||||||
MIEvent<?> e = createEvent(STOPPED_REASON, exec);
|
MIEvent<?> e = createEvent(STOPPED_REASON, exec, ((MIOutput)output).getStreamRecords());
|
||||||
if (e != null) {
|
if (e != null) {
|
||||||
events.add(e);
|
events.add(e);
|
||||||
}
|
}
|
||||||
|
@ -210,11 +210,21 @@ public class MIRunControlEventProcessor
|
||||||
return execDmc;
|
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);
|
IExecutionDMContext execDmc = getExecutionContext(exec);
|
||||||
MIEvent<?> event = null;
|
MIEvent<?> event = null;
|
||||||
if ("breakpoint-hit".equals(reason)) { //$NON-NLS-1$
|
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 (
|
} else if (
|
||||||
"watchpoint-trigger".equals(reason) //$NON-NLS-1$
|
"watchpoint-trigger".equals(reason) //$NON-NLS-1$
|
||||||
|| "read-watchpoint-trigger".equals(reason) //$NON-NLS-1$
|
|| "read-watchpoint-trigger".equals(reason) //$NON-NLS-1$
|
||||||
|
|
Loading…
Add table
Reference in a new issue