com.tapina.robe.swi.clib
Class VarArgs
java.lang.Object
com.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.
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. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
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 operatingknownArgCount
- 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 dataaddress
- address of first value
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.