1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-08-04 14:55:41 +02:00

2004-10-15 Alain Magloire

Adjustment to changes in CDI interface concerning breakpoints.
	Now the thread ids for a breakpoint is specified in the ICDICondition.
	* cdi/org/eclipse/cdt/debug/core/cdi/ICDICondition.java
	* cdi/org/eclipse/cdt/debug/core/cdi/model/ICDIBreakpoint.java
	* cdi/org/eclipse/cdt/debug/core/cdi/model/ICDIBreakpointManagement.java
	* cdi/org/eclipse/cdt/debug/core/cdi/model/ICDITarget.java

	* CBreakpointManager.java
	* CDebugTarget.java
This commit is contained in:
Alain Magloire 2004-10-15 15:48:31 +00:00
parent 262d89c54a
commit f5bde83546
7 changed files with 29 additions and 15 deletions

View file

@ -1,3 +1,14 @@
2004-10-15 Alain Magloire
Adjustment to changes in CDI interface concerning breakpoints.
Now the thread ids for a breakpoint is specified in the ICDICondition.
* cdi/org/eclipse/cdt/debug/core/cdi/ICDICondition.java
* cdi/org/eclipse/cdt/debug/core/cdi/model/ICDIBreakpoint.java
* cdi/org/eclipse/cdt/debug/core/cdi/model/ICDIBreakpointManagement.java
* cdi/org/eclipse/cdt/debug/core/cdi/model/ICDITarget.java
* CBreakpointManager.java
* CDebugTarget.java
2004-10-14 Mikhail Khodjaiants 2004-10-14 Mikhail Khodjaiants
Partial fix for bug 39936 GDB hits modified conditional breakpoints when condition not satisfied. Partial fix for bug 39936 GDB hits modified conditional breakpoints when condition not satisfied.
Condition has to be set at the mi level. Condition has to be set at the mi level.

View file

@ -32,4 +32,10 @@ public interface ICDICondition {
*/ */
int getIgnoreCount(); int getIgnoreCount();
/**
* Returns the thread Ids for this condition.
*
* @return the thread Ids for this condition.
*/
String[] getThreadIds();
} }

View file

@ -81,12 +81,4 @@ public interface ICDIBreakpoint extends ICDIObject {
*/ */
void setCondition( ICDICondition condition ) throws CDIException; void setCondition( ICDICondition condition ) throws CDIException;
/**
* Returns a thread identifier or <code>null</code> is the breakpoint
* is not thread-specific.
*
* @return a thread identifier
* @throws CDIException if this method fails. Reasons include:
*/
String getThreadId() throws CDIException;
} }

View file

@ -24,7 +24,7 @@ public interface ICDIBreakpointManagement {
ICDIBreakpoint[] getBreakpoints() throws CDIException; ICDIBreakpoint[] getBreakpoints() throws CDIException;
ICDILocationBreakpoint setLocationBreakpoint(int type, ICDILocation location, ICDILocationBreakpoint setLocationBreakpoint(int type, ICDILocation location,
ICDICondition condition, String threadId, boolean deferred) throws CDIException; ICDICondition condition, boolean deferred) throws CDIException;
ICDIWatchpoint setWatchpoint(int type, int watchType, String expression, ICDIWatchpoint setWatchpoint(int type, int watchType, String expression,
ICDICondition condition) throws CDIException; ICDICondition condition) throws CDIException;

View file

@ -176,6 +176,11 @@ public interface ICDITarget extends ICDIThreadGroup, ICDISessionObject {
*/ */
ICDICondition createCondition(int ignoreCount, String expression); ICDICondition createCondition(int ignoreCount, String expression);
/**
* Return a ICDICondition
*/
ICDICondition createCondition(int ignoreCount, String expression, String[] threadIds);
/** /**
* Returns a ICDILocation * Returns a ICDILocation
*/ */

View file

@ -496,7 +496,7 @@ public class CBreakpointManager implements IBreakpointManagerListener, ICDIEvent
ICDICondition condition = cdiTarget.createCondition( breakpoint.getIgnoreCount(), breakpoint.getCondition() ); ICDICondition condition = cdiTarget.createCondition( breakpoint.getIgnoreCount(), breakpoint.getCondition() );
ICDIBreakpoint cdiBreakpoint = null; ICDIBreakpoint cdiBreakpoint = null;
synchronized ( getBreakpointMap() ) { synchronized ( getBreakpointMap() ) {
cdiBreakpoint = cdiTarget.setLocationBreakpoint( ICDIBreakpoint.REGULAR, location, condition, null, true ); cdiBreakpoint = cdiTarget.setLocationBreakpoint( ICDIBreakpoint.REGULAR, location, condition, true );
getBreakpointMap().put( breakpoint, cdiBreakpoint ); getBreakpointMap().put( breakpoint, cdiBreakpoint );
} }
return cdiBreakpoint; return cdiBreakpoint;
@ -510,7 +510,7 @@ public class CBreakpointManager implements IBreakpointManagerListener, ICDIEvent
ICDILocation location = cdiTarget.createLocation( new BigInteger ( breakpoint.getAddress().substring( 2 ), 16 ) ); ICDILocation location = cdiTarget.createLocation( new BigInteger ( breakpoint.getAddress().substring( 2 ), 16 ) );
ICDICondition condition = cdiTarget.createCondition( breakpoint.getIgnoreCount(), breakpoint.getCondition() ); ICDICondition condition = cdiTarget.createCondition( breakpoint.getIgnoreCount(), breakpoint.getCondition() );
synchronized ( getBreakpointMap() ) { synchronized ( getBreakpointMap() ) {
cdiBreakpoint = cdiTarget.setLocationBreakpoint( ICDIBreakpoint.REGULAR, location, condition, null, true ); cdiBreakpoint = cdiTarget.setLocationBreakpoint( ICDIBreakpoint.REGULAR, location, condition, true );
getBreakpointMap().put( breakpoint, cdiBreakpoint ); getBreakpointMap().put( breakpoint, cdiBreakpoint );
} }
} }
@ -523,7 +523,7 @@ public class CBreakpointManager implements IBreakpointManagerListener, ICDIEvent
ICDICondition condition = cdiTarget.createCondition( breakpoint.getIgnoreCount(), breakpoint.getCondition() ); ICDICondition condition = cdiTarget.createCondition( breakpoint.getIgnoreCount(), breakpoint.getCondition() );
ICDIBreakpoint cdiBreakpoint = null; ICDIBreakpoint cdiBreakpoint = null;
synchronized ( getBreakpointMap() ) { synchronized ( getBreakpointMap() ) {
cdiBreakpoint = cdiTarget.setLocationBreakpoint( ICDIBreakpoint.REGULAR, location, condition, null, true ); cdiBreakpoint = cdiTarget.setLocationBreakpoint( ICDIBreakpoint.REGULAR, location, condition, true );
getBreakpointMap().put( breakpoint, cdiBreakpoint ); getBreakpointMap().put( breakpoint, cdiBreakpoint );
} }
return cdiBreakpoint; return cdiBreakpoint;

View file

@ -1321,7 +1321,7 @@ public class CDebugTarget extends CDebugElement implements ICDebugTarget, ICDIEv
public void setInternalTemporaryBreakpoint( ICDILocation location ) throws DebugException { public void setInternalTemporaryBreakpoint( ICDILocation location ) throws DebugException {
try { try {
getCDITarget().setLocationBreakpoint( ICDIBreakpoint.TEMPORARY, location, null, null, false ); getCDITarget().setLocationBreakpoint( ICDIBreakpoint.TEMPORARY, location, null, false );
} }
catch( CDIException e ) { catch( CDIException e ) {
targetRequestFailed( e.getMessage(), null ); targetRequestFailed( e.getMessage(), null );