Index:
ChangeLog =================================================================== RCS
file: /home/tools/org.eclipse.cdt.debug.core/ChangeLog,v retrieving revision
1.92 diff -u -r1.92 ChangeLog --- ChangeLog 13 Jan 2003 16:17:32
-0000 1.92 +++ ChangeLog 13 Jan 2003 22:24:29 -0000 @@ -1,4
+1,10 @@ 2003-01-13 Mikhail Khodjaiants + Added the
'IRunToAddress' interface to support the 'Run To Line' action in
disassembly. + * ICDebugTarget.java: extends IRunToAddress + *
IRunToAddress.java: new interface + * CDebugTarget.java:
implementation + +2003-01-13 Mikhail Khodjaiants Fix in the
thread created event handler: do nothing if thread has already
created. * CDebugTarget.java Index:
src/org/eclipse/cdt/debug/core/model/ICDebugTarget.java =================================================================== RCS
file:
/home/tools/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/model/ICDebugTarget.java,v retrieving
revision 1.2 diff -u -r1.2 ICDebugTarget.java ---
src/org/eclipse/cdt/debug/core/model/ICDebugTarget.java 10 Jan 2003
19:36:42 -0000 1.2 +++
src/org/eclipse/cdt/debug/core/model/ICDebugTarget.java 13 Jan 2003
22:24:29 -0000 @@ -20,6 +20,7
@@
IExecFileInfo,
IRestart,
IRunToLine, +
IRunToAddress,
IState,
ISwitchToThread,
ICBreakpointManager Index:
src/org/eclipse/cdt/debug/core/model/IRunToAddress.java =================================================================== RCS
file: src/org/eclipse/cdt/debug/core/model/IRunToAddress.java diff -N
src/org/eclipse/cdt/debug/core/model/IRunToAddress.java --- /dev/null 1
Jan 1970 00:00:00 -0000 +++
src/org/eclipse/cdt/debug/core/model/IRunToAddress.java 13 Jan 2003
22:24:29 -0000 @@ -0,0 +1,31 @@ +/* + *(c) Copyright QNX Software
Systems Ltd. 2002. + * All Rights Reserved. + * + */ +package
org.eclipse.cdt.debug.core.model; + +import
org.eclipse.debug.core.DebugException; + +/** + * + * Provides the
ability to run a debug target to the given address. + * + * @since Jan
13, 2003 + */ +public interface
IRunToAddress +{ + /** + * Returns whether this operation is
currently available for this element. + * + * @return whether
this operation is currently available + */ + public boolean
canRunToAddress( long address ); + + /** + * Causes this
element to run to specified address. + * + * @exception
DebugException on failure. Reasons include: + */ + public void
runToAddress( long address ) throws DebugException; +} Index:
src/org/eclipse/cdt/debug/internal/core/model/CDebugTarget.java =================================================================== RCS
file:
/home/tools/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/model/CDebugTarget.java,v retrieving
revision 1.67 diff -u -r1.67 CDebugTarget.java ---
src/org/eclipse/cdt/debug/internal/core/model/CDebugTarget.java 13 Jan 2003
16:17:33 -0000 1.67 +++
src/org/eclipse/cdt/debug/internal/core/model/CDebugTarget.java 13 Jan 2003
22:24:32 -0000 @@ -62,6 +62,7 @@ import
org.eclipse.cdt.debug.core.model.IDebuggerProcessSupport; import
org.eclipse.cdt.debug.core.model.IExecFileInfo; import
org.eclipse.cdt.debug.core.model.IGlobalVariable; +import
org.eclipse.cdt.debug.core.model.IRunToAddress; import
org.eclipse.cdt.debug.core.model.IRunToLine; import
org.eclipse.cdt.debug.core.model.IState; import
org.eclipse.cdt.debug.core.sourcelookup.ICSourceLocation; @@ -861,6 +862,8
@@ return this; if (
adapter.equals( IRunToLine.class ) ) return
this; + if ( adapter.equals( IRunToAddress.class )
) + return this; if ( adapter.equals(
ICBreakpointManager.class ) ) return
this; if ( adapter.equals( DisassemblyManager.class )
) @@ -2106,5 +2109,32
@@ } } return
0; + } + + /** + * @see
org.eclipse.cdt.debug.core.model.IRunToAddress#canRunToAddress(long) +
*/ + public boolean canRunToAddress( long address
) + { + // for now + return
canResume(); + } + + /** + * @see
org.eclipse.cdt.debug.core.model.IRunToAddress#runToLine(long) +
*/ + public void runToAddress( long address ) throws
DebugException + { + if ( !canRunToAddress( address )
) + return; + ICDILocation location =
getCDISession().getBreakpointManager().createLocation( address
); + try + { + getCDITarget().runUntil(
location ); + } + catch( CDIException e
) + { + targetRequestFailed( e.toString(), e
); + } } }
|