diff --git a/debug/org.eclipse.cdt.debug.core/ChangeLog b/debug/org.eclipse.cdt.debug.core/ChangeLog index af3efb6f1d8..eb1e4d005e8 100644 --- a/debug/org.eclipse.cdt.debug.core/ChangeLog +++ b/debug/org.eclipse.cdt.debug.core/ChangeLog @@ -1,3 +1,9 @@ +2004-09-07 Alain Magloire + Remove ICDIBreakpointManager.java + * ICDISession.java + * CDIDebugModel.java + * CDebugTarget.java + 2004-09-07 Mikhail Khodjaiants Moved to the new breakpoint management API. * CBreakpointManager.java diff --git a/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/ICDIBreakpointManager.java b/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/ICDIBreakpointManager.java deleted file mode 100644 index 1debf96b432..00000000000 --- a/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/ICDIBreakpointManager.java +++ /dev/null @@ -1,171 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2000, 2004 QNX Software Systems and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Common Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/cpl-v10.html - * - * Contributors: - * QNX Software Systems - Initial API and implementation - *******************************************************************************/ - -package org.eclipse.cdt.debug.core.cdi; - -import org.eclipse.cdt.debug.core.cdi.model.ICDIBreakpoint; -import org.eclipse.cdt.debug.core.cdi.model.ICDICatchpoint; -import org.eclipse.cdt.debug.core.cdi.model.ICDILocationBreakpoint; -import org.eclipse.cdt.debug.core.cdi.model.ICDIWatchpoint; - -/** - * - * The breakpoint manager manages the collection of breakpoints - * in the debug session. - * Auto update is off by default. - * @since Jul 9, 2002 - */ -public interface ICDIBreakpointManager extends ICDIManager { - - /** - * Returns a collection of all breakpoints set for this session. - * Returns an empty array if no breakpoints are set. - * - * @return a collection of all breakpoints set for this session - * @throws CDIException on failure. Reasons include: - */ - ICDIBreakpoint[] getBreakpoints() throws CDIException; - - /** - * Deletes the given breakpoint. - * - * @param breakpoint - a breakpoint to be deleted - * @throws CDIException on failure. Reasons include: - */ - void deleteBreakpoint(ICDIBreakpoint breakpoint) throws CDIException; - - /** - * Deletes the given array of breakpoints. - * - * @param breakpoints - the array of breakpoints to be deleted - * @throws CDIException on failure. Reasons include: - */ - void deleteBreakpoints(ICDIBreakpoint[] breakpoints) throws CDIException; - - /** - * Deletes all breakpoints. - * - * @throws CDIException on failure. Reasons include: - */ - void deleteAllBreakpoints() throws CDIException; - - /** - * Sets a breakpoint at the given location. - * The breakpoint is set acording to the choices: - *
-	 * if location.getFile() != null then
-	 *    if location.getFunction() != null then
-	 *       breakpoint = file:function
-	 *    else
-	 *       breakpoint = file:line
-	 * else if (location.getFuntion() != null) then
-	 *    breakpoint = function
-	 * else if (location.getLineNumber() != 0 then
-	 *    breakpoint = line
-	 * else
-	 *    breakpoint = address
-	 * end
-	 * 
- * @see ICDIBreakpoint.TEMPORARY - * @see ICDIBreakpoint.HARDWARE - * @see ICDIBreakpoint.REGULAR - * - * @param type - a combination of TEMPORARY and HARDWARE or REGULAR - * @param location - the location - * @param condition - the condition or null - * @param threadId - the thread identifier if this is - * a thread-specific breakpoint or null - * @param deferred - when set to true, if the breakpoint fails - * to be set, it is put a deferred list and the debugger will retry to set - * it when a new Shared library is loaded. - * @return a breakpoint - * @throws CDIException on failure. Reasons include: - */ - ICDILocationBreakpoint setLocationBreakpoint( - int type, - ICDILocation location, - ICDICondition condition, - String threadId, boolean deferred) - throws CDIException; - - /** - * Equivalent to : - * setLocationBreakpoint(type, location, condition, threadID, false); - * The breakpoint is not deferred. - * - * @param type - a combination of TEMPORARY and HARDWARE or REGULAR - * @param location - the location - * @param condition - the condition or null - * @param threadId - the thread identifier if this is - * a thread-specific breakpoint or null - * @return a breakpoint - * @throws CDIException on failure. Reasons include: - */ - ICDILocationBreakpoint setLocationBreakpoint( - int type, - ICDILocation location, - ICDICondition condition, - String threadId) - throws CDIException; - - /** - * Sets a watchpoint for the given expression. - * @param type - a combination of TEMPORARY and HARDWARE or 0 - * @param watchType - a combination of READ and WRITE - * @param expression - the expression to watch - * @param condition - the condition or null - * @return a watchpoint - * @throws CDIException on failure. Reasons include: - */ - ICDIWatchpoint setWatchpoint( - int type, - int watchType, - String expression, - ICDICondition condition) - throws CDIException; - - /** - * Sets a catchpoint for the given catch event. - * @param type - a combination of TEMPORARY and HARDWARE or 0 - * @param event - the event to catch - * @param condition - the condition or null - * @return a catchpoint - * @throws CDIException on failure. Reasons include: - */ - ICDICatchpoint setCatchpoint( - int type, - ICDICatchEvent event, - String expression, - ICDICondition condition) - throws CDIException; - - /** - * Allow the manager to interrupt the target - * if when setting the breakopoint the program was running. - */ - void allowProgramInterruption(boolean allow); - - /** - * Return a ICDICondition - */ - ICDICondition createCondition(int ignoreCount, String expression); - - /** - * Returns a ICDILocation - */ - ICDILocation createLocation(String file, String function, int line); - - /** - * Returns a ICDILocation - */ - ICDILocation createLocation(long address); - -} diff --git a/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/ICDISession.java b/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/ICDISession.java index a5d42a7b899..40e950454c8 100644 --- a/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/ICDISession.java +++ b/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/ICDISession.java @@ -60,13 +60,6 @@ public interface ICDISession { */ String getAttribute(String key); - /** - * Returns the breakpoint manager of this debug session. - * - * @return the breakpoint manager - */ - ICDIBreakpointManager getBreakpointManager(); - /** * Returns the signal manager of this debug session. * diff --git a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/CDIDebugModel.java b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/CDIDebugModel.java index a450f6f4fe6..75d19a89fc9 100644 --- a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/CDIDebugModel.java +++ b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/CDIDebugModel.java @@ -552,7 +552,7 @@ public class CDIDebugModel { } protected static void stopInMain( CDebugTarget target ) throws DebugException { - ICDILocation location = target.getCDISession().getBreakpointManager().createLocation( "", "main", 0 ); //$NON-NLS-1$ //$NON-NLS-2$ + ICDILocation location = target.getCDITarget().createLocation( "", "main", 0 ); //$NON-NLS-1$ //$NON-NLS-2$ try { target.setInternalTemporaryBreakpoint( location ); } diff --git a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/model/CDebugTarget.java b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/model/CDebugTarget.java index f2dc7c59f16..411c809c404 100644 --- a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/model/CDebugTarget.java +++ b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/model/CDebugTarget.java @@ -930,7 +930,7 @@ public class CDebugTarget extends CDebugElement implements ICDebugTarget, ICDIEv } final CDebugElementState oldState = getState(); setState( CDebugElementState.RESTARTING ); - ICDILocation location = getCDISession().getBreakpointManager().createLocation( "", "main", 0 ); //$NON-NLS-1$ //$NON-NLS-2$ + ICDILocation location = getCDITarget().createLocation( "", "main", 0 ); //$NON-NLS-1$ //$NON-NLS-2$ setInternalTemporaryBreakpoint( location ); DebugPlugin.getDefault().asyncExec( new Runnable() { @@ -1324,7 +1324,7 @@ public class CDebugTarget extends CDebugElement implements ICDebugTarget, ICDIEv public void setInternalTemporaryBreakpoint( ICDILocation location ) throws DebugException { try { - getCDISession().getBreakpointManager().setLocationBreakpoint( ICDIBreakpoint.TEMPORARY, location, null, null ); + getCDITarget().setLocationBreakpoint( ICDIBreakpoint.TEMPORARY, location, null, null, false ); } catch( CDIException e ) { targetRequestFailed( e.getMessage(), null ); @@ -1348,7 +1348,7 @@ public class CDebugTarget extends CDebugElement implements ICDebugTarget, ICDIEv if ( skipBreakpoints ) { getBreakpointManager().skipBreakpoints( true ); } - ICDILocation location = getCDISession().getBreakpointManager().createLocation( fileName, null, lineNumber ); + ICDILocation location = getCDITarget().createLocation( fileName, null, lineNumber ); try { getCDITarget().runUntil( location ); } @@ -1535,7 +1535,7 @@ public class CDebugTarget extends CDebugElement implements ICDebugTarget, ICDIEv if ( skipBreakpoints ) { getBreakpointManager().skipBreakpoints( true ); } - ICDILocation location = getCDISession().getBreakpointManager().createLocation( address ); + ICDILocation location = getCDITarget().createLocation( address ); try { getCDITarget().runUntil( location ); } @@ -1613,7 +1613,7 @@ public class CDebugTarget extends CDebugElement implements ICDebugTarget, ICDIEv public void jumpToLine( String fileName, int lineNumber ) throws DebugException { if ( !canJumpToLine( fileName, lineNumber ) ) return; - ICDILocation location = getCDISession().getBreakpointManager().createLocation( fileName, null, lineNumber ); + ICDILocation location = getCDITarget().createLocation( fileName, null, lineNumber ); try { getCDITarget().jump( location ); } @@ -1636,7 +1636,7 @@ public class CDebugTarget extends CDebugElement implements ICDebugTarget, ICDIEv public void jumpToAddress( long address ) throws DebugException { if ( !canJumpToAddress( address ) ) return; - ICDILocation location = getCDISession().getBreakpointManager().createLocation( address ); + ICDILocation location = getCDITarget().createLocation( address ); try { getCDITarget().jump( location ); }