Class LinuxSyscallResolver

java.lang.Object
com.pnfsoftware.jeb.core.units.code.asm.LinuxSyscallResolver

public class LinuxSyscallResolver extends Object
Generic Linux syscall number-to-name and number-to-routine provider.
  • Method Details

    • getInstance

      public static LinuxSyscallResolver getInstance(ProcessorType procType)
      Retrieve the syscall resolver for a processor type.
      Parameters:
      procType - processor type
      Returns:
      resolver instance, or null if the processor type is unsupported
    • isSyscall

      public boolean isSyscall(IInstruction insn)
      Indicate is an IInstruction is a syscall. Only implemented for x86 and ARM families.
      Parameters:
      insn - instruction to test
      Returns:
      true if the instruction is a known syscall, false is the instruction is not a syscall or not managed.
    • getSyscallRegisterId

      public long getSyscallRegisterId(IInstruction insn)
      Retrieve the register ID where the syscall number is stored
      Parameters:
      insn - syscall instruction
      Returns:
      register identifier, or -1 if unsupported
    • getName

      public String getName(int syscallNumber)
      Retrieve a syscall name.
      Parameters:
      syscallNumber - syscall number
      Returns:
      syscall name, or null if unknown
    • getPrototype

      public IPrototypeItem getPrototype(int syscallNumber, ITypeManager typeman)
      Retrieve a syscall prototype from available type libraries.
      Parameters:
      syscallNumber - syscall number
      typeman - type manager
      Returns:
      prototype, or null if unavailable
    • getRoutine

      public INativeMethodItem getRoutine(int syscallNumber, ITypeManager typeman)
      Retrieve a syscall routine from available type libraries.
      Parameters:
      syscallNumber - syscall number
      typeman - type manager
      Returns:
      routine, or null if unavailable