mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-29 19:45:01 +02:00
Added the 'IRunToAddress' interface to support the 'Run To Line' action in disassembly.
This commit is contained in:
parent
0f9429319e
commit
a729d837b8
4 changed files with 68 additions and 0 deletions
|
@ -1,3 +1,9 @@
|
|||
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
|
||||
|
|
|
@ -20,6 +20,7 @@ public interface ICDebugTarget extends IDebugTarget,
|
|||
IExecFileInfo,
|
||||
IRestart,
|
||||
IRunToLine,
|
||||
IRunToAddress,
|
||||
IState,
|
||||
ISwitchToThread,
|
||||
ICBreakpointManager
|
||||
|
|
|
@ -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;
|
||||
}
|
|
@ -62,6 +62,7 @@ import org.eclipse.cdt.debug.core.model.ICWatchpoint;
|
|||
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 @@ public class CDebugTarget extends CDebugElement
|
|||
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 ) )
|
||||
|
@ -2107,4 +2110,31 @@ public class CDebugTarget extends CDebugElement
|
|||
}
|
||||
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 );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue