diff --git a/debug/org.eclipse.cdt.debug.core/ChangeLog b/debug/org.eclipse.cdt.debug.core/ChangeLog index 5bee6a82939..f85a28c83ee 100644 --- a/debug/org.eclipse.cdt.debug.core/ChangeLog +++ b/debug/org.eclipse.cdt.debug.core/ChangeLog @@ -1,3 +1,8 @@ +2003-02-03 Mikhail Khodjaiants + Implemention of the 'handle' command of the 'Signals' view. + * ICDISignal.java: added the 'handle' method + * CSignal.java: implementation of the 'handle' command. + 2003-02-03 Mikhail Khodjaiants Implementing the 'Signals' view. * CSignalManager.java: new diff --git a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/cdi/model/ICDISignal.java b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/cdi/model/ICDISignal.java index e81b944d559..eb5b723250b 100644 --- a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/cdi/model/ICDISignal.java +++ b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/cdi/model/ICDISignal.java @@ -49,7 +49,16 @@ public interface ICDISignal extends ICDIObject { /** * Continue program giving it this signal. * - * Method signal. + * @throws CDIException if this method fails. Reasons include: */ void signal() throws CDIException ; + + /** + * Change the way debugger handles this signal. + * + * @param ignore - if true the debugger should not allow your program to see this signal + * @param stop - if true the debugger should stop your program when this signal happens + * @throws CDIException if this method fails. Reasons include: + */ + void handle(boolean ignore, boolean stop) throws CDIException; } diff --git a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/model/CSignal.java b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/model/CSignal.java index 58a46d33cd8..145b7bfcc56 100644 --- a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/model/CSignal.java +++ b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/model/CSignal.java @@ -69,6 +69,7 @@ public class CSignal extends CDebugElement implements ICSignal, ICDIEventListene */ public void setPassEnabled( boolean enable ) throws DebugException { + handle( enable, isStopEnabled() ); } /* (non-Javadoc) @@ -76,6 +77,7 @@ public class CSignal extends CDebugElement implements ICSignal, ICDIEventListene */ public void setStopEnabled( boolean enable ) throws DebugException { + handle( isPassEnabled(), enable ); } /* (non-Javadoc) @@ -112,4 +114,16 @@ public class CSignal extends CDebugElement implements ICSignal, ICDIEventListene { return fCDISignal; } + + private void handle( boolean pass, boolean stop ) throws DebugException + { + try + { + getCDISignal().handle( !pass, stop ); + } + catch( CDIException e ) + { + targetRequestFailed( e.getMessage(), null ); + } + } }