mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-06-06 09:16:02 +02:00
Implementation of the handler of 'WatchpointScope' event.
This commit is contained in:
parent
ba07b4e743
commit
c4ec584fc4
2 changed files with 28 additions and 0 deletions
|
@ -1222,6 +1222,15 @@ public class CDebugTarget extends CDebugElement
|
|||
|
||||
private void handleWatchpointScope( ICDIWatchpointScope ws )
|
||||
{
|
||||
CBreakpoint watchpoint = (CBreakpoint)findBreakpoint( ws.getWatchpoint() );
|
||||
try
|
||||
{
|
||||
removeBreakpoint( watchpoint );
|
||||
}
|
||||
catch( DebugException e )
|
||||
{
|
||||
CDebugCorePlugin.log( e );
|
||||
}
|
||||
fireSuspendEvent( DebugEvent.BREAKPOINT );
|
||||
}
|
||||
|
||||
|
@ -1542,4 +1551,18 @@ public class CDebugTarget extends CDebugElement
|
|||
{
|
||||
return (ICDIBreakpoint)getBreakpoints().get( breakpoint );
|
||||
}
|
||||
|
||||
private IBreakpoint findBreakpoint( ICDIBreakpoint cdiBreakpoint )
|
||||
{
|
||||
if ( cdiBreakpoint == null )
|
||||
return null;
|
||||
Iterator it = getBreakpoints().keySet().iterator();
|
||||
while( it.hasNext() )
|
||||
{
|
||||
IBreakpoint breakpoint = (IBreakpoint)it.next();
|
||||
if ( cdiBreakpoint.equals( getBreakpoints().get( breakpoint ) ) )
|
||||
return breakpoint;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -19,6 +19,7 @@ import org.eclipse.cdt.debug.core.IState;
|
|||
import org.eclipse.cdt.debug.core.cdi.ICDIBreakpointHit;
|
||||
import org.eclipse.cdt.debug.core.cdi.ICDIExitInfo;
|
||||
import org.eclipse.cdt.debug.core.cdi.ICDISignal;
|
||||
import org.eclipse.cdt.debug.core.cdi.ICDIWatchpointScope;
|
||||
import org.eclipse.cdt.debug.core.cdi.ICDIWatchpointTrigger;
|
||||
import org.eclipse.cdt.debug.ui.CDebugUIPlugin;
|
||||
import org.eclipse.core.resources.IFile;
|
||||
|
@ -303,6 +304,10 @@ public class CDTDebugModelPresentation extends LabelProvider
|
|||
((ICDIWatchpointTrigger)info).getNewValue() } );
|
||||
return label;
|
||||
}
|
||||
if ( info != null && info instanceof ICDIWatchpointScope )
|
||||
{
|
||||
return target.getName() + " (Watchpoint is out of scope)";
|
||||
}
|
||||
/*
|
||||
if ( info != null && info instanceof ICDIBreakpointHit )
|
||||
{
|
||||
|
|
Loading…
Add table
Reference in a new issue