(self, number, allow_unsupported=True, abi=None)
return proc
Get a syscall SimProcedure from its number.

        :param number:              The syscall number
        :param allow_unsupported:   Whether to return a "stub" syscall for unsupported numbers instead of throwing an error
        :param abi:                 The name of the abi to use. If None, will assume that the abis have disjoint
                                    numbering schemes and pick the right one.
        :return: The SimProcedure for the syscall
Get a syscall SimProcedure from its number.
Get a syscall SimProcedure from its number .
def syscall_from_number(self, number, allow_unsupported=True, abi=None):
        """
        Get a syscall SimProcedure from its number.

        :param number:              The syscall number
        :param allow_unsupported:   Whether to return a "stub" syscall for unsupported numbers instead of throwing an error
        :param abi:                 The name of the abi to use. If None, will assume that the abis have disjoint
                                    numbering schemes and pick the right one.
        :return: The SimProcedure for the syscall
        """
        abilist = self.syscall_abis if abi is None else [abi]

        if self.syscall_library is None:
            if not allow_unsupported:
                raise AngrUnsupportedSyscallError("%s does not have a library of syscalls implemented" % self.name)
            proc = P['stubs']['syscall']()
        elif not allow_unsupported and not self.syscall_library.has_implementation(number, self.arch, abilist):
            raise AngrUnsupportedSyscallError("No implementation for syscall %d" % number)
        else:
            proc = self.syscall_library.get(number, self.arch, abilist)

        if proc.abi is not None:
            baseno, minno, _ = self.syscall_abis[proc.abi]
            mapno = number - minno + baseno
        else:
            mapno = self.unknown_syscall_number

        proc.addr = mapno * self.syscall_addr_alignment + self.kernel_base
        return proc
def syscall_from_number ( self , number , allow_unsupported = True , abi = None ) : abilist = self . syscall_abis if abi is None else [ abi ] if self . syscall_library is None : if not allow_unsupported : raise AngrUnsupportedSyscallError ( "%s does not have a library of syscalls implemented" % self . name ) proc = P [ 'stubs' ] [ 'syscall' ] ( ) elif not allow_unsupported and not self . syscall_library . has_implementation ( number , self . arch , abilist ) : raise AngrUnsupportedSyscallError ( "No implementation for syscall %d" % number ) else : proc = self . syscall_library . get ( number , self . arch , abilist ) if proc . abi is not None : baseno , minno , _ = self . syscall_abis [ proc . abi ] mapno = number - minno + baseno else : mapno = self . unknown_syscall_number proc . addr = mapno * self . syscall_addr_alignment + self . kernel_base return proc