mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-23 22:52:11 +02:00
Added handles for watchpoint events.
This commit is contained in:
parent
7bb306e845
commit
128f28c57c
2 changed files with 30 additions and 1 deletions
|
@ -30,6 +30,8 @@ import org.eclipse.cdt.debug.core.cdi.ICDIEndSteppingRange;
|
|||
import org.eclipse.cdt.debug.core.cdi.ICDILocation;
|
||||
import org.eclipse.cdt.debug.core.cdi.ICDISessionObject;
|
||||
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.core.cdi.event.ICDIChangedEvent;
|
||||
import org.eclipse.cdt.debug.core.cdi.event.ICDICreatedEvent;
|
||||
import org.eclipse.cdt.debug.core.cdi.event.ICDIDestroyedEvent;
|
||||
|
@ -1166,6 +1168,14 @@ public class CDebugTarget extends CDebugElement
|
|||
{
|
||||
handleSuspendedBySignal( (ICDISignal)reason );
|
||||
}
|
||||
else if ( reason instanceof ICDIWatchpointTrigger )
|
||||
{
|
||||
handleWatchpointTrigger( (ICDIWatchpointTrigger)reason );
|
||||
}
|
||||
else if ( reason instanceof ICDIWatchpointScope )
|
||||
{
|
||||
handleWatchpointScope( (ICDIWatchpointScope)reason );
|
||||
}
|
||||
}
|
||||
|
||||
private void handleResumedEvent( ICDIResumedEvent event )
|
||||
|
@ -1204,6 +1214,16 @@ public class CDebugTarget extends CDebugElement
|
|||
{
|
||||
fireSuspendEvent( DebugEvent.BREAKPOINT );
|
||||
}
|
||||
|
||||
private void handleWatchpointTrigger( ICDIWatchpointTrigger wt )
|
||||
{
|
||||
fireSuspendEvent( DebugEvent.BREAKPOINT );
|
||||
}
|
||||
|
||||
private void handleWatchpointScope( ICDIWatchpointScope ws )
|
||||
{
|
||||
fireSuspendEvent( DebugEvent.BREAKPOINT );
|
||||
}
|
||||
|
||||
private void handleSuspendedBySignal( ICDISignal signal )
|
||||
{
|
||||
|
|
|
@ -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.ICDIWatchpointTrigger;
|
||||
import org.eclipse.cdt.debug.ui.CDebugUIPlugin;
|
||||
import org.eclipse.core.resources.IFile;
|
||||
import org.eclipse.core.resources.IMarker;
|
||||
|
@ -290,10 +291,18 @@ public class CDTDebugModelPresentation extends LabelProvider
|
|||
if ( info != null && info instanceof ICDISignal )
|
||||
{
|
||||
String label = target.getName() +
|
||||
MessageFormat.format( " (Signal \'{0}\' received. Meaning: {1})",
|
||||
MessageFormat.format( " (Signal ''{0}'' received. Meaning: {1})",
|
||||
new String[] { ((ICDISignal)info).getName(), ((ICDISignal)info).getMeaning() } );
|
||||
return label;
|
||||
}
|
||||
if ( info != null && info instanceof ICDIWatchpointTrigger )
|
||||
{
|
||||
String label = target.getName() +
|
||||
MessageFormat.format( " (Watchpoint triggered. Old value: ''{0}''. New value: ''{1}'')",
|
||||
new String[] { ((ICDIWatchpointTrigger)info).getOldValue(),
|
||||
((ICDIWatchpointTrigger)info).getNewValue() } );
|
||||
return label;
|
||||
}
|
||||
/*
|
||||
if ( info != null && info instanceof ICDIBreakpointHit )
|
||||
{
|
||||
|
|
Loading…
Add table
Reference in a new issue