Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[cdt-patch] Managing breakpoints from the gdb console (fixes)

Index: ChangeLog
===================================================================
RCS file: /home/tools/org.eclipse.cdt.debug.core/ChangeLog,v
retrieving revision 1.113
diff -u -r1.113 ChangeLog
--- ChangeLog 29 Jan 2003 19:13:16 -0000 1.113
+++ ChangeLog 29 Jan 2003 22:17:30 -0000
@@ -1,3 +1,13 @@
+2003-01-29 Mikhail Khodjaiants
+ Managing breakpoints from the gdb console (fixes).
+ * CDebugModel.java
+ * CAddressBreakpoint.java
+ * CBreakpoint.java
+ * CFunctionBreakpoint.java
+ * CLineBreakpoint.java
+ * CWatchpoint.java
+ * CDebugTarget.java

 2003-01-29 Alain Magloire
 
  * src/org/eclipse/cdt/debug/core/cdi/model/ICDISharedLibraryManger.java (getSharedLibraryPaths):
Index: CDebugTarget.java
===================================================================
RCS file: /home/tools/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/model/CDebugTarget.java,v
retrieving revision 1.76
diff -u -r1.76 CDebugTarget.java
--- CDebugTarget.java 27 Jan 2003 22:28:13 -0000 1.76
+++ CDebugTarget.java 29 Jan 2003 22:17:47 -0000
@@ -9,6 +9,7 @@
 import java.util.HashMap;
 import java.util.Iterator;
 import java.util.List;
+import java.util.Map;
 import java.util.StringTokenizer;
 
 import org.eclipse.cdt.core.CCorePlugin;
@@ -74,7 +75,6 @@
 import org.eclipse.cdt.debug.internal.core.CSharedLibraryManager;
 import org.eclipse.cdt.debug.internal.core.ICDebugInternalConstants;
 import org.eclipse.cdt.debug.internal.core.breakpoints.CBreakpoint;
-import org.eclipse.cdt.debug.internal.core.breakpoints.CWatchpoint;
 import org.eclipse.cdt.debug.internal.core.sourcelookup.CSourceManager;
 import org.eclipse.cdt.debug.internal.core.sourcelookup.DisassemblyManager;
 import org.eclipse.core.resources.IFile;
@@ -264,7 +264,7 @@
   setName( name );
   setProcesses( debuggeeProcess, debuggerProcess );
   setCDITarget( cdiTarget );
-  initializeBreakpoints( new HashMap( 5 ) );
+  initializeBreakpointMap( new HashMap( 5 ) );
   setExecFile( file );
   setConfiguration( cdiTarget.getSession().getConfiguration() );
   fSupportsTerminate = allowsTerminate & getConfiguration().supportsTerminate();
@@ -286,13 +286,19 @@
  {
   initializeState();
   setSourceSearchPath();
-  setBreakpoints();
+  initializeBreakpoints();
   initializeRegisters();
   initializeMemoryManager();
   getLaunch().addDebugTarget( this );
   fireCreationEvent();
  }
 
+ private void initializeBreakpoints()
+ {
+  DebugPlugin.getDefault().getBreakpointManager().addBreakpointListener( this );
+  setBreakpoints();
+ }
+
  /**
   * Adds all of the pre-existing threads to this debug target.
   *
@@ -322,7 +328,6 @@
   if ( getRetryBreakpoints() )
   {
    IBreakpointManager manager = DebugPlugin.getDefault().getBreakpointManager();
-   manager.addBreakpointListener( this );
    IBreakpoint[] bps = (IBreakpoint[])manager.getBreakpoints( CDebugModel.getPluginIdentifier() );
    for ( int i = 0; i < bps.length; i++ )
    {
@@ -964,6 +969,10 @@
     {
      getSharedLibraryManager().symbolsLoaded( (ICDISharedLibrary)source );
     }
+    if ( source instanceof ICDIBreakpoint )
+    {
+     handleBreakpointChangedEvent( (ICDIBreakpoint)source );
+    }
    }
    else if ( event instanceof ICDIRestartedEvent )
    {
@@ -1484,49 +1493,50 @@
          {
           doHandleLocationBreakpointCreatedEvent( breakpoint );
          }
-
         };
   CDebugCorePlugin.getDefault().asyncExec( runnable );
  }
 
- protected void doHandleLocationBreakpointCreatedEvent( ICDILocationBreakpoint breakpoint )
+ protected void doHandleLocationBreakpointCreatedEvent( final ICDILocationBreakpoint cdiBreakpoint )
  {
-  if ( breakpoint.isTemporary() || getBreakpoints().containsValue( breakpoint ) )
+  if ( cdiBreakpoint.isTemporary() || getBreakpoints().containsValue( cdiBreakpoint ) )
    return;
   try
   {
-   if ( breakpoint.getLocation().getFile() != null && breakpoint.getLocation().getFile().length() > 0 )
+   if ( cdiBreakpoint.getLocation().getFile() != null && cdiBreakpoint.getLocation().getFile().length() > 0 )
    {
     if ( getSourceLocator() instanceof IAdaptable && ((IAdaptable)getSourceLocator()).getAdapter( ICSourceLocator.class ) != null )
     {
-     Object sourceElement = ((ICSourceLocator)((IAdaptable)getSourceLocator()).getAdapter( ICSourceLocator.class )).findSourceElement( breakpoint.getLocation().getFile() );
+     Object sourceElement = ((ICSourceLocator)((IAdaptable)getSourceLocator()).getAdapter( ICSourceLocator.class )).findSourceElement( cdiBreakpoint.getLocation().getFile() );
      if ( sourceElement != null && sourceElement instanceof IFile )
      {
-      CDebugModel.createLineBreakpoint( (IFile)sourceElement,
-                breakpoint.getLocation().getLineNumber(),
-                breakpoint.isEnabled(),
-                breakpoint.getCondition().getIgnoreCount(),
-                breakpoint.getCondition().getExpression(),
-                breakpoint,
-                true );
+      ICLineBreakpoint breakpoint = CDebugModel.createLineBreakpoint( (IFile)sourceElement,
+                      cdiBreakpoint.getLocation().getLineNumber(),
+                      cdiBreakpoint.isEnabled(),
+                      cdiBreakpoint.getCondition().getIgnoreCount(),
+                      cdiBreakpoint.getCondition().getExpression(),
+                      false );
+      getBreakpoints().put( breakpoint, cdiBreakpoint );
+      ((CBreakpoint)breakpoint).register( true );
      }
     }
    }
-   else if ( breakpoint.getLocation().getAddress() > 0 )
+   else if ( cdiBreakpoint.getLocation().getAddress() > 0 )
    {
-    CDebugModel.createAddressBreakpoint( getExecFile(),
-                breakpoint.getLocation().getAddress(),
-                breakpoint.isEnabled(),
-                breakpoint.getCondition().getIgnoreCount(),
-                breakpoint.getCondition().getExpression(),
-                breakpoint,
-                true );
+    ICAddressBreakpoint breakpoint = CDebugModel.createAddressBreakpoint( getExecFile(),
+                       cdiBreakpoint.getLocation().getAddress(),
+                       cdiBreakpoint.isEnabled(),
+                       cdiBreakpoint.getCondition().getIgnoreCount(),
+                       cdiBreakpoint.getCondition().getExpression(),
+                       false );
+    getBreakpoints().put( breakpoint, cdiBreakpoint );
+    ((CBreakpoint)breakpoint).register( true );
    }
   }
   catch( CDIException e )
   {
   }
-  catch( DebugException e )
+  catch( CoreException e )
   {
   }
  }
@@ -1544,26 +1554,27 @@
   CDebugCorePlugin.getDefault().asyncExec( runnable );
  }
 
- protected void doHandleWatchpointCreatedEvent( ICDIWatchpoint watchpoint )
+ protected void doHandleWatchpointCreatedEvent( ICDIWatchpoint cdiWatchpoint )
  {
-  if ( getBreakpoints().containsValue( watchpoint ) )
+  if ( getBreakpoints().containsValue( cdiWatchpoint ) )
    return;
   try
   {
-   CDebugModel.createWatchpoint( getExecFile().getProject(),
-            watchpoint.isWriteType(),
-            watchpoint.isReadType(),
-            watchpoint.getWatchExpression(),
-            watchpoint.isEnabled(),
-              watchpoint.getCondition().getIgnoreCount(),
-              watchpoint.getCondition().getExpression(),
-              watchpoint,
-              true );
+   ICWatchpoint watchpoint = CDebugModel.createWatchpoint( getExecFile().getProject(),
+                 cdiWatchpoint.isWriteType(),
+                 cdiWatchpoint.isReadType(),
+                 cdiWatchpoint.getWatchExpression(),
+                 cdiWatchpoint.isEnabled(),
+                   cdiWatchpoint.getCondition().getIgnoreCount(),
+                 cdiWatchpoint.getCondition().getExpression(),
+                 false );
+   getBreakpoints().put( watchpoint, cdiWatchpoint );
+   ((CBreakpoint)watchpoint).register( true );
   }
   catch( CDIException e )
   {
   }
-  catch( DebugException e )
+  catch( CoreException e )
   {
   }
  }
@@ -1596,6 +1607,41 @@
   }
  }
 
+ private void handleBreakpointChangedEvent( final ICDIBreakpoint breakpoint )
+ {
+  Runnable runnable = new Runnable()
+        {
+         public void run()
+         {
+          doHandleBreakpointChangedEvent( breakpoint );
+         }
+
+        };
+  CDebugCorePlugin.getDefault().asyncExec( runnable );
+ }
+
+ protected void doHandleBreakpointChangedEvent( ICDIBreakpoint cdiBreakpoint )
+ {
+  IBreakpoint breakpoint = findBreakpoint( cdiBreakpoint );
+  if ( breakpoint instanceof ICBreakpoint )
+  {
+   try
+   {
+    Map attributes = breakpoint.getMarker().getAttributes();
+    attributes.put( ICBreakpoint.ENABLED, new Boolean( cdiBreakpoint.isEnabled() ) );
+    attributes.put( ICBreakpoint.IGNORE_COUNT, new Integer( cdiBreakpoint.getCondition().getIgnoreCount() ) );
+    attributes.put( ICBreakpoint.CONDITION, cdiBreakpoint.getCondition().getExpression() );
+    breakpoint.getMarker().setAttributes( attributes );
+   }
+   catch( CDIException e )
+   {
+   }
+   catch( CoreException e )
+   {
+   }
+  }
+ }
+
  /**
   * Finds and returns the model thread for the associated CDI thread,
   * or <code>null</code> if not found.
@@ -1721,7 +1767,7 @@
   *
   * @param breakpoints breakpoints map
   */
- private void initializeBreakpoints( HashMap breakpoints )
+ private void initializeBreakpointMap( HashMap breakpoints )
  {
   fBreakpoints = breakpoints;
  }
@@ -1750,14 +1796,10 @@
  {
   try
   {
-   ICDIBreakpoint cdiBreakpoint = ((CBreakpoint)breakpoint).getExternalBreakpoint();
+   ICDIBreakpoint cdiBreakpoint = (ICDIBreakpoint)getBreakpoints().get( breakpoint );
    if ( cdiBreakpoint == null )
    {
-    setLineBreakpoint0( breakpoint );
-   }
-   else
-   {
-    getBreakpoints().put( breakpoint, cdiBreakpoint );
+    cdiBreakpoint = setLineBreakpoint0( breakpoint );
    }
    ((CBreakpoint)breakpoint).incrementInstallCount();
    if ( !breakpoint.isEnabled() )
@@ -1775,27 +1817,24 @@
   }
  }
 
- private synchronized void setLineBreakpoint0( ICLineBreakpoint breakpoint ) throws CDIException, CoreException
+ private synchronized ICDIBreakpoint setLineBreakpoint0( ICLineBreakpoint breakpoint ) throws CDIException, CoreException
  {
   ICDIBreakpointManager bm = getCDISession().getBreakpointManager();
   ICDILocation location = bm.createLocation( breakpoint.getMarker().getResource().getLocation().lastSegment(), null, breakpoint.getLineNumber() );
   ICDICondition condition = bm.createCondition( breakpoint.getIgnoreCount(), breakpoint.getCondition() );
   ICDIBreakpoint cdiBreakpoint = bm.setLocationBreakpoint( ICDIBreakpoint.REGULAR, location, condition, null );
   getBreakpoints().put( breakpoint, cdiBreakpoint );
+  return cdiBreakpoint;
  }
  
  private void setAddressBreakpoint( ICAddressBreakpoint breakpoint ) throws DebugException
  {
   try
   {
-   ICDIBreakpoint cdiBreakpoint = ((CBreakpoint)breakpoint).getExternalBreakpoint();
+   ICDIBreakpoint cdiBreakpoint = (ICDIBreakpoint)getBreakpoints().get( breakpoint );
    if ( cdiBreakpoint == null )
    {
-    setAddressBreakpoint0( breakpoint );
-   }
-   else
-   {
-    getBreakpoints().put( breakpoint, cdiBreakpoint );
+    cdiBreakpoint = setAddressBreakpoint0( breakpoint );
    }
    ((CBreakpoint)breakpoint).incrementInstallCount();
    if ( !breakpoint.isEnabled() )
@@ -1817,27 +1856,24 @@
   }
  }
   
- private synchronized void setAddressBreakpoint0( ICAddressBreakpoint breakpoint ) throws CDIException, CoreException
+ private synchronized ICDIBreakpoint setAddressBreakpoint0( ICAddressBreakpoint breakpoint ) throws CDIException, CoreException
  {
   ICDIBreakpointManager bm = getCDISession().getBreakpointManager();
   ICDILocation location = bm.createLocation( Long.parseLong( breakpoint.getAddress() ) );
   ICDICondition condition = bm.createCondition( breakpoint.getIgnoreCount(), breakpoint.getCondition() );
   ICDIBreakpoint cdiBreakpoint = bm.setLocationBreakpoint( ICDIBreakpoint.REGULAR, location, condition, null );
   getBreakpoints().put( breakpoint, cdiBreakpoint );
+  return cdiBreakpoint;
  }
  
  private void setWatchpoint( ICWatchpoint watchpoint ) throws DebugException
  {
   try
   {
-   ICDIWatchpoint cdiWatchpoint = (ICDIWatchpoint)((CWatchpoint)watchpoint).getExternalBreakpoint();
+   ICDIWatchpoint cdiWatchpoint = (ICDIWatchpoint)getBreakpoints().get( watchpoint );
    if ( cdiWatchpoint == null )
    {
-    setWatchpoint0( watchpoint );
-   }
-   else
-   {
-    getBreakpoints().put( watchpoint, cdiWatchpoint );
+    cdiWatchpoint = setWatchpoint0( watchpoint );
    }
    ((CBreakpoint)watchpoint).incrementInstallCount();
    if ( !watchpoint.isEnabled() )
@@ -1855,7 +1891,7 @@
   }
  }
  
- private synchronized void setWatchpoint0( ICWatchpoint watchpoint ) throws CDIException, CoreException
+ private synchronized ICDIWatchpoint setWatchpoint0( ICWatchpoint watchpoint ) throws CDIException, CoreException
  {
   ICDIBreakpointManager bm = getCDISession().getBreakpointManager();
   ICDICondition condition = bm.createCondition( watchpoint.getIgnoreCount(), watchpoint.getCondition() );
@@ -1865,6 +1901,7 @@
   String _expression_ = watchpoint.getExpression();
   ICDIWatchpoint cdiWatchpoint = bm.setWatchpoint( ICDIBreakpoint.REGULAR, accessType, _expression_, condition );
   getBreakpoints().put( watchpoint, cdiWatchpoint );
+  return cdiWatchpoint;
  }
  
  private ICDIBreakpoint findCDIBreakpoint( IBreakpoint breakpoint )
Index: CAddressBreakpoint.java
===================================================================
RCS file: /home/tools/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/breakpoints/CAddressBreakpoint.java,v
retrieving revision 1.6
diff -u -r1.6 CAddressBreakpoint.java
--- CAddressBreakpoint.java 27 Jan 2003 22:28:13 -0000 1.6
+++ CAddressBreakpoint.java 29 Jan 2003 22:18:03 -0000
@@ -7,7 +7,6 @@
 
 import java.util.Map;
 
-import org.eclipse.cdt.debug.core.cdi.model.ICDIBreakpoint;
 import org.eclipse.cdt.debug.core.model.ICAddressBreakpoint;
 import org.eclipse.core.resources.IMarker;
 import org.eclipse.core.resources.IResource;
@@ -37,14 +36,6 @@
  public CAddressBreakpoint( IResource resource, Map attributes, boolean add ) throws DebugException
  {
   super( resource, getMarkerType(), attributes, add );
- }
-
- /**
-  * Constructor for CAddressBreakpoint.
-  */
- public CAddressBreakpoint( IResource resource, Map attributes, ICDIBreakpoint cdiBreakpoint, boolean add ) throws DebugException
- {
-  super( resource, getMarkerType(), attributes, cdiBreakpoint, add );
  }
 
  /* (non-Javadoc)
Index: CBreakpoint.java
===================================================================
RCS file: /home/tools/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/breakpoints/CBreakpoint.java,v
retrieving revision 1.10
diff -u -r1.10 CBreakpoint.java
--- CBreakpoint.java 27 Jan 2003 22:28:13 -0000 1.10
+++ CBreakpoint.java 29 Jan 2003 22:18:03 -0000
@@ -9,7 +9,6 @@
 import java.util.Map;
 
 import org.eclipse.cdt.debug.core.CDebugModel;
-import org.eclipse.cdt.debug.core.cdi.model.ICDIBreakpoint;
 import org.eclipse.cdt.debug.core.model.ICBreakpoint;
 import org.eclipse.core.resources.IMarker;
 import org.eclipse.core.resources.IResource;
@@ -34,12 +33,6 @@
               IDebugEventSetListener
 {
  /**
-  * This field is used to pass a CDI breakpoint to the target if the breakpoint
-  * is created in gdb console.
-  */
- private ICDIBreakpoint fExternalBreakpoint = null;
-
- /**
   * Constructor for CBreakpoint.
   */
  public CBreakpoint()
@@ -71,12 +64,8 @@
   run( wr );
  }
 
- /**
-  * Constructor for CBreakpoint.
-  */
- public CBreakpoint( final IResource resource, final String markerType, final Map attributes, final ICDIBreakpoint cdiBreakpoint, final boolean add ) throws DebugException
+ public void createMarker( final IResource resource, final String markerType, final Map attributes, final boolean add ) throws DebugException
  {
-  setExternalBreakpoint( cdiBreakpoint );
   IWorkspaceRunnable wr= new IWorkspaceRunnable()
          {
           public void run( IProgressMonitor monitor ) throws CoreException
@@ -187,16 +176,18 @@
   * Add this breakpoint to the breakpoint manager,
   * or sets it as unregistered.
   */
- protected void register( boolean register ) throws CoreException
+ public void register( boolean register ) throws CoreException
  {
   if ( register )
   {
    DebugPlugin.getDefault().getBreakpointManager().addBreakpoint( this );
   }
+/*
   else
   {
    setRegistered( false );
   }
+*/
  }
 
  protected String getMarkerMessage() throws CoreException
@@ -256,15 +247,5 @@
  protected void setAttribute( String attributeName, Object value ) throws CoreException
  {
   super.setAttribute( attributeName, value );
- }

- public ICDIBreakpoint getExternalBreakpoint()
- {
-  return fExternalBreakpoint;
- }

- public void setExternalBreakpoint( ICDIBreakpoint cdiBreakpoint )
- {
-  fExternalBreakpoint = cdiBreakpoint;
  }
 }
Index: CFunctionBreakpoint.java
===================================================================
RCS file: /home/tools/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/breakpoints/CFunctionBreakpoint.java,v
retrieving revision 1.6
diff -u -r1.6 CFunctionBreakpoint.java
--- CFunctionBreakpoint.java 27 Jan 2003 22:28:13 -0000 1.6
+++ CFunctionBreakpoint.java 29 Jan 2003 22:18:03 -0000
@@ -7,7 +7,6 @@
 
 import java.util.Map;
 
-import org.eclipse.cdt.debug.core.cdi.model.ICDIBreakpoint;
 import org.eclipse.cdt.debug.core.model.ICFunctionBreakpoint;
 import org.eclipse.core.resources.IMarker;
 import org.eclipse.core.resources.IResource;
@@ -44,14 +43,6 @@
  public CFunctionBreakpoint( IResource resource, Map attributes, boolean add ) throws DebugException
  {
   super( resource, getMarkerType(), attributes, add );
- }
-
- /**
-  * Constructor for CFunctionBreakpoint.
-  */
- public CFunctionBreakpoint( IResource resource, Map attributes, ICDIBreakpoint cdiBreakpoint, boolean add ) throws DebugException
- {
-  super( resource, getMarkerType(), attributes, cdiBreakpoint, add );
  }
 
  /* (non-Javadoc)
Index: CLineBreakpoint.java
===================================================================
RCS file: /home/tools/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/breakpoints/CLineBreakpoint.java,v
retrieving revision 1.6
diff -u -r1.6 CLineBreakpoint.java
--- CLineBreakpoint.java 27 Jan 2003 22:28:13 -0000 1.6
+++ CLineBreakpoint.java 29 Jan 2003 22:18:03 -0000
@@ -7,7 +7,6 @@
 
 import java.util.Map;
 
-import org.eclipse.cdt.debug.core.cdi.model.ICDIBreakpoint;
 import org.eclipse.cdt.debug.core.model.ICLineBreakpoint;
 import org.eclipse.core.resources.IMarker;
 import org.eclipse.core.resources.IResource;
@@ -37,14 +36,6 @@
  public CLineBreakpoint( IResource resource, Map attributes, boolean add ) throws DebugException
  {
   super( resource, getMarkerType(), attributes, add );
- }
-
- /**
-  * Constructor for CLineBreakpoint.
-  */
- public CLineBreakpoint( IResource resource, Map attributes, ICDIBreakpoint cdiBreakpoint, boolean add ) throws DebugException
- {
-  super( resource, getMarkerType(), attributes, cdiBreakpoint, add );
  }
 
  /* (non-Javadoc)
Index: CWatchpoint.java
===================================================================
RCS file: /home/tools/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/breakpoints/CWatchpoint.java,v
retrieving revision 1.3
diff -u -r1.3 CWatchpoint.java
--- CWatchpoint.java 27 Jan 2003 22:28:13 -0000 1.3
+++ CWatchpoint.java 29 Jan 2003 22:18:03 -0000
@@ -7,7 +7,6 @@
 
 import java.util.Map;
 
-import org.eclipse.cdt.debug.core.cdi.model.ICDIWatchpoint;
 import org.eclipse.cdt.debug.core.model.ICWatchpoint;
 import org.eclipse.core.resources.IResource;
 import org.eclipse.core.runtime.CoreException;
@@ -36,14 +35,6 @@
  public CWatchpoint( IResource resource, Map attributes, boolean add ) throws DebugException
  {
   super( resource, getMarkerType(), attributes, add );
- }
-
- /**
-  * Constructor for CWatchpoint.
-  */
- public CWatchpoint( IResource resource, Map attributes, ICDIWatchpoint watchpoint, boolean add ) throws DebugException
- {
-  super( resource, getMarkerType(), attributes, watchpoint, add );
  }
 
  /* (non-Javadoc)
Index: CDebugModel.java
===================================================================
RCS file: /home/tools/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/CDebugModel.java,v
retrieving revision 1.40
diff -u -r1.40 CDebugModel.java
--- CDebugModel.java 27 Jan 2003 22:28:13 -0000 1.40
+++ CDebugModel.java 29 Jan 2003 22:18:25 -0000
@@ -14,12 +14,10 @@
 import org.eclipse.cdt.debug.core.cdi.ICDILocation;
 import org.eclipse.cdt.debug.core.cdi.ICDISessionObject;
 import org.eclipse.cdt.debug.core.cdi.event.ICDISuspendedEvent;
-import org.eclipse.cdt.debug.core.cdi.model.ICDIBreakpoint;
 import org.eclipse.cdt.debug.core.cdi.model.ICDIExpression;
 import org.eclipse.cdt.debug.core.cdi.model.ICDIMemoryBlock;
 import org.eclipse.cdt.debug.core.cdi.model.ICDIObject;
 import org.eclipse.cdt.debug.core.cdi.model.ICDITarget;
-import org.eclipse.cdt.debug.core.cdi.model.ICDIWatchpoint;
 import org.eclipse.cdt.debug.core.model.ICAddressBreakpoint;
 import org.eclipse.cdt.debug.core.model.ICBreakpoint;
 import org.eclipse.cdt.debug.core.model.ICDebugTargetType;
@@ -309,23 +307,6 @@
   return new CLineBreakpoint( resource, attributes, add );
  }
 
- public static ICLineBreakpoint createLineBreakpoint( IResource resource,
-               int lineNumber,
-               boolean enabled,
-               int ignoreCount,
-               String condition,
-               ICDIBreakpoint cdiBreakpoint,
-               boolean add ) throws DebugException
- {
-  HashMap attributes = new HashMap( 10 );
-  attributes.put( ICBreakpoint.ID, getPluginIdentifier() );
-  attributes.put( IMarker.LINE_NUMBER, new Integer( lineNumber ) );
-  attributes.put( ICBreakpoint.ENABLED, new Boolean( enabled ) );
-  attributes.put( ICBreakpoint.IGNORE_COUNT, new Integer( ignoreCount ) );
-  attributes.put( ICBreakpoint.CONDITION, condition );
-  return new CLineBreakpoint( resource, attributes, cdiBreakpoint, add );
- }
-
  public static ICAddressBreakpoint addressBreakpointExists( IResource resource, long address ) throws CoreException
  {
   String modelId = getPluginIdentifier();
@@ -378,26 +359,6 @@
   return new CAddressBreakpoint( resource, attributes, add );
  }
 
- public static ICAddressBreakpoint createAddressBreakpoint( IResource resource,
-                  long address,
-                  boolean enabled,
-                  int ignoreCount,
-                  String condition,
-                  ICDIBreakpoint breakpoint,
-                  boolean add ) throws DebugException
- {
-  HashMap attributes = new HashMap( 10 );
-  attributes.put( ICBreakpoint.ID, getPluginIdentifier() );
-  attributes.put( IMarker.CHAR_START, new Integer( 0 ) );
-  attributes.put( IMarker.CHAR_END, new Integer( 0 ) );
-  attributes.put( IMarker.LINE_NUMBER, new Integer( -1 ) );
-  attributes.put( ICAddressBreakpoint.ADDRESS, Long.toString( address ) );
-  attributes.put( ICBreakpoint.ENABLED, new Boolean( enabled ) );
-  attributes.put( ICBreakpoint.IGNORE_COUNT, new Integer( ignoreCount ) );
-  attributes.put( ICBreakpoint.CONDITION, condition );
-  return new CAddressBreakpoint( resource, attributes, breakpoint, add );
- }
-
  public static ICWatchpoint watchpointExists( IResource resource, boolean write, boolean read, String _expression_ ) throws CoreException
  {
   String modelId = getPluginIdentifier();
@@ -441,27 +402,6 @@
   attributes.put( ICWatchpoint.READ, new Boolean( readAccess ) );
   attributes.put( ICWatchpoint.WRITE, new Boolean( writeAccess ) );
   return new CWatchpoint( resource, attributes, add );
- }

- public static ICWatchpoint createWatchpoint( IResource resource,
-             boolean writeAccess,
-             boolean readAccess,
-             String _expression_,
-             boolean enabled,
-             int ignoreCount,
-             String condition,
-             ICDIWatchpoint watchpoint,
-             boolean add ) throws DebugException
- {
-  HashMap attributes = new HashMap( 10 );
-  attributes.put( ICBreakpoint.ID, getPluginIdentifier() );
-  attributes.put( ICBreakpoint.ENABLED, new Boolean( enabled ) );
-  attributes.put( ICBreakpoint.IGNORE_COUNT, new Integer( ignoreCount ) );
-  attributes.put( ICBreakpoint.CONDITION, condition );
-  attributes.put( ICWatchpoint._expression_, _expression_ );
-  attributes.put( ICWatchpoint.READ, new Boolean( readAccess ) );
-  attributes.put( ICWatchpoint.WRITE, new Boolean( writeAccess ) );
-  return new CWatchpoint( resource, attributes, watchpoint, add );
  }
  
  public static IExpression createExpression( IDebugTarget target, String text ) throws DebugException

Back to the top