diff --git a/debug/org.eclipse.cdt.debug.core/plugin.xml b/debug/org.eclipse.cdt.debug.core/plugin.xml
index 4d330fafa17..35aca2f7481 100644
--- a/debug/org.eclipse.cdt.debug.core/plugin.xml
+++ b/debug/org.eclipse.cdt.debug.core/plugin.xml
@@ -19,4 +19,104 @@
"org.eclipse.cdt.debug.core.address"
).
+ * This attribute is a String
.
+ */
+ protected static final String ADDRESS = "org.eclipse.cdt.debug.core.address"; //$NON-NLS-1$
+
+ /**
+ * Constructor for CAddressBreakpoint.
+ */
+ public CAddressBreakpoint()
+ {
+ super();
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.cdt.debug.core.ICAddressBreakpoint#getAddress()
+ */
+ public String getAddress() throws CoreException
+ {
+ return ensureMarker().getAttribute( ADDRESS, null );
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.cdt.debug.core.ICAddressBreakpoint#setAddress(long)
+ */
+ public void setAddress( String address ) throws CoreException
+ {
+ setAttribute( ADDRESS, address );
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.debug.core.model.ILineBreakpoint#getLineNumber()
+ */
+ public int getLineNumber() throws CoreException
+ {
+ return ensureMarker().getAttribute( IMarker.LINE_NUMBER, -1 );
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.debug.core.model.ILineBreakpoint#getCharStart()
+ */
+ public int getCharStart() throws CoreException
+ {
+ return ensureMarker().getAttribute( IMarker.CHAR_START, -1 );
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.debug.core.model.ILineBreakpoint#getCharEnd()
+ */
+ public int getCharEnd() throws CoreException
+ {
+ return ensureMarker().getAttribute( IMarker.CHAR_END, -1 );
+ }
+}
diff --git a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/breakpoints/CBreakpoint.java b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/breakpoints/CBreakpoint.java
new file mode 100644
index 00000000000..54820fb4fe8
--- /dev/null
+++ b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/breakpoints/CBreakpoint.java
@@ -0,0 +1,132 @@
+/*
+ *(c) Copyright QNX Software Systems Ltd. 2002.
+ * All Rights Reserved.
+ *
+ */
+
+package org.eclipse.cdt.debug.internal.core.breakpoints;
+
+import org.eclipse.cdt.debug.core.CDebugModel;
+import org.eclipse.cdt.debug.core.ICBreakpoint;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.debug.core.DebugEvent;
+import org.eclipse.debug.core.IDebugEventSetListener;
+import org.eclipse.debug.core.model.Breakpoint;
+
+/**
+ *
+ * Enter type comment.
+ *
+ * @since Aug 21, 2002
+ */
+public abstract class CBreakpoint extends Breakpoint
+ implements ICBreakpoint,
+ IDebugEventSetListener
+{
+ /**
+ * Breakpoint attribute storing the number of debug targets a
+ * breakpoint is installed in (value "org.eclipse.cdt.debug.core.installCount"
).
+ * This attribute is a int
.
+ */
+ protected static final String INSTALL_COUNT = "org.eclipse.cdt.debug.core.installCount"; //$NON-NLS-1$
+
+ /**
+ * Breakpoint attribute storing the the conditional expression
+ * associated with this breakpoint (value "org.eclipse.cdt.debug.core.condition"
).
+ * This attribute is a String
.
+ */
+ protected static final String CONDITION = "org.eclipse.cdt.debug.core.condition"; //$NON-NLS-1$
+
+ /**
+ * Breakpoint attribute storing a breakpoint's ignore count value
+ * (value "org.eclipse.cdt.debug.core.ignoreCount"
).
+ * This attribute is a int
.
+ */
+ protected static final String IGNORE_COUNT = "org.eclipse.cdt.debug.core.ignoreCount"; //$NON-NLS-1$
+
+ /**
+ * Breakpoint attribute storing an identifier of the thread this
+ * breakpoint is restricted in (value "org.eclipse.cdt.debug.core.threadId"
).
+ * This attribute is a String
.
+ */
+ protected static final String THREAD_ID = "org.eclipse.cdt.debug.core.threadId"; //$NON-NLS-1$
+
+ /**
+ * Constructor for CBreakpoint.
+ */
+ public CBreakpoint()
+ {
+ super();
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.debug.core.model.IBreakpoint#getModelIdentifier()
+ */
+ public String getModelIdentifier()
+ {
+ return CDebugModel.getPluginIdentifier();
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.cdt.debug.core.ICBreakpoint#isInstalled()
+ */
+ public boolean isInstalled() throws CoreException
+ {
+ return ensureMarker().getAttribute( INSTALL_COUNT, 0 ) > 0;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.cdt.debug.core.ICBreakpoint#getCondition()
+ */
+ public String getCondition() throws CoreException
+ {
+ return ensureMarker().getAttribute( CONDITION, "" );
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.cdt.debug.core.ICBreakpoint#setCondition(String)
+ */
+ public void setCondition( String condition ) throws CoreException
+ {
+ setAttribute( CONDITION, condition );
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.cdt.debug.core.ICBreakpoint#getIgnoreCount()
+ */
+ public int getIgnoreCount() throws CoreException
+ {
+ return ensureMarker().getAttribute( IGNORE_COUNT, 0 );
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.cdt.debug.core.ICBreakpoint#setIgnoreCount(int)
+ */
+ public void setIgnoreCount( int ignoreCount ) throws CoreException
+ {
+ setAttribute( IGNORE_COUNT, ignoreCount );
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.cdt.debug.core.ICBreakpoint#getThreadId()
+ */
+ public String getThreadId() throws CoreException
+ {
+ return ensureMarker().getAttribute( THREAD_ID, null );
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.cdt.debug.core.ICBreakpoint#setThreadId(String)
+ */
+ public void setThreadId( String threadId ) throws CoreException
+ {
+ setAttribute( THREAD_ID, threadId );
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.debug.core.IDebugEventSetListener#handleDebugEvents(DebugEvent[])
+ */
+ public void handleDebugEvents( DebugEvent[] events )
+ {
+ }
+}
diff --git a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/breakpoints/CFunctionBreakpoint.java b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/breakpoints/CFunctionBreakpoint.java
new file mode 100644
index 00000000000..6cda614e8aa
--- /dev/null
+++ b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/breakpoints/CFunctionBreakpoint.java
@@ -0,0 +1,73 @@
+/*
+ *(c) Copyright QNX Software Systems Ltd. 2002.
+ * All Rights Reserved.
+ *
+ */
+package org.eclipse.cdt.debug.internal.core.breakpoints;
+
+import org.eclipse.cdt.debug.core.ICFunctionBreakpoint;
+import org.eclipse.core.resources.IMarker;
+import org.eclipse.core.runtime.CoreException;
+
+/**
+ *
+ * Enter type comment.
+ *
+ * @since Aug 21, 2002
+ */
+public class CFunctionBreakpoint extends CBreakpoint implements ICFunctionBreakpoint
+{
+ /**
+ * Breakpoint attribute storing the function this breakpoint suspends
+ * execution in (value "org.eclipse.cdt.debug.core.function"
).
+ * This attribute is a String
.
+ */
+ protected static final String FUNCTION = "org.eclipse.cdt.debug.core.function"; //$NON-NLS-1$
+
+ /**
+ * Constructor for CFunctionBreakpoint.
+ */
+ public CFunctionBreakpoint()
+ {
+ super();
+ }
+ /* (non-Javadoc)
+ * @see org.eclipse.cdt.debug.core.ICFunctionBreakpoint#getFunction()
+ */
+ public String getFunction() throws CoreException
+ {
+ return ensureMarker().getAttribute( FUNCTION, null );
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.cdt.debug.core.ICFunctionBreakpoint#setFunction(String)
+ */
+ public void setFunction( String function ) throws CoreException
+ {
+ setAttribute( FUNCTION, function );
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.debug.core.model.ILineBreakpoint#getLineNumber()
+ */
+ public int getLineNumber() throws CoreException
+ {
+ return ensureMarker().getAttribute( IMarker.LINE_NUMBER, -1 );
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.debug.core.model.ILineBreakpoint#getCharStart()
+ */
+ public int getCharStart() throws CoreException
+ {
+ return ensureMarker().getAttribute( IMarker.CHAR_START, -1 );
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.debug.core.model.ILineBreakpoint#getCharEnd()
+ */
+ public int getCharEnd() throws CoreException
+ {
+ return ensureMarker().getAttribute( IMarker.CHAR_END, -1 );
+ }
+}
diff --git a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/breakpoints/CLineBreakpoint.java b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/breakpoints/CLineBreakpoint.java
new file mode 100644
index 00000000000..e3ffa8fad62
--- /dev/null
+++ b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/breakpoints/CLineBreakpoint.java
@@ -0,0 +1,51 @@
+/*
+ *(c) Copyright QNX Software Systems Ltd. 2002.
+ * All Rights Reserved.
+ *
+ */
+package org.eclipse.cdt.debug.internal.core.breakpoints;
+
+import org.eclipse.cdt.debug.core.ICLineBreakpoint;
+import org.eclipse.core.resources.IMarker;
+import org.eclipse.core.runtime.CoreException;
+
+/**
+ *
+ * Enter type comment.
+ *
+ * @since Aug 21, 2002
+ */
+public class CLineBreakpoint extends CBreakpoint implements ICLineBreakpoint
+{
+ /**
+ * Constructor for CLineBreakpoint.
+ */
+ public CLineBreakpoint()
+ {
+ super();
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.debug.core.model.ILineBreakpoint#getLineNumber()
+ */
+ public int getLineNumber() throws CoreException
+ {
+ return ensureMarker().getAttribute( IMarker.LINE_NUMBER, -1 );
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.debug.core.model.ILineBreakpoint#getCharStart()
+ */
+ public int getCharStart() throws CoreException
+ {
+ return ensureMarker().getAttribute( IMarker.CHAR_START, -1 );
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.debug.core.model.ILineBreakpoint#getCharEnd()
+ */
+ public int getCharEnd() throws CoreException
+ {
+ return ensureMarker().getAttribute( IMarker.CHAR_END, -1 );
+ }
+}
diff --git a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/CDTDebugModelPresentation.java b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/CDTDebugModelPresentation.java
index 272f532b05e..6fae7766a44 100644
--- a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/CDTDebugModelPresentation.java
+++ b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/CDTDebugModelPresentation.java
@@ -11,6 +11,7 @@ import java.util.HashMap;
import org.eclipse.cdt.debug.core.IStackFrameInfo;
import org.eclipse.cdt.debug.core.IState;
+import org.eclipse.cdt.debug.core.cdi.ICDIExitInfo;
import org.eclipse.core.resources.IFile;
import org.eclipse.core.resources.IMarker;
import org.eclipse.core.resources.IResource;
@@ -209,10 +210,19 @@ public class CDTDebugModelPresentation extends LabelProvider
{
if ( target instanceof IState )
{
- switch( ((IState)target).getCurrentStateId() )
+ IState state = (IState)target;
+ switch( state.getCurrentStateId() )
{
case IState.EXITED:
- return getFormattedString( "{0} (Exited)", target.getName() );
+ {
+ Object info = state.getCurrentStateInfo();
+ String label = target.getName() + " (Exited";
+ if ( info != null && info instanceof ICDIExitInfo )
+ {
+ label += ". Exit code = " + ((ICDIExitInfo)info).getCode();
+ }
+ return label + ")";
+ }
}
}
return target.getName();
@@ -248,7 +258,8 @@ public class CDTDebugModelPresentation extends LabelProvider
if ( info.getFile() != null )
{
IPath path = new Path( info.getFile() );
- label += "at " + ( qualified ? path.toOSString() : path.lastSegment() ) + ":";
+ if ( !path.isEmpty() )
+ label += "at " + ( qualified ? path.toOSString() : path.lastSegment() ) + ":";
}
if ( info.getFrameLineNumber() != 0 )
label += info.getFrameLineNumber();