org.eclipse.cdt.debug.internal.core.model
Class CStackFrame

java.lang.Object
  extended by org.eclipse.core.runtime.PlatformObject
      extended by org.eclipse.cdt.debug.internal.core.model.CDebugElement
          extended by org.eclipse.cdt.debug.internal.core.model.CStackFrame
All Implemented Interfaces:
org.eclipse.cdt.debug.core.cdi.event.ICDIEventListener, ICDebugElement, ICDebugElementStatus, ICStackFrame, IJumpToAddress, IJumpToLine, IRestart, IResumeWithoutSignal, IRunToAddress, IRunToLine, org.eclipse.core.runtime.IAdaptable, org.eclipse.debug.core.model.IDebugElement, org.eclipse.debug.core.model.IStackFrame, org.eclipse.debug.core.model.IStep, org.eclipse.debug.core.model.ISuspendResume, org.eclipse.debug.core.model.ITerminate

public class CStackFrame
extends CDebugElement
implements ICStackFrame, IRestart, IResumeWithoutSignal, org.eclipse.cdt.debug.core.cdi.event.ICDIEventListener

Proxy to a stack frame on the target.


Field Summary
 
Fields inherited from interface org.eclipse.cdt.debug.core.model.ICDebugElementStatus
ERROR, OK, WARNING
 
Constructor Summary
CStackFrame(CThread thread, org.eclipse.cdt.debug.core.cdi.model.ICDIStackFrame cdiFrame)
          Constructor for CStackFrame.
 
Method Summary
 boolean canEvaluate()
          Returns whether this stack frame can currently evaluate an expression.
 boolean canJumpToAddress(IAddress address)
          Returns whether this operation is currently available for this element.
 boolean canJumpToLine(org.eclipse.core.resources.IFile file, int lineNumber)
          Returns whether this operation is currently available for this file and line number.
 boolean canJumpToLine(java.lang.String fileName, int lineNumber)
          Returns whether this operation is currently available for this file and line number.
 boolean canRestart()
          Returns whether this element can currently be restarted.
 boolean canResume()
           
 boolean canResumeWithoutSignal()
          Returns whether this element can currently be resumed without signal.
 boolean canRunToAddress(IAddress address)
          Returns whether this operation is currently available for this element.
 boolean canRunToLine(org.eclipse.core.resources.IFile file, int lineNumber)
          Returns whether this operation is currently available for this file and line number.
 boolean canRunToLine(java.lang.String fileName, int lineNumber)
          Returns whether this operation is currently available for this file and line number.
 boolean canStepInto()
           
 boolean canStepOver()
           
 boolean canStepReturn()
           
 boolean canSuspend()
           
 boolean canTerminate()
           
 org.eclipse.debug.core.model.IValue evaluateExpression(java.lang.String expressionText)
          Evaluates the given expression in the context of this stack frame.
 java.lang.String evaluateExpressionToString(java.lang.String expression)
          Evaluates the specified expression in the context of this stack frame and returns the evaluation result as a string.
 java.lang.Object getAdapter(java.lang.Class adapter)
           
 IAddress getAddress()
          Returns the address of this stack frame.
 int getCharEnd()
           
 int getCharStart()
           
 java.lang.String getFile()
          Returns the source file of this stack frame or null if the source file is unknown.
 int getFrameLineNumber()
          Returns the line number of this stack frame or 0 if the line number is unknown.
 java.lang.String getFunction()
          Returns the function of this stack frame or null if the function is unknown.
 int getLevel()
          Returns the level of this stack frame.
 int getLineNumber()
           
 java.lang.String getName()
           
 org.eclipse.debug.core.model.IRegisterGroup[] getRegisterGroups()
           
 org.eclipse.debug.core.model.IThread getThread()
           
 org.eclipse.debug.core.model.IVariable[] getVariables()
           
 void handleDebugEvents(org.eclipse.cdt.debug.core.cdi.event.ICDIEvent[] events)
           
 boolean hasRegisterGroups()
           
 boolean hasVariables()
           
 boolean isStepping()
           
 boolean isSuspended()
           
 boolean isTerminated()
           
 void jumpToAddress(IAddress address)
          Causes this element to resume the execution at the specified address.
 void jumpToLine(org.eclipse.core.resources.IFile file, int lineNumber)
          Causes this element to resume the execution at the specified line.
 void jumpToLine(java.lang.String fileName, int lineNumber)
          Causes this element to resume the execution at the specified line.
 void restart()
          Causes this element to restart its execution.
 void resume()
           
 void resumeWithoutSignal()
          Causes this element to resume its execution ignoring a signal.
 void runToAddress(IAddress address, boolean skipBreakpoints)
          Causes this element to run to specified address.
 void runToLine(org.eclipse.core.resources.IFile file, int lineNumber, boolean skipBreakpoints)
          Causes this element to run to specified location.
 void runToLine(java.lang.String fileName, int lineNumber, boolean skipBreakpoints)
          Causes this element to run to specified location.
 void setRefreshVariables(boolean refresh)
           
 void stepInto()
           
 void stepOver()
           
 void stepReturn()
           
 void suspend()
           
 void terminate()
           
 java.lang.String toString()
           
 
Methods inherited from class org.eclipse.cdt.debug.internal.core.model.CDebugElement
createChangeEvent, createCreateEvent, createResumeEvent, createSuspendEvent, createTerminateEvent, fireChangeEvent, fireCreationEvent, fireResumeEvent, fireSuspendEvent, fireTerminateEvent, getCDISession, getCDITarget, getCurrentStateInfo, getDebugTarget, getLaunch, getMessage, getModelIdentifier, getSeverity, getState, isOK, notSupported, requestFailed, requestFailed, targetRequestFailed, targetRequestFailed
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.eclipse.debug.core.model.IDebugElement
getDebugTarget, getLaunch, getModelIdentifier
 
Methods inherited from interface org.eclipse.cdt.debug.core.model.ICDebugElement
getCurrentStateInfo, getState
 
Methods inherited from interface org.eclipse.debug.core.model.IDebugElement
getDebugTarget, getLaunch, getModelIdentifier
 

Constructor Detail

CStackFrame

public CStackFrame(CThread thread,
                   org.eclipse.cdt.debug.core.cdi.model.ICDIStackFrame cdiFrame)
Constructor for CStackFrame.

Method Detail

getThread

public org.eclipse.debug.core.model.IThread getThread()
Specified by:
getThread in interface org.eclipse.debug.core.model.IStackFrame

getVariables

public org.eclipse.debug.core.model.IVariable[] getVariables()
                                                      throws org.eclipse.debug.core.DebugException
Specified by:
getVariables in interface org.eclipse.debug.core.model.IStackFrame
Throws:
org.eclipse.debug.core.DebugException

hasVariables

public boolean hasVariables()
                     throws org.eclipse.debug.core.DebugException
Specified by:
hasVariables in interface org.eclipse.debug.core.model.IStackFrame
Throws:
org.eclipse.debug.core.DebugException

getLineNumber

public int getLineNumber()
                  throws org.eclipse.debug.core.DebugException
Specified by:
getLineNumber in interface org.eclipse.debug.core.model.IStackFrame
Throws:
org.eclipse.debug.core.DebugException

getCharStart

public int getCharStart()
                 throws org.eclipse.debug.core.DebugException
Specified by:
getCharStart in interface org.eclipse.debug.core.model.IStackFrame
Throws:
org.eclipse.debug.core.DebugException

getCharEnd

public int getCharEnd()
               throws org.eclipse.debug.core.DebugException
Specified by:
getCharEnd in interface org.eclipse.debug.core.model.IStackFrame
Throws:
org.eclipse.debug.core.DebugException

getName

public java.lang.String getName()
                         throws org.eclipse.debug.core.DebugException
Specified by:
getName in interface org.eclipse.debug.core.model.IStackFrame
Throws:
org.eclipse.debug.core.DebugException

getRegisterGroups

public org.eclipse.debug.core.model.IRegisterGroup[] getRegisterGroups()
                                                                throws org.eclipse.debug.core.DebugException
Specified by:
getRegisterGroups in interface org.eclipse.debug.core.model.IStackFrame
Throws:
org.eclipse.debug.core.DebugException

hasRegisterGroups

public boolean hasRegisterGroups()
                          throws org.eclipse.debug.core.DebugException
Specified by:
hasRegisterGroups in interface org.eclipse.debug.core.model.IStackFrame
Throws:
org.eclipse.debug.core.DebugException

handleDebugEvents

public void handleDebugEvents(org.eclipse.cdt.debug.core.cdi.event.ICDIEvent[] events)
Specified by:
handleDebugEvents in interface org.eclipse.cdt.debug.core.cdi.event.ICDIEventListener

canStepInto

public boolean canStepInto()
Specified by:
canStepInto in interface org.eclipse.debug.core.model.IStep

canStepOver

public boolean canStepOver()
Specified by:
canStepOver in interface org.eclipse.debug.core.model.IStep

canStepReturn

public boolean canStepReturn()
Specified by:
canStepReturn in interface org.eclipse.debug.core.model.IStep

isStepping

public boolean isStepping()
Specified by:
isStepping in interface org.eclipse.debug.core.model.IStep

stepInto

public void stepInto()
              throws org.eclipse.debug.core.DebugException
Specified by:
stepInto in interface org.eclipse.debug.core.model.IStep
Throws:
org.eclipse.debug.core.DebugException

stepOver

public void stepOver()
              throws org.eclipse.debug.core.DebugException
Specified by:
stepOver in interface org.eclipse.debug.core.model.IStep
Throws:
org.eclipse.debug.core.DebugException

stepReturn

public void stepReturn()
                throws org.eclipse.debug.core.DebugException
Specified by:
stepReturn in interface org.eclipse.debug.core.model.IStep
Throws:
org.eclipse.debug.core.DebugException

canResume

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

canSuspend

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

isSuspended

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

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

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

canTerminate

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

isTerminated

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

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

getAdapter

public java.lang.Object getAdapter(java.lang.Class adapter)
Specified by:
getAdapter in interface org.eclipse.core.runtime.IAdaptable
Overrides:
getAdapter in class CDebugElement
See Also:
IAdaptable.getAdapter(Class)

getAddress

public IAddress getAddress()
Description copied from interface: ICStackFrame
Returns the address of this stack frame.

Specified by:
getAddress in interface ICStackFrame
Returns:
the address of this stack frame

getFile

public java.lang.String getFile()
Description copied from interface: ICStackFrame
Returns the source file of this stack frame or null if the source file is unknown.

Specified by:
getFile in interface ICStackFrame
Returns:
the source file of this stack frame

getFunction

public java.lang.String getFunction()
Description copied from interface: ICStackFrame
Returns the function of this stack frame or null if the function is unknown.

Specified by:
getFunction in interface ICStackFrame
Returns:
the function of this stack frame

getLevel

public int getLevel()
Description copied from interface: ICStackFrame
Returns the level of this stack frame.

Specified by:
getLevel in interface ICStackFrame
Returns:
the level of this stack frame

getFrameLineNumber

public int getFrameLineNumber()
Description copied from interface: ICStackFrame
Returns the line number of this stack frame or 0 if the line number is unknown.

Specified by:
getFrameLineNumber in interface ICStackFrame
Returns:
the line number of this stack frame

canRestart

public boolean canRestart()
Description copied from interface: IRestart
Returns whether this element can currently be restarted.

Specified by:
canRestart in interface IRestart
Returns:
whether this element can currently be restarted

restart

public void restart()
             throws org.eclipse.debug.core.DebugException
Description copied from interface: IRestart
Causes this element to restart its execution.

Specified by:
restart in interface IRestart
Throws:
org.eclipse.debug.core.DebugException - on failure. Reasons include:

setRefreshVariables

public void setRefreshVariables(boolean refresh)

canResumeWithoutSignal

public boolean canResumeWithoutSignal()
Description copied from interface: IResumeWithoutSignal
Returns whether this element can currently be resumed without signal.

Specified by:
canResumeWithoutSignal in interface IResumeWithoutSignal
Returns:
whether this element can currently be resumed without signal

resumeWithoutSignal

public void resumeWithoutSignal()
                         throws org.eclipse.debug.core.DebugException
Description copied from interface: IResumeWithoutSignal
Causes this element to resume its execution ignoring a signal. Has no effect on an element that is not suspended because of a signal.

Specified by:
resumeWithoutSignal in interface IResumeWithoutSignal
Throws:
org.eclipse.debug.core.DebugException - on failure. Reasons include:

evaluateExpression

public org.eclipse.debug.core.model.IValue evaluateExpression(java.lang.String expressionText)
                                                       throws org.eclipse.debug.core.DebugException
Description copied from interface: ICStackFrame
Evaluates the given expression in the context of this stack frame.

Specified by:
evaluateExpression in interface ICStackFrame
Parameters:
expressionText - expression to evaluate
Returns:
the evaluation result
Throws:
org.eclipse.debug.core.DebugException - if this method fails.

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

evaluateExpressionToString

public java.lang.String evaluateExpressionToString(java.lang.String expression)
                                            throws org.eclipse.debug.core.DebugException
Description copied from interface: ICStackFrame
Evaluates the specified expression in the context of this stack frame and returns the evaluation result as a string.

Specified by:
evaluateExpressionToString in interface ICStackFrame
Parameters:
expression - the expression to evaluate
Returns:
the evaluation result
Throws:
org.eclipse.debug.core.DebugException - on failure. Reasons include:

canEvaluate

public boolean canEvaluate()
Description copied from interface: ICStackFrame
Returns whether this stack frame can currently evaluate an expression.

Specified by:
canEvaluate in interface ICStackFrame
Returns:
whether this stack frame can currently evaluate an expression

canRunToLine

public boolean canRunToLine(org.eclipse.core.resources.IFile file,
                            int lineNumber)
Description copied from interface: IRunToLine
Returns whether this operation is currently available for this file and line number.

Specified by:
canRunToLine in interface IRunToLine
Returns:
whether this operation is currently available

runToLine

public void runToLine(org.eclipse.core.resources.IFile file,
                      int lineNumber,
                      boolean skipBreakpoints)
               throws org.eclipse.debug.core.DebugException
Description copied from interface: IRunToLine
Causes this element to run to specified location.

Specified by:
runToLine in interface IRunToLine
Throws:
org.eclipse.debug.core.DebugException - on failure. Reasons include:

canRunToLine

public boolean canRunToLine(java.lang.String fileName,
                            int lineNumber)
Description copied from interface: IRunToLine
Returns whether this operation is currently available for this file and line number.

Specified by:
canRunToLine in interface IRunToLine
Returns:
whether this operation is currently available

runToLine

public void runToLine(java.lang.String fileName,
                      int lineNumber,
                      boolean skipBreakpoints)
               throws org.eclipse.debug.core.DebugException
Description copied from interface: IRunToLine
Causes this element to run to specified location.

Specified by:
runToLine in interface IRunToLine
Throws:
org.eclipse.debug.core.DebugException - on failure. Reasons include:

canRunToAddress

public boolean canRunToAddress(IAddress address)
Description copied from interface: IRunToAddress
Returns whether this operation is currently available for this element.

Specified by:
canRunToAddress in interface IRunToAddress
Returns:
whether this operation is currently available

runToAddress

public void runToAddress(IAddress address,
                         boolean skipBreakpoints)
                  throws org.eclipse.debug.core.DebugException
Description copied from interface: IRunToAddress
Causes this element to run to specified address.

Specified by:
runToAddress in interface IRunToAddress
Throws:
org.eclipse.debug.core.DebugException - on failure. Reasons include:

canJumpToLine

public boolean canJumpToLine(org.eclipse.core.resources.IFile file,
                             int lineNumber)
Description copied from interface: IJumpToLine
Returns whether this operation is currently available for this file and line number.

Specified by:
canJumpToLine in interface IJumpToLine
Returns:
whether this operation is currently available

jumpToLine

public void jumpToLine(org.eclipse.core.resources.IFile file,
                       int lineNumber)
                throws org.eclipse.debug.core.DebugException
Description copied from interface: IJumpToLine
Causes this element to resume the execution at the specified line.

Specified by:
jumpToLine in interface IJumpToLine
Throws:
org.eclipse.debug.core.DebugException - on failure. Reasons include:

canJumpToLine

public boolean canJumpToLine(java.lang.String fileName,
                             int lineNumber)
Description copied from interface: IJumpToLine
Returns whether this operation is currently available for this file and line number.

Specified by:
canJumpToLine in interface IJumpToLine
Returns:
whether this operation is currently available

jumpToLine

public void jumpToLine(java.lang.String fileName,
                       int lineNumber)
                throws org.eclipse.debug.core.DebugException
Description copied from interface: IJumpToLine
Causes this element to resume the execution at the specified line.

Specified by:
jumpToLine in interface IJumpToLine
Throws:
org.eclipse.debug.core.DebugException - on failure. Reasons include:

canJumpToAddress

public boolean canJumpToAddress(IAddress address)
Description copied from interface: IJumpToAddress
Returns whether this operation is currently available for this element.

Specified by:
canJumpToAddress in interface IJumpToAddress
Returns:
whether this operation is currently available

jumpToAddress

public void jumpToAddress(IAddress address)
                   throws org.eclipse.debug.core.DebugException
Description copied from interface: IJumpToAddress
Causes this element to resume the execution at the specified address.

Specified by:
jumpToAddress in interface IJumpToAddress
Throws:
org.eclipse.debug.core.DebugException - on failure. Reasons include: