Class 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
    • Constructor Detail

      • 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 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 interface org.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 interface org.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 interface org.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 interface org.eclipse.debug.core.model.IDisconnect
        See Also:
        IDisconnect.canDisconnect()
      • canResume

        public boolean canResume()
        Specified by:
        canResume in interface org.eclipse.debug.core.model.ISuspendResume
        See Also:
        ISuspendResume.canResume()
      • canSuspend

        public boolean canSuspend()
        Specified by:
        canSuspend in interface org.eclipse.debug.core.model.ISuspendResume
        See Also:
        ISuspendResume.canSuspend()
      • canTerminate

        public boolean canTerminate()
        Specified by:
        canTerminate in interface org.eclipse.debug.core.model.ITerminate
        See Also:
        ITerminate.canTerminate()
      • disconnect

        public void disconnect()
                        throws org.eclipse.debug.core.DebugException
        Specified by:
        disconnect in interface org.eclipse.debug.core.model.IDisconnect
        Throws:
        org.eclipse.debug.core.DebugException
        See Also:
        IDisconnect.disconnect()
      • 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 interface org.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 interface org.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 interface org.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 interface org.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 interface org.eclipse.debug.core.model.IDebugTarget
        Throws:
        org.eclipse.debug.core.DebugException
        See Also:
        IDebugTarget.hasThreads()
      • isDisconnected

        public boolean isDisconnected()
        Specified by:
        isDisconnected in interface org.eclipse.debug.core.model.IDisconnect
        See Also:
        IDisconnect.isDisconnected()
      • isSuspended

        public boolean isSuspended()
        Specified by:
        isSuspended in interface org.eclipse.debug.core.model.ISuspendResume
        See Also:
        ISuspendResume.isSuspended()
      • isTerminated

        public boolean isTerminated()
        Specified by:
        isTerminated in interface org.eclipse.debug.core.model.ITerminate
        See Also:
        ITerminate.isTerminated()
      • resume

        public void resume()
                    throws org.eclipse.debug.core.DebugException
        Specified by:
        resume in interface org.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 interface org.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 interface org.eclipse.debug.core.model.IMemoryBlockRetrieval
        See Also:
        IMemoryBlockRetrieval.supportsStorageRetrieval()
      • suspend

        public void suspend()
                     throws org.eclipse.debug.core.DebugException
        Specified by:
        suspend in interface org.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 interface org.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