Package org.eclipse.m2m.atl.debug.core
Class AtlDebugTarget
- java.lang.Object
-
- org.eclipse.core.runtime.PlatformObject
-
- org.eclipse.m2m.atl.debug.core.AtlDebugElement
-
- org.eclipse.m2m.atl.debug.core.AtlDebugTarget
-
- All Implemented Interfaces:
org.eclipse.core.runtime.IAdaptable,org.eclipse.debug.core.IBreakpointListener,org.eclipse.debug.core.model.IDebugElement,org.eclipse.debug.core.model.IDebugTarget,org.eclipse.debug.core.model.IDisconnect,org.eclipse.debug.core.model.IMemoryBlockRetrieval,org.eclipse.debug.core.model.ISuspendResume,org.eclipse.debug.core.model.ITerminate
public class AtlDebugTarget extends AtlDebugElement implements org.eclipse.debug.core.model.IDebugTarget
A debug target is a debuggable execution context. It's the root of the element hierarchy. The AtlDebugTarget contains only one thread : the main thread. The thread contains the current stackframe
-
-
Field Summary
Fields Modifier and Type Field Description static intSTATE_DISCONNECTEDDisconnected.static intSTATE_RUNNINGRunning.static intSTATE_SUSPENDEDSuspended.static intSTATE_TERMINATEDTerminated.-
Fields inherited from class org.eclipse.m2m.atl.debug.core.AtlDebugElement
fTarget
-
-
Constructor Summary
Constructors Constructor Description AtlDebugTarget(org.eclipse.debug.core.ILaunch launch)Creates an new Debug target for the given launch.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidbreakpointAdded(org.eclipse.debug.core.model.IBreakpoint breakpoint)voidbreakpointChanged(org.eclipse.debug.core.model.IBreakpoint breakpoint, org.eclipse.core.resources.IMarkerDelta delta)voidbreakpointRemoved(org.eclipse.debug.core.model.IBreakpoint breakpoint, org.eclipse.core.resources.IMarkerDelta delta)booleancanDisconnect()booleancanResume()booleancanSuspend()booleancanTerminate()voiddisconnect()ADWPDebuggergetDebugger()Returns the debugger.org.eclipse.debug.core.model.IDebugTargetgetDebugTarget()java.lang.StringgetHost()Returns the host.org.eclipse.debug.core.ILaunchgetLaunch()org.eclipse.debug.core.model.IMemoryBlockgetMemoryBlock(long startAddress, long length)Not use in ATL debugger.java.lang.StringgetMessageFromDebuggee()Returns the messageFromDebuggee.java.lang.StringgetName()java.lang.StringgetPort()Returns the port.org.eclipse.debug.core.model.IProcessgetProcess()Not use in ATL debugger.intgetState()Returns the state.org.eclipse.debug.core.model.IThread[]getThreads()In our context, this method returns an array with only the main thread.voidhandleDebugEvents(org.eclipse.debug.core.DebugEvent[] events)This method allows to receive DebugEvent sent.booleanhasThreads()In ATL, there is always one and only one thread : the main thread.booleanisDisassemblyMode()booleanisDisconnected()booleanisSuspended()booleanisTerminated()voidresume()voidsetDisassemblyMode(boolean disassemblyMode)Sets the disassembly mode.voidsetPrevLocation(java.lang.String prevLocation)Sets the previous location.voidsetState(int state)The state corresponding to the state of the debugger (running, disconnected ...) This method allows to update state.voidsetStopInMain(boolean stopInMain)voidstart()Starts debug.booleansupportsBreakpoint(org.eclipse.debug.core.model.IBreakpoint breakpoint)booleansupportsStorageRetrieval()Not use in our context.voidsuspend()voidterminate()-
Methods inherited from class org.eclipse.m2m.atl.debug.core.AtlDebugElement
abort, getAdapter, getModelIdentifier
-
-
-
-
Field Detail
-
STATE_TERMINATED
public static final int STATE_TERMINATED
Terminated.- See Also:
- Constant Field Values
-
STATE_RUNNING
public static final int STATE_RUNNING
Running.- See Also:
- Constant Field Values
-
STATE_SUSPENDED
public static final int STATE_SUSPENDED
Suspended.- See Also:
- Constant Field Values
-
STATE_DISCONNECTED
public static final int STATE_DISCONNECTED
Disconnected.- See Also:
- Constant Field Values
-
-
Method Detail
-
setStopInMain
public void setStopInMain(boolean stopInMain)
-
start
public void start()
Starts debug.
-
breakpointAdded
public void breakpointAdded(org.eclipse.debug.core.model.IBreakpoint breakpoint)
- Specified by:
breakpointAddedin interfaceorg.eclipse.debug.core.IBreakpointListener- See Also:
IBreakpointListener.breakpointAdded(org.eclipse.debug.core.model.IBreakpoint)
-
breakpointChanged
public void breakpointChanged(org.eclipse.debug.core.model.IBreakpoint breakpoint, org.eclipse.core.resources.IMarkerDelta delta)- Specified by:
breakpointChangedin interfaceorg.eclipse.debug.core.IBreakpointListener- See Also:
IBreakpointListener.breakpointChanged(org.eclipse.debug.core.model.IBreakpoint, org.eclipse.core.resources.IMarkerDelta)
-
breakpointRemoved
public void breakpointRemoved(org.eclipse.debug.core.model.IBreakpoint breakpoint, org.eclipse.core.resources.IMarkerDelta delta)- Specified by:
breakpointRemovedin interfaceorg.eclipse.debug.core.IBreakpointListener- See Also:
IBreakpointListener.breakpointRemoved(org.eclipse.debug.core.model.IBreakpoint, org.eclipse.core.resources.IMarkerDelta)
-
canDisconnect
public boolean canDisconnect()
- Specified by:
canDisconnectin interfaceorg.eclipse.debug.core.model.IDisconnect- See Also:
IDisconnect.canDisconnect()
-
canResume
public boolean canResume()
- Specified by:
canResumein interfaceorg.eclipse.debug.core.model.ISuspendResume- See Also:
ISuspendResume.canResume()
-
canSuspend
public boolean canSuspend()
- Specified by:
canSuspendin interfaceorg.eclipse.debug.core.model.ISuspendResume- See Also:
ISuspendResume.canSuspend()
-
canTerminate
public boolean canTerminate()
- Specified by:
canTerminatein interfaceorg.eclipse.debug.core.model.ITerminate- See Also:
ITerminate.canTerminate()
-
disconnect
public void disconnect() throws org.eclipse.debug.core.DebugException- Specified by:
disconnectin interfaceorg.eclipse.debug.core.model.IDisconnect- Throws:
org.eclipse.debug.core.DebugException- See Also:
IDisconnect.disconnect()
-
getDebugTarget
public org.eclipse.debug.core.model.IDebugTarget getDebugTarget()
- Specified by:
getDebugTargetin interfaceorg.eclipse.debug.core.model.IDebugElement- Overrides:
getDebugTargetin classAtlDebugElement- See Also:
AtlDebugElement.getDebugTarget()
-
getLaunch
public org.eclipse.debug.core.ILaunch getLaunch()
- Specified by:
getLaunchin interfaceorg.eclipse.debug.core.model.IDebugElement- Overrides:
getLaunchin classAtlDebugElement- See Also:
AtlDebugElement.getLaunch()
-
getMemoryBlock
public org.eclipse.debug.core.model.IMemoryBlock getMemoryBlock(long startAddress, long length) throws org.eclipse.debug.core.DebugExceptionNot use in ATL debugger.- Specified by:
getMemoryBlockin interfaceorg.eclipse.debug.core.model.IMemoryBlockRetrieval- Throws:
org.eclipse.debug.core.DebugException- See Also:
IMemoryBlockRetrieval.getMemoryBlock(long, long)
-
getName
public java.lang.String getName() throws org.eclipse.debug.core.DebugException- Specified by:
getNamein interfaceorg.eclipse.debug.core.model.IDebugTarget- Throws:
org.eclipse.debug.core.DebugException- See Also:
IDebugTarget.getName()
-
getProcess
public org.eclipse.debug.core.model.IProcess getProcess()
Not use in ATL debugger.- Specified by:
getProcessin interfaceorg.eclipse.debug.core.model.IDebugTarget- See Also:
IDebugTarget.getProcess()
-
getThreads
public org.eclipse.debug.core.model.IThread[] getThreads() throws org.eclipse.debug.core.DebugExceptionIn our context, this method returns an array with only the main thread.- Specified by:
getThreadsin interfaceorg.eclipse.debug.core.model.IDebugTarget- Throws:
org.eclipse.debug.core.DebugException- See Also:
IDebugTarget.getThreads()
-
hasThreads
public boolean hasThreads() throws org.eclipse.debug.core.DebugExceptionIn ATL, there is always one and only one thread : the main thread.- Specified by:
hasThreadsin interfaceorg.eclipse.debug.core.model.IDebugTarget- Throws:
org.eclipse.debug.core.DebugException- See Also:
IDebugTarget.hasThreads()
-
isDisconnected
public boolean isDisconnected()
- Specified by:
isDisconnectedin interfaceorg.eclipse.debug.core.model.IDisconnect- See Also:
IDisconnect.isDisconnected()
-
isSuspended
public boolean isSuspended()
- Specified by:
isSuspendedin interfaceorg.eclipse.debug.core.model.ISuspendResume- See Also:
ISuspendResume.isSuspended()
-
isTerminated
public boolean isTerminated()
- Specified by:
isTerminatedin interfaceorg.eclipse.debug.core.model.ITerminate- See Also:
ITerminate.isTerminated()
-
resume
public void resume() throws org.eclipse.debug.core.DebugException- Specified by:
resumein interfaceorg.eclipse.debug.core.model.ISuspendResume- Throws:
org.eclipse.debug.core.DebugException- See Also:
ISuspendResume.resume()
-
supportsBreakpoint
public boolean supportsBreakpoint(org.eclipse.debug.core.model.IBreakpoint breakpoint)
- Specified by:
supportsBreakpointin interfaceorg.eclipse.debug.core.model.IDebugTarget- See Also:
IDebugTarget.supportsBreakpoint(org.eclipse.debug.core.model.IBreakpoint)
-
supportsStorageRetrieval
public boolean supportsStorageRetrieval()
Not use in our context.- Specified by:
supportsStorageRetrievalin interfaceorg.eclipse.debug.core.model.IMemoryBlockRetrieval- See Also:
IMemoryBlockRetrieval.supportsStorageRetrieval()
-
suspend
public void suspend() throws org.eclipse.debug.core.DebugException- Specified by:
suspendin interfaceorg.eclipse.debug.core.model.ISuspendResume- Throws:
org.eclipse.debug.core.DebugException- See Also:
ISuspendResume.suspend()
-
terminate
public void terminate() throws org.eclipse.debug.core.DebugException- Specified by:
terminatein interfaceorg.eclipse.debug.core.model.ITerminate- Throws:
org.eclipse.debug.core.DebugException- See Also:
ITerminate.terminate()
-
getDebugger
public ADWPDebugger getDebugger()
Returns the debugger.- Returns:
- the debugger
-
getState
public int getState()
Returns the state.- Returns:
- the state
-
setState
public void setState(int state)
The state corresponding to the state of the debugger (running, disconnected ...) This method allows to update state.- Parameters:
state- The state to set.
-
handleDebugEvents
public void handleDebugEvents(org.eclipse.debug.core.DebugEvent[] events)
This method allows to receive DebugEvent sent.- Parameters:
events- the handled event- See Also:
IDebugEventSetListener.handleDebugEvents(org.eclipse.debug.core.DebugEvent[])
-
isDisassemblyMode
public boolean isDisassemblyMode()
-
setDisassemblyMode
public void setDisassemblyMode(boolean disassemblyMode)
Sets the disassembly mode.- Parameters:
disassemblyMode- the disassemblyMode to set
-
setPrevLocation
public void setPrevLocation(java.lang.String prevLocation)
Sets the previous location.- Parameters:
prevLocation- the prevLocation to set
-
getHost
public java.lang.String getHost()
Returns the host.- Returns:
- the host
-
getPort
public java.lang.String getPort()
Returns the port.- Returns:
- the port
-
getMessageFromDebuggee
public java.lang.String getMessageFromDebuggee()
Returns the messageFromDebuggee.- Returns:
- the messageFromDebuggee
-
-