frysk.isa.syscalls
Class SyscallTable

java.lang.Object
  extended by frysk.isa.syscalls.SyscallTable
Direct Known Subclasses:
LinuxIA32SyscallTable, LinuxPPC32SyscallTable, LinuxPPC64SyscallTable, LinuxX8664SyscallTable

public abstract class SyscallTable
extends Object

System call database.


Field Summary
private static WeakHashMap unknownSyscalls
           
 
Constructor Summary
SyscallTable()
           
 
Method Summary
(package private)  Syscall findSubcall(Syscall[] subcalls, long num, Syscall unknown)
          Return the system call responding to N; or UNKNOWN.
(package private)  Syscall findSyscall(Syscall[] syscalls, long num)
          Return the system call responding to N; or NULL.
abstract  long getNumSyscalls()
          Return the number of syscalls.
abstract  Syscall getSyscall(long num)
          Return the NUM'th system call; implemented using findSyscall.
abstract  Syscall getSyscall(String Name)
           
abstract  Syscall getSyscall(Task task)
          Assuming that TASK is at a system-call entry, return the system call.
(package private)  Syscall iterateSyscallByName(String name, Syscall[] syscallList)
          Given a system call's name, this will return the corresponding Syscall object.
(package private)  Syscall unknownSyscall(long num)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

unknownSyscalls

private static WeakHashMap unknownSyscalls
Constructor Detail

SyscallTable

public SyscallTable()
Method Detail

unknownSyscall

Syscall unknownSyscall(long num)
Returns:
Syscall return a system-call representing the unknown NUM.

getSyscall

public abstract Syscall getSyscall(String Name)
Returns:
Syscall return system call object if the name could be found in syscallList, otherwise return null.

iterateSyscallByName

Syscall iterateSyscallByName(String name,
                             Syscall[] syscallList)
Given a system call's name, this will return the corresponding Syscall object. If no predefined system call with that name is available, this will return null.

Parameters:
name - the name of the system call
syscallList - system calls list
Returns:
the Syscall object, or null

findSyscall

Syscall findSyscall(Syscall[] syscalls,
                    long num)
Return the system call responding to N; or NULL.


findSubcall

Syscall findSubcall(Syscall[] subcalls,
                    long num,
                    Syscall unknown)
Return the system call responding to N; or UNKNOWN.


getSyscall

public abstract Syscall getSyscall(long num)
Return the NUM'th system call; implemented using findSyscall.


getNumSyscalls

public abstract long getNumSyscalls()
Return the number of syscalls.


getSyscall

public abstract Syscall getSyscall(Task task)
Assuming that TASK is at a system-call entry, return the system call.

Parameters:
task - the task that system call occurred
Returns:
the Syscall object