1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-07-24 09:25:31 +02:00

2004-09-07 Alain Magloire

Remove ICDIBreakpointManager.java
	* ICDISession.java
	* CDIDebugModel.java
	* CDebugTarget.java
This commit is contained in:
Alain Magloire 2004-09-08 01:26:23 +00:00
parent 100265971d
commit e79e4382b4
5 changed files with 13 additions and 185 deletions

View file

@ -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

View file

@ -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:
* <pre>
* 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
* </pre>
* @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 <code>null</code>
* @param threadId - the thread identifier if this is
* a thread-specific breakpoint or <code>null</code>
* @param deferred - when set to <code>true</code>, 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 <code>null</code>
* @param threadId - the thread identifier if this is
* a thread-specific breakpoint or <code>null</code>
* @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 <code>null</code>
* @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 <code>null</code>
* @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);
}

View file

@ -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.
*

View file

@ -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 );
}

View file

@ -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 );
}