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 int
STATE_DISCONNECTED
Disconnected.static int
STATE_RUNNING
Running.static int
STATE_SUSPENDED
Suspended.static int
STATE_TERMINATED
Terminated.-
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 void
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
canDisconnect()
boolean
canResume()
boolean
canSuspend()
boolean
canTerminate()
void
disconnect()
ADWPDebugger
getDebugger()
Returns the debugger.org.eclipse.debug.core.model.IDebugTarget
getDebugTarget()
java.lang.String
getHost()
Returns the host.org.eclipse.debug.core.ILaunch
getLaunch()
org.eclipse.debug.core.model.IMemoryBlock
getMemoryBlock(long startAddress, long length)
Not use in ATL debugger.java.lang.String
getMessageFromDebuggee()
Returns the messageFromDebuggee.java.lang.String
getName()
java.lang.String
getPort()
Returns the port.org.eclipse.debug.core.model.IProcess
getProcess()
Not use in ATL debugger.int
getState()
Returns the state.org.eclipse.debug.core.model.IThread[]
getThreads()
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
hasThreads()
In ATL, there is always one and only one thread : the main thread.boolean
isDisassemblyMode()
boolean
isDisconnected()
boolean
isSuspended()
boolean
isTerminated()
void
resume()
void
setDisassemblyMode(boolean disassemblyMode)
Sets the disassembly mode.void
setPrevLocation(java.lang.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
supportsStorageRetrieval()
Not use in our context.void
suspend()
void
terminate()
-
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:
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:
AtlDebugElement.getDebugTarget()
-
getLaunch
public org.eclipse.debug.core.ILaunch getLaunch()
- Specified by:
getLaunch
in interfaceorg.eclipse.debug.core.model.IDebugElement
- Overrides:
getLaunch
in classAtlDebugElement
- See Also:
AtlDebugElement.getLaunch()
-
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
public java.lang.String getName() throws org.eclipse.debug.core.DebugException
- 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.DebugException
In 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.DebugException
In 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
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
-
-