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
FieldsModifier and TypeFieldDescriptionstatic final intDisconnected.static final intRunning.static final intSuspended.static final intTerminated.Fields inherited from class org.eclipse.m2m.atl.debug.core.AtlDebugElement
fTarget -
Constructor Summary
ConstructorsConstructorDescriptionAtlDebugTarget(org.eclipse.debug.core.ILaunch launch) Creates an new Debug target for the given launch. -
Method Summary
Modifier and TypeMethodDescriptionvoidbreakpointAdded(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) booleanbooleanbooleanbooleanvoidReturns the debugger.org.eclipse.debug.core.model.IDebugTargetgetHost()Returns the host.org.eclipse.debug.core.ILaunchorg.eclipse.debug.core.model.IMemoryBlockgetMemoryBlock(long startAddress, long length) Not use in ATL debugger.Returns the messageFromDebuggee.getName()getPort()Returns the port.org.eclipse.debug.core.model.IProcessNot use in ATL debugger.intgetState()Returns the state.org.eclipse.debug.core.model.IThread[]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.booleanIn ATL, there is always one and only one thread : the main thread.booleanbooleanbooleanbooleanvoidresume()voidsetDisassemblyMode(boolean disassemblyMode) Sets the disassembly mode.voidsetPrevLocation(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) booleanNot use in our context.voidsuspend()voidMethods inherited from class org.eclipse.m2m.atl.debug.core.AtlDebugElement
abort, getAdapter, getModelIdentifierMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.eclipse.core.runtime.IAdaptable
getAdapterMethods inherited from interface org.eclipse.debug.core.model.IDebugElement
getModelIdentifier
-
Field Details
-
STATE_TERMINATED
public static final int STATE_TERMINATEDTerminated.- See Also:
-
STATE_RUNNING
public static final int STATE_RUNNINGRunning.- See Also:
-
STATE_SUSPENDED
public static final int STATE_SUSPENDEDSuspended.- See Also:
-
STATE_DISCONNECTED
public static final int STATE_DISCONNECTEDDisconnected.- See Also:
-
-
Constructor Details
-
AtlDebugTarget
public AtlDebugTarget(org.eclipse.debug.core.ILaunch launch) Creates an new Debug target for the given launch.- Parameters:
launch- the launch to debug
-
-
Method Details
-
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:
-
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:
-
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:
-
canDisconnect
public boolean canDisconnect()- Specified by:
canDisconnectin interfaceorg.eclipse.debug.core.model.IDisconnect- See Also:
-
canResume
public boolean canResume()- Specified by:
canResumein interfaceorg.eclipse.debug.core.model.ISuspendResume- See Also:
-
canSuspend
public boolean canSuspend()- Specified by:
canSuspendin interfaceorg.eclipse.debug.core.model.ISuspendResume- See Also:
-
canTerminate
public boolean canTerminate()- Specified by:
canTerminatein interfaceorg.eclipse.debug.core.model.ITerminate- See Also:
-
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:
-
getDebugTarget
public org.eclipse.debug.core.model.IDebugTarget getDebugTarget()- Specified by:
getDebugTargetin interfaceorg.eclipse.debug.core.model.IDebugElement- Overrides:
getDebugTargetin classAtlDebugElement- See Also:
-
getLaunch
public org.eclipse.debug.core.ILaunch getLaunch()- Specified by:
getLaunchin interfaceorg.eclipse.debug.core.model.IDebugElement- Overrides:
getLaunchin classAtlDebugElement- See Also:
-
getMemoryBlock
public org.eclipse.debug.core.model.IMemoryBlock getMemoryBlock(long startAddress, long length) throws org.eclipse.debug.core.DebugException Not use in ATL debugger.- Specified by:
getMemoryBlockin interfaceorg.eclipse.debug.core.model.IMemoryBlockRetrieval- Throws:
org.eclipse.debug.core.DebugException- See Also:
-
getName
- Specified by:
getNamein interfaceorg.eclipse.debug.core.model.IDebugTarget- Throws:
org.eclipse.debug.core.DebugException- See Also:
-
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:
-
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:
-
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:
-
isDisconnected
public boolean isDisconnected()- Specified by:
isDisconnectedin interfaceorg.eclipse.debug.core.model.IDisconnect- See Also:
-
isSuspended
public boolean isSuspended()- Specified by:
isSuspendedin interfaceorg.eclipse.debug.core.model.ISuspendResume- See Also:
-
isTerminated
public boolean isTerminated()- Specified by:
isTerminatedin interfaceorg.eclipse.debug.core.model.ITerminate- See Also:
-
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:
-
supportsBreakpoint
public boolean supportsBreakpoint(org.eclipse.debug.core.model.IBreakpoint breakpoint) - Specified by:
supportsBreakpointin interfaceorg.eclipse.debug.core.model.IDebugTarget- See Also:
-
supportsStorageRetrieval
public boolean supportsStorageRetrieval()Not use in our context.- Specified by:
supportsStorageRetrievalin interfaceorg.eclipse.debug.core.model.IMemoryBlockRetrieval- See Also:
-
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:
-
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:
-
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:
-
isDisassemblyMode
public boolean isDisassemblyMode() -
setDisassemblyMode
public void setDisassemblyMode(boolean disassemblyMode) Sets the disassembly mode.- Parameters:
disassemblyMode- the disassemblyMode to set
-
setPrevLocation
Sets the previous location.- Parameters:
prevLocation- the prevLocation to set
-
getHost
Returns the host.- Returns:
- the host
-
getPort
Returns the port.- Returns:
- the port
-
getMessageFromDebuggee
Returns the messageFromDebuggee.- Returns:
- the messageFromDebuggee
-