mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-23 22:52:11 +02:00
- added couple more of working catchpoints: fork, vfork and exec
This commit is contained in:
parent
ad109d4108
commit
af61802112
3 changed files with 32 additions and 1 deletions
|
@ -22,6 +22,9 @@ public class EventBreakpoint extends Breakpoint implements ICDIEventBreakpoint {
|
||||||
public static final String CATCH = "org.eclipse.cdt.debug.gdb.catch";
|
public static final String CATCH = "org.eclipse.cdt.debug.gdb.catch";
|
||||||
public static final String THROW = "org.eclipse.cdt.debug.gdb.throw";
|
public static final String THROW = "org.eclipse.cdt.debug.gdb.throw";
|
||||||
public static final String SIGNAL_CATCH = "org.eclipse.cdt.debug.gdb.signal";
|
public static final String SIGNAL_CATCH = "org.eclipse.cdt.debug.gdb.signal";
|
||||||
|
public static final String STOP_ON_FORK = "org.eclipse.cdt.debug.gdb.catch_fork";
|
||||||
|
public static final String STOP_ON_VFORK = "org.eclipse.cdt.debug.gdb.catch_vfork";
|
||||||
|
public static final String STOP_ON_EXEC = "org.eclipse.cdt.debug.gdb.catch_exec";
|
||||||
private String eventType;
|
private String eventType;
|
||||||
private String arg;
|
private String arg;
|
||||||
|
|
||||||
|
@ -44,6 +47,9 @@ public class EventBreakpoint extends Breakpoint implements ICDIEventBreakpoint {
|
||||||
if (getEventType().equals(CATCH)) return "catch";
|
if (getEventType().equals(CATCH)) return "catch";
|
||||||
if (getEventType().equals(THROW)) return "throw";
|
if (getEventType().equals(THROW)) return "throw";
|
||||||
if (getEventType().equals(SIGNAL_CATCH)) return "signal";
|
if (getEventType().equals(SIGNAL_CATCH)) return "signal";
|
||||||
|
if (getEventType().equals(STOP_ON_EXEC)) return "exec";
|
||||||
|
if (getEventType().equals(STOP_ON_FORK)) return "fork";
|
||||||
|
if (getEventType().equals(STOP_ON_VFORK)) return "vfork";
|
||||||
return "unknown";
|
return "unknown";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -76,6 +82,14 @@ public class EventBreakpoint extends Breakpoint implements ICDIEventBreakpoint {
|
||||||
EventBreakpoint.CATCH;
|
EventBreakpoint.CATCH;
|
||||||
} else if (miBreakpoint.getWhat().equals("exception throw")) {
|
} else if (miBreakpoint.getWhat().equals("exception throw")) {
|
||||||
return EventBreakpoint.THROW;
|
return EventBreakpoint.THROW;
|
||||||
|
} else if (miBreakpoint.getType().equals("catch signal")) {
|
||||||
|
return EventBreakpoint.SIGNAL_CATCH;
|
||||||
|
} else if (miBreakpoint.getType().equals("catch fork")) {
|
||||||
|
return EventBreakpoint.STOP_ON_FORK;
|
||||||
|
} else if (miBreakpoint.getType().equals("catch vfork")) {
|
||||||
|
return EventBreakpoint.STOP_ON_VFORK;
|
||||||
|
} else if (miBreakpoint.getType().equals("catch exec")) {
|
||||||
|
return EventBreakpoint.STOP_ON_EXEC;
|
||||||
}
|
}
|
||||||
return null; // not known/supported
|
return null; // not known/supported
|
||||||
}
|
}
|
||||||
|
|
|
@ -26,3 +26,8 @@ catchThrow.label = Exception Thrown
|
||||||
catchType.label = Event Type
|
catchType.label = Event Type
|
||||||
catchSignal.label = Signal Caught
|
catchSignal.label = Signal Caught
|
||||||
catchSignal.arg.label = Signal Number
|
catchSignal.arg.label = Signal Number
|
||||||
|
|
||||||
|
#Note: fork, vfork and exec is not translatable words
|
||||||
|
catchFork.label = Stop on fork
|
||||||
|
catchVfork.label = Stop on vfork
|
||||||
|
catchExec.label = Stop on exec
|
|
@ -96,6 +96,18 @@
|
||||||
type="integer" fieldEditor="org.eclipse.jface.preference.IntegerFieldEditor">
|
type="integer" fieldEditor="org.eclipse.jface.preference.IntegerFieldEditor">
|
||||||
</attribute>
|
</attribute>
|
||||||
</value>
|
</value>
|
||||||
|
<value
|
||||||
|
label="%catchFork.label"
|
||||||
|
value="org.eclipse.cdt.debug.gdb.catch_fork">
|
||||||
|
</value>
|
||||||
|
<value
|
||||||
|
label="%catchVfork.label"
|
||||||
|
value="org.eclipse.cdt.debug.gdb.catch_vfork">
|
||||||
|
</value>
|
||||||
|
<value
|
||||||
|
label="%catchExec.label"
|
||||||
|
value="org.eclipse.cdt.debug.gdb.catch_exec">
|
||||||
|
</value>
|
||||||
</attribute>
|
</attribute>
|
||||||
</breakpointLabels>
|
</breakpointLabels>
|
||||||
</extension>
|
</extension>
|
||||||
|
|
Loading…
Add table
Reference in a new issue