com.tapina.robe.swi.clib
Class VarArgs

java.lang.Object
  extended bycom.tapina.robe.swi.clib.VarArgs

public class VarArgs
extends java.lang.Object

This class represents a variable-length argument list. APCS passes the first four arguments in registers, then the remaining arguments in memory starting from the address containing in the fifth register. Alternatively, for calls which are passing on an existing varargs list, all arguments will be in memory.


Nested Class Summary
 class VarArgs.Argument
           
 
Constructor Summary
VarArgs(Environment env, int knownArgCount)
          Construct a new VarArgs object under normal circumstances, where there are a known fixed number of arguments, and then an unknown variable number of arguments following.
VarArgs(MemoryMap memoryMap, int address)
          Construct a new VarArgs object where all arguments are in memory at a specified address.
 
Method Summary
 VarArgs.Argument getVarArg(int offset)
          Get the specified argument from the variable argument list.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

VarArgs

public VarArgs(Environment env,
               int knownArgCount)
Construct a new VarArgs object under normal circumstances, where there are a known fixed number of arguments, and then an unknown variable number of arguments following. For example, sprintf(char *str, char *format, ...) has two known arguments.

Parameters:
env - Environment under which we are operating
knownArgCount - Number of known arguments

VarArgs

public VarArgs(MemoryMap memoryMap,
               int address)
Construct a new VarArgs object where all arguments are in memory at a specified address.

Parameters:
memoryMap - memory map under which to obtain data
address - address of first value
Method Detail

getVarArg

public VarArgs.Argument getVarArg(int offset)
Get the specified argument from the variable argument list. The first argument has offset 0.

Parameters:
offset - Which argument to obtain.
Returns:
An object representing that argument.


Copyright © 2003-2005 . All Rights Reserved.