1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-04-29 19:45:01 +02:00

Apply the breakpoint's condition changes to the associated gdb breakpoint only if there are differences.

This commit is contained in:
Mikhail Khodjaiants 2004-11-12 19:25:28 +00:00
parent 5e2af5b84f
commit 0b13d54499
2 changed files with 19 additions and 9 deletions

View file

@ -1,3 +1,8 @@
2004-11-12 Mikhail Khodjaiants
Apply the breakpoint's condition changes to the associated gdb breakpoint
only if there are differences.
* CBreakpointManager.java
2004-11-12 Mikhail Khodjaiants 2004-11-12 Mikhail Khodjaiants
Compare breakpoint source handles as pathes. Compare breakpoint source handles as pathes.
* CDIDebugModel.java * CDIDebugModel.java

View file

@ -353,7 +353,7 @@ public class CBreakpointManager implements IBreakpointManagerListener, ICDIEvent
String condition = breakpoint.getCondition(); String condition = breakpoint.getCondition();
String oldCondition = ( delta != null ) ? delta.getAttribute( ICBreakpoint.CONDITION, "" ) : condition; //$NON-NLS-1$ String oldCondition = ( delta != null ) ? delta.getAttribute( ICBreakpoint.CONDITION, "" ) : condition; //$NON-NLS-1$
String[] newThreadIs = getThreadNames( breakpoint ); String[] newThreadIs = getThreadNames( breakpoint );
if ( enabled != oldEnabled ) { if ( enabled != oldEnabled && enabled != cdiBreakpoint.isEnabled() ) {
DebugPlugin.getDefault().asyncExec( new Runnable() { DebugPlugin.getDefault().asyncExec( new Runnable() {
public void run() { public void run() {
try { try {
@ -366,20 +366,25 @@ public class CBreakpointManager implements IBreakpointManagerListener, ICDIEvent
} }
if ( ignoreCount != oldIgnoreCount || condition.compareTo( oldCondition ) != 0 || areThreadFiltersChanged( newThreadIs, cdiBreakpoint ) ) { if ( ignoreCount != oldIgnoreCount || condition.compareTo( oldCondition ) != 0 || areThreadFiltersChanged( newThreadIs, cdiBreakpoint ) ) {
final ICDICondition cdiCondition = cdiTarget.createCondition( ignoreCount, condition, newThreadIs ); final ICDICondition cdiCondition = cdiTarget.createCondition( ignoreCount, condition, newThreadIs );
DebugPlugin.getDefault().asyncExec( new Runnable() { if ( ! cdiCondition.equals( cdiBreakpoint.getCondition() ) ) {
public void run() { DebugPlugin.getDefault().asyncExec( new Runnable() {
try { public void run() {
cdiBreakpoint.setCondition( cdiCondition ); try {
cdiBreakpoint.setCondition( cdiCondition );
}
catch( CDIException e ) {
}
} }
catch( CDIException e ) { } );
} }
}
} );
} }
} }
catch( CoreException e ) { catch( CoreException e ) {
requestFailed( MessageFormat.format( InternalDebugCoreMessages.getString( "CBreakpointManager.4" ), new String[] { e.getMessage() } ), e ); //$NON-NLS-1$ requestFailed( MessageFormat.format( InternalDebugCoreMessages.getString( "CBreakpointManager.4" ), new String[] { e.getMessage() } ), e ); //$NON-NLS-1$
} }
catch( CDIException e ) {
requestFailed( MessageFormat.format( InternalDebugCoreMessages.getString( "CBreakpointManager.4" ), new String[] { e.getMessage() } ), e ); //$NON-NLS-1$
}
} }
private void handleBreakpointCreatedEvent( final ICDIBreakpoint cdiBreakpoint ) { private void handleBreakpointCreatedEvent( final ICDIBreakpoint cdiBreakpoint ) {