Associate a syscall number with the name of a function present in the underlying SimLibrary

        :param abi:     The abi for which this mapping applies
        :param number:  The syscall number
        :param name:    The name of the function
546178
def add_number_mapping(self, abi, number, name):
        
        self.syscall_number_mapping[abi][number] = name
        self.syscall_name_mapping[abi][name] = number
890870
public static Object callName(Object[] args, String name,
                                  Context cx, Scriptable scope)
    {
        Callable f = getNameFunctionAndThis(name, cx, scope);
        Scriptable thisObj = lastStoredScriptable(cx);
        return f.call(cx, scope, thisObj, args);
    }
938914
def function_body(self):
        """"""
        if self.shared.function_vars > 0:
            const = self.symtab.insert_constant("0{}".format(self.shared.function_vars * 4), SharedData.TYPES.UNSIGNED)
            self.arithmetic("-", "%15", const, "%15")
        self.newline_label(self.shared.function_name + "_body", True, True)
711015
def _get_addr(self, v):
        

        if isinstance(v, CFGNode):
            return v.addr
        elif type(v) is int:
            return v
        else:
            raise AngrBladeError('Unsupported SimRun argument type %s' % type(v))
576370
def prepare_function_symbol(self, symbol_name, basic_addr=None):
        
        if basic_addr is None:
            basic_addr = self.project.loader.extern_object.get_pseudo_addr(symbol_name)
        return basic_addr, basic_addr
754321
def Name(self, number):
    """"""
    if number in self._enum_type.values_by_number:
      return self._enum_type.values_by_number[number].name
    raise ValueError('Enum %s has no name defined for value %d' % (
        self._enum_type.name, number))
107648
def _guess_simprocedure(self, f, hint):
        
        # First, filter the SIM_LIBRARIES to a reasonable subset based on the hint
        hinted_libs = []
        if hint == "win":
            hinted_libs = filter(lambda lib: lib if lib.endswith(".dll") else None, SIM_LIBRARIES)
        else:
            hinted_libs = filter(lambda lib: lib if ".so" in lib else None, SIM_LIBRARIES)

        for lib in hinted_libs:
            if SIM_LIBRARIES[lib].has_implementation(f.name):
                l.debug("Found implementation for %s in %s", f, lib)
                self.hook_symbol(f.relative_addr, (SIM_LIBRARIES[lib].get(f.name, self.arch)))
                break
        else:
            l.debug("Could not find matching SimProcedure for %s, ignoring.", f.name)
1236095
def simxSetIntegerSignal(clientID, signalName, signalValue, operationMode):
    '''
    
    '''

    if (sys.version_info[0] == 3) and (type(signalName) is str):
        signalName=signalName.encode('utf-8')
    return c_SetIntegerSignal(clientID, signalName, signalValue, operationMode)
1054289
function ScriptNum(num, base) {
  if (!(this instanceof ScriptNum))
    return new ScriptNum(num, base);

  I64.call(this, num, base);
}
1068623
def name(self, name):
        
        success = idaapi.set_enum_member_name(self.cid, name)
        if not success:
            raise exceptions.CantRenameEnumMember(
                "Failed renaming {!r} to {!r}. Does the name exist somewhere else?".format(self.name, name))
865859
def _get_initial_name(self):
        

        name = None
        addr = self.addr

        # Try to get a name from existing labels
        if self._function_manager is not None:
            if addr in self._function_manager._kb.labels:
                name = self._function_manager._kb.labels[addr]

        # try to get the name from a hook
        if name is None and self.project is not None:
            project = self.project
            if project.is_hooked(addr):
                hooker = project.hooked_by(addr)
                name = hooker.display_name
            elif project.simos.is_syscall_addr(addr):
                syscall_inst = project.simos.syscall_from_addr(addr)
                name = syscall_inst.display_name

        # generate an IDA-style sub_X name
        if name is None:
            name = 'sub_%x' % addr

        return name
773499
def function_begin_action(self, text, loc, fun):
        """"""
        exshared.setpos(loc, text)
        if DEBUG > 0:
            print("FUN_BEGIN:",fun)
            if DEBUG == 2: self.symtab.display()
            if DEBUG > 2: return
        self.shared.function_index = self.symtab.insert_function(fun.name, fun.type)
        self.shared.function_name = fun.name
        self.shared.function_params = 0
        self.shared.function_vars = 0
        self.codegen.function_begin();
434134
def simxSetBooleanParameter(clientID, paramIdentifier, paramValue, operationMode):
    '''
    
    '''

    return c_SetBooleanParameter(clientID, paramIdentifier, paramValue, operationMode)
769444
def show(self, func_name, values, labels=None):
        """"""
        s = self.Stanza(self.indent)
        if func_name == '<module>' and self.in_console:
            func_name = '<console>'
        s.add([func_name + ': '])
        reprs = map(self.safe_repr, values)
        if labels:
            sep = ''
            for label, repr in zip(labels, reprs):
                s.add([label + '=', self.CYAN, repr, self.NORMAL], sep)
                sep = ', '
        else:
            sep = ''
            for repr in reprs:
                s.add([self.CYAN, repr, self.NORMAL], sep)
                sep = ', '
        self.writer.write(s.chunks)
885414
def set_function_name(f, name, cls):
    
    f.__name__ = name
    f.__qualname__ = '{klass}.{name}'.format(
        klass=cls.__name__,
        name=name)
    f.__module__ = cls.__module__
    return f
551309
def decorate(self, func):
		
		self.func = func
		self._set_implied_name()
		self.register()
		return func
43831
def register(op_name):
        """"""
        def wrapper(func):
            """Helper function to map functions"""
            try:
                import onnx as _
                MXNetGraph.registry_[op_name] = func
            except ImportError:
                pass
            return func

        return wrapper