From af61802112a22b154e054fa8dcf7b49308ca87bd Mon Sep 17 00:00:00 2001 From: Alena Laskavaia Date: Thu, 1 May 2008 14:25:50 +0000 Subject: [PATCH] - added couple more of working catchpoints: fork, vfork and exec --- .../debug/mi/core/cdi/model/EventBreakpoint.java | 14 ++++++++++++++ .../org.eclipse.cdt.debug.mi.ui/plugin.properties | 7 ++++++- debug/org.eclipse.cdt.debug.mi.ui/plugin.xml | 12 ++++++++++++ 3 files changed, 32 insertions(+), 1 deletion(-) diff --git a/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/EventBreakpoint.java b/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/EventBreakpoint.java index 9637afc4cc5..7446c802b96 100644 --- a/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/EventBreakpoint.java +++ b/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/EventBreakpoint.java @@ -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 THROW = "org.eclipse.cdt.debug.gdb.throw"; 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 arg; @@ -44,6 +47,9 @@ public class EventBreakpoint extends Breakpoint implements ICDIEventBreakpoint { if (getEventType().equals(CATCH)) return "catch"; if (getEventType().equals(THROW)) return "throw"; 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"; } @@ -76,6 +82,14 @@ public class EventBreakpoint extends Breakpoint implements ICDIEventBreakpoint { EventBreakpoint.CATCH; } else if (miBreakpoint.getWhat().equals("exception 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 } diff --git a/debug/org.eclipse.cdt.debug.mi.ui/plugin.properties b/debug/org.eclipse.cdt.debug.mi.ui/plugin.properties index 3b03e472680..90a78aed162 100644 --- a/debug/org.eclipse.cdt.debug.mi.ui/plugin.properties +++ b/debug/org.eclipse.cdt.debug.mi.ui/plugin.properties @@ -25,4 +25,9 @@ catchCatch.label = Exception Caught catchThrow.label = Exception Thrown catchType.label = Event Type catchSignal.label = Signal Caught -catchSignal.arg.label = Signal Number \ No newline at end of file +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 \ No newline at end of file diff --git a/debug/org.eclipse.cdt.debug.mi.ui/plugin.xml b/debug/org.eclipse.cdt.debug.mi.ui/plugin.xml index a8dffdf95de..3f5203d341d 100644 --- a/debug/org.eclipse.cdt.debug.mi.ui/plugin.xml +++ b/debug/org.eclipse.cdt.debug.mi.ui/plugin.xml @@ -96,6 +96,18 @@ type="integer" fieldEditor="org.eclipse.jface.preference.IntegerFieldEditor"> + + + + + +