Skip to main content
summaryrefslogtreecommitdiffstats
path: root/debug
diff options
context:
space:
mode:
authorMarc Khouzam2013-03-10 22:03:39 -0400
committerMarc Khouzam2013-03-14 06:49:01 -0400
commit11171b06adbf1dc281de47bc537d8a5a7da0ea96 (patch)
tree7847804bf9b9b670bd601925ea052c5fff30a978 /debug
parentb09a3880fd91ece29369e4616371cadace1b628f (diff)
downloadorg.eclipse.cdt-11171b06adbf1dc281de47bc537d8a5a7da0ea96.tar.gz
org.eclipse.cdt-11171b06adbf1dc281de47bc537d8a5a7da0ea96.tar.xz
org.eclipse.cdt-11171b06adbf1dc281de47bc537d8a5a7da0ea96.zip
Bug 376116 - Use new "Add breakpoint..." with tracepoints
Change-Id: I35ccb2d089683ce760405358d45fff2477036659 Reviewed-on: https://git.eclipse.org/r/11033 Reviewed-by: Pawel Piech <pawel.1.piech@gmail.com> Tested-by: Pawel Piech <pawel.1.piech@gmail.com> Reviewed-by: Marc Khouzam <marc.khouzam@ericsson.com> IP-Clean: Marc Khouzam <marc.khouzam@ericsson.com> Tested-by: Marc Khouzam <marc.khouzam@ericsson.com>
Diffstat (limited to 'debug')
-rw-r--r--debug/org.eclipse.cdt.debug.ui/META-INF/MANIFEST.MF2
-rw-r--r--debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/breakpoints/BreakpointsMessages.properties4
-rw-r--r--debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/breakpoints/CBreakpointContext.java18
-rw-r--r--debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/breakpoints/CBreakpointPreferenceStore.java8
4 files changed, 27 insertions, 5 deletions
diff --git a/debug/org.eclipse.cdt.debug.ui/META-INF/MANIFEST.MF b/debug/org.eclipse.cdt.debug.ui/META-INF/MANIFEST.MF
index c3c06a0139..5d85dba662 100644
--- a/debug/org.eclipse.cdt.debug.ui/META-INF/MANIFEST.MF
+++ b/debug/org.eclipse.cdt.debug.ui/META-INF/MANIFEST.MF
@@ -10,7 +10,7 @@ Export-Package:
org.eclipse.cdt.debug.internal.ui;x-internal:x-friends:="org.eclipse.cdt.dsf.ui";x-friends:="org.eclipse.cdt.dsf.ui",
org.eclipse.cdt.debug.internal.ui.actions;x-friends:="org.eclipse.cdt.dsf.ui,org.eclipse.cdt.debug.ui.memory.memorybrowser",
org.eclipse.cdt.debug.internal.ui.actions.breakpoints;x-internal:=true,
- org.eclipse.cdt.debug.internal.ui.breakpoints;x-friends:="org.eclipse.cdt.dsf.ui",
+ org.eclipse.cdt.debug.internal.ui.breakpoints;x-friends:="org.eclipse.cdt.dsf.ui,org.eclipse.cdt.dsf.gdb.ui",
org.eclipse.cdt.debug.internal.ui.commands;x-internal:=true,
org.eclipse.cdt.debug.internal.ui.dialogfields;x-friends:="org.eclipse.cdt.dsf.gdb.ui",
org.eclipse.cdt.debug.internal.ui.dialogs;x-internal:=true,
diff --git a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/breakpoints/BreakpointsMessages.properties b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/breakpoints/BreakpointsMessages.properties
index 90c7a30e04..1877790d4f 100644
--- a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/breakpoints/BreakpointsMessages.properties
+++ b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/breakpoints/BreakpointsMessages.properties
@@ -41,3 +41,7 @@ CBreakpointPropertyPage.enabled_label=Enabled
CBreakpointPropertyPage.eventType_label=Event Type
ThreadFilterEditor.0=&Restrict to Selected Targets and Threads:
+
+TracepointPropertyPage.tracepointType_function_label=C/C++ Function Tracepoint
+TracepointPropertyPage.tracepointType_address_label=C/C++ Address Tracepoint
+TracepointPropertyPage.tracepointType_line_label=C/C++ Line Tracepoint
diff --git a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/breakpoints/CBreakpointContext.java b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/breakpoints/CBreakpointContext.java
index bc179355e3..5e94f2860e 100644
--- a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/breakpoints/CBreakpointContext.java
+++ b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/breakpoints/CBreakpointContext.java
@@ -177,11 +177,23 @@ class CBreakpointContextWorkbenchAdapter implements IWorkbenchAdapter {
private String getBreakpointMainLabel(ICBreakpoint breakpoint) {
if (breakpoint instanceof ICFunctionBreakpoint) {
- return BreakpointsMessages.getString("CBreakpointPropertyPage.breakpointType_function_label"); //$NON-NLS-1$
+ if (breakpoint instanceof ICTracepoint) {
+ return BreakpointsMessages.getString("TracepointPropertyPage.tracepointType_function_label"); //$NON-NLS-1$
+ } else {
+ return BreakpointsMessages.getString("CBreakpointPropertyPage.breakpointType_function_label"); //$NON-NLS-1$
+ }
} else if (breakpoint instanceof ICAddressBreakpoint) {
- return BreakpointsMessages.getString("CBreakpointPropertyPage.breakpointType_address_label"); //$NON-NLS-1$
+ if (breakpoint instanceof ICTracepoint) {
+ return BreakpointsMessages.getString("TracepointPropertyPage.tracepointType_address_label"); //$NON-NLS-1$
+ } else {
+ return BreakpointsMessages.getString("CBreakpointPropertyPage.breakpointType_address_label"); //$NON-NLS-1$
+ }
} else if (breakpoint instanceof ICLineBreakpoint) {
- return BreakpointsMessages.getString("CBreakpointPropertyPage.breakpointType_line_label"); //$NON-NLS-1$
+ if (breakpoint instanceof ICTracepoint) {
+ return BreakpointsMessages.getString("TracepointPropertyPage.tracepointType_line_label"); //$NON-NLS-1$
+ } else {
+ return BreakpointsMessages.getString("CBreakpointPropertyPage.breakpointType_line_label"); //$NON-NLS-1$
+ }
} else if (breakpoint instanceof ICEventBreakpoint) {
return BreakpointsMessages.getString("CBreakpointPropertyPage.breakpointType_event_label"); //$NON-NLS-1$
} else if (breakpoint instanceof ICWatchpoint) {
diff --git a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/breakpoints/CBreakpointPreferenceStore.java b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/breakpoints/CBreakpointPreferenceStore.java
index 6a284f5039..612bae3e6d 100644
--- a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/breakpoints/CBreakpointPreferenceStore.java
+++ b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/breakpoints/CBreakpointPreferenceStore.java
@@ -8,6 +8,7 @@
* Contributors:
* QNX Software Systems - Initial API and implementation
* QNX Software Systems - Refactored to use platform implementation
+ * Marc Khouzam (Ericsson) - Added support for Tracepoints (bug 376116)
*******************************************************************************/
package org.eclipse.cdt.debug.internal.ui.breakpoints;
@@ -23,6 +24,7 @@ import java.util.Set;
import org.eclipse.cdt.debug.core.CDIDebugModel;
import org.eclipse.cdt.debug.core.model.ICBreakpoint;
import org.eclipse.cdt.debug.core.model.ICLineBreakpoint2;
+import org.eclipse.cdt.debug.core.model.ICTracepoint;
import org.eclipse.core.resources.IMarker;
import org.eclipse.core.resources.IResource;
import org.eclipse.core.resources.IWorkspaceRunnable;
@@ -36,7 +38,8 @@ import org.eclipse.jface.util.IPropertyChangeListener;
import org.eclipse.jface.util.PropertyChangeEvent;
/**
- * A preference store that presents the state of the properties of a C/C++ breakpoint.
+ * A preference store that presents the state of the properties of a C/C++ breakpoint
+ * or Tracepoint.
*/
public class CBreakpointPreferenceStore implements IPersistentPreferenceStore {
@@ -131,6 +134,9 @@ public class CBreakpointPreferenceStore implements IPersistentPreferenceStore {
else if ( property.equals( ICBreakpoint.IGNORE_COUNT ) ) {
breakpoint.setIgnoreCount( getInt( ICBreakpoint.IGNORE_COUNT ) );
}
+ else if ( breakpoint instanceof ICTracepoint && property.equals( ICTracepoint.PASS_COUNT ) ) {
+ ((ICTracepoint)breakpoint).setPassCount( getInt( ICTracepoint.PASS_COUNT ) );
+ }
else if ( property.equals( ICBreakpoint.CONDITION ) ) {
breakpoint.setCondition( getString( ICBreakpoint.CONDITION ) );
}

Back to the top