frysk.stack
Class LibunwindFrame

java.lang.Object
  extended by frysk.stack.Frame
      extended by frysk.stack.LibunwindFrame

 class LibunwindFrame
extends Frame


Field Summary
private  Cursor cursor
           
private static Log fine
           
private  FrameIdentifier frameIdentifier
           
private  ISA isa
           
private  RegisterMap registerMap
           
private  Symbol symbol
           
 
Constructor Summary
LibunwindFrame(Cursor cursor, Frame inner, Task task)
          Creates a new LibunwindFrame object.
 
Method Summary
 long byteArrayToLong(byte[] word)
          Returns the given byte array as a long.
 long getAddress()
          Returns the current program counter of this Frame.
 long getAdjustedAddress()
          Returns the adjusted address of this frame.
 FrameIdentifier getFrameIdentifier()
          Return this frame's FrameIdentifier.
 void getRegister(Register register, long offset, int length, byte[] bytes, int start)
          Extracts OFFSET:LENGTH bytes of REGISTER storing them from START in BYTES (in the target's byte order).
 Symbol getSymbol()
          Return this frame's symbol; UNKNOWN if there is no symbol.
 boolean isSignalFrame()
          Returns whether or not this frame's execution was interrupted by a signal.
 void setRegister(Register register, long offset, int length, byte[] bytes, int start)
          Stores BYTES from START into REGISTER at OFFSET:LENGTH (in the target's byte order).
protected  Frame unwind()
          Returns this Frame's outer frame; or null if there is no frame.
 
Methods inherited from class frysk.stack.Frame
getInner, getLibraryName, getOuter, getRegister, getRegisterValue, getTask, level, printLevel, printLibraryName, toPrint, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

fine

private static final Log fine

symbol

private Symbol symbol

frameIdentifier

private FrameIdentifier frameIdentifier

cursor

private final Cursor cursor

registerMap

private final RegisterMap registerMap

isa

private final ISA isa
Constructor Detail

LibunwindFrame

LibunwindFrame(Cursor cursor,
               Frame inner,
               Task task)
Creates a new LibunwindFrame object. Represents a frame on the stack of a remote (non-local) process.

Method Detail

unwind

protected Frame unwind()
Description copied from class: Frame
Returns this Frame's outer frame; or null if there is no frame.

Specified by:
unwind in class Frame

getAddress

public long getAddress()
Returns the current program counter of this Frame.

Specified by:
getAddress in class Frame
Returns:
The program counter for this StackFrame.

getAdjustedAddress

public long getAdjustedAddress()
Returns the adjusted address of this frame. If this Frame is an innermost frame, the current program counter is returned as-is. Otherwise, it is decremented by one, to represent the frame address pointing to its inner frame, rather than the inner frame's return address.

Specified by:
getAdjustedAddress in class Frame
Returns:
The pre-call program counter for this StackFrame.

getRegister

public void getRegister(Register register,
                        long offset,
                        int length,
                        byte[] bytes,
                        int start)
Description copied from class: Frame
Extracts OFFSET:LENGTH bytes of REGISTER storing them from START in BYTES (in the target's byte order).

Specified by:
getRegister in class Frame

setRegister

public void setRegister(Register register,
                        long offset,
                        int length,
                        byte[] bytes,
                        int start)
Description copied from class: Frame
Stores BYTES from START into REGISTER at OFFSET:LENGTH (in the target's byte order).

Specified by:
setRegister in class Frame

byteArrayToLong

public long byteArrayToLong(byte[] word)
Returns the given byte array as a long.

Parameters:
word - The byte array
Returns:
val The converted long

getFrameIdentifier

public FrameIdentifier getFrameIdentifier()
Return this frame's FrameIdentifier. The frame identifier is the combination of the current symbols (function) start address and the more outer frame's inner most address.

Specified by:
getFrameIdentifier in class Frame

isSignalFrame

public boolean isSignalFrame()
Returns whether or not this frame's execution was interrupted by a signal.

Returns:
true If this Frame is a signal frame.

getSymbol

public Symbol getSymbol()
Return this frame's symbol; UNKNOWN if there is no symbol.

Specified by:
getSymbol in class Frame