frysk.sys.proc
Class AuxvBuilder

java.lang.Object
  extended by frysk.sys.proc.AuxvBuilder
Direct Known Subclasses:
DwflTestbed.VdsoBuilder

public abstract class AuxvBuilder
extends Object

The build an auxiliary vector using the contents of the file /proc/PID/auxv. While this isn't a pure builder pattern, it is close enough.


Constructor Summary
protected AuxvBuilder()
          Create a AuxvBuilder; can only extend.
 
Method Summary
abstract  void buildAuxiliary(int index, int type, long value)
          Called with each auxiliary vector entry.
abstract  void buildDimensions(int wordSize, boolean bigEndian, int numberElements)
          Called with the wordSize, byte order, and number of elements.
 boolean construct(byte[] auxv)
          Scan the auxiliary vector found in the AUXV byte array.
private  boolean construct(int pid)
           
 boolean construct(ProcessIdentifier pid)
          Scan the auxiliary vector found in /proc/PID/auxv building up an auxv.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AuxvBuilder

protected AuxvBuilder()
Create a AuxvBuilder; can only extend.

Method Detail

construct

public boolean construct(ProcessIdentifier pid)
Scan the auxiliary vector found in /proc/PID/auxv building up an auxv.


construct

private boolean construct(int pid)

construct

public final boolean construct(byte[] auxv)
Scan the auxiliary vector found in the AUXV byte array. Calls buildDimensions(int, boolean, int), and buildAuxiliary(int, int, long).


buildDimensions

public abstract void buildDimensions(int wordSize,
                                     boolean bigEndian,
                                     int numberElements)
Called with the wordSize, byte order, and number of elements.


buildAuxiliary

public abstract void buildAuxiliary(int index,
                                    int type,
                                    long value)
Called with each auxiliary vector entry.