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
Modifier and TypeFieldDescriptionstatic final int
Disconnected.static final int
Running.static final int
Suspended.static final int
Terminated.Fields inherited from class org.eclipse.m2m.atl.debug.core.AtlDebugElement
fTarget
-
Constructor Summary
ConstructorDescriptionAtlDebugTarget
(org.eclipse.debug.core.ILaunch launch) Creates an new Debug target for the given launch. -
Method Summary
Modifier and TypeMethodDescriptionvoid
breakpointAdded
(org.eclipse.debug.core.model.IBreakpoint breakpoint) void
breakpointChanged
(org.eclipse.debug.core.model.IBreakpoint breakpoint, org.eclipse.core.resources.IMarkerDelta delta) void
breakpointRemoved
(org.eclipse.debug.core.model.IBreakpoint breakpoint, org.eclipse.core.resources.IMarkerDelta delta) boolean
boolean
boolean
boolean
void
Returns the debugger.org.eclipse.debug.core.model.IDebugTarget
getHost()
Returns the host.org.eclipse.debug.core.ILaunch
org.eclipse.debug.core.model.IMemoryBlock
getMemoryBlock
(long startAddress, long length) Not use in ATL debugger.Returns the messageFromDebuggee.getName()
getPort()
Returns the port.org.eclipse.debug.core.model.IProcess
Not use in ATL debugger.int
getState()
Returns the state.org.eclipse.debug.core.model.IThread[]
In our context, this method returns an array with only the main thread.void
handleDebugEvents
(org.eclipse.debug.core.DebugEvent[] events) This method allows to receive DebugEvent sent.boolean
In ATL, there is always one and only one thread : the main thread.boolean
boolean
boolean
boolean
void
resume()
void
setDisassemblyMode
(boolean disassemblyMode) Sets the disassembly mode.void
setPrevLocation
(String prevLocation) Sets the previous location.void
setState
(int state) The state corresponding to the state of the debugger (running, disconnected ...) This method allows to update state.void
setStopInMain
(boolean stopInMain) void
start()
Starts debug.boolean
supportsBreakpoint
(org.eclipse.debug.core.model.IBreakpoint breakpoint) boolean
Not use in our context.void
suspend()
void
Methods inherited from class org.eclipse.m2m.atl.debug.core.AtlDebugElement
abort, getAdapter, getModelIdentifier
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.eclipse.core.runtime.IAdaptable
getAdapter
Methods 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:
breakpointAdded
in 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:
breakpointChanged
in 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:
breakpointRemoved
in 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:
canDisconnect
in interfaceorg.eclipse.debug.core.model.IDisconnect
- See Also:
-
IDisconnect.canDisconnect()
-
canResume
public boolean canResume()- Specified by:
canResume
in interfaceorg.eclipse.debug.core.model.ISuspendResume
- See Also:
-
ISuspendResume.canResume()
-
canSuspend
public boolean canSuspend()- Specified by:
canSuspend
in interfaceorg.eclipse.debug.core.model.ISuspendResume
- See Also:
-
ISuspendResume.canSuspend()
-
canTerminate
public boolean canTerminate()- Specified by:
canTerminate
in interfaceorg.eclipse.debug.core.model.ITerminate
- See Also:
-
ITerminate.canTerminate()
-
disconnect
public void disconnect() throws org.eclipse.debug.core.DebugException- Specified by:
disconnect
in 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:
getDebugTarget
in interfaceorg.eclipse.debug.core.model.IDebugElement
- Overrides:
getDebugTarget
in classAtlDebugElement
- See Also:
-
getLaunch
public org.eclipse.debug.core.ILaunch getLaunch()- Specified by:
getLaunch
in interfaceorg.eclipse.debug.core.model.IDebugElement
- Overrides:
getLaunch
in 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:
getMemoryBlock
in interfaceorg.eclipse.debug.core.model.IMemoryBlockRetrieval
- Throws:
org.eclipse.debug.core.DebugException
- See Also:
-
IMemoryBlockRetrieval.getMemoryBlock(long, long)
-
getName
- Specified by:
getName
in 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:
getProcess
in 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:
getThreads
in 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:
hasThreads
in interfaceorg.eclipse.debug.core.model.IDebugTarget
- Throws:
org.eclipse.debug.core.DebugException
- See Also:
-
IDebugTarget.hasThreads()
-
isDisconnected
public boolean isDisconnected()- Specified by:
isDisconnected
in interfaceorg.eclipse.debug.core.model.IDisconnect
- See Also:
-
IDisconnect.isDisconnected()
-
isSuspended
public boolean isSuspended()- Specified by:
isSuspended
in interfaceorg.eclipse.debug.core.model.ISuspendResume
- See Also:
-
ISuspendResume.isSuspended()
-
isTerminated
public boolean isTerminated()- Specified by:
isTerminated
in interfaceorg.eclipse.debug.core.model.ITerminate
- See Also:
-
ITerminate.isTerminated()
-
resume
public void resume() throws org.eclipse.debug.core.DebugException- Specified by:
resume
in 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:
supportsBreakpoint
in 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:
supportsStorageRetrieval
in interfaceorg.eclipse.debug.core.model.IMemoryBlockRetrieval
- See Also:
-
IMemoryBlockRetrieval.supportsStorageRetrieval()
-
suspend
public void suspend() throws org.eclipse.debug.core.DebugException- Specified by:
suspend
in 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:
terminate
in interfaceorg.eclipse.debug.core.model.ITerminate
- Throws:
org.eclipse.debug.core.DebugException
- See Also:
-
ITerminate.terminate()
-
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
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
-