(parsed_cprotos: List[Tuple[str,'SimTypeFunction',str]],
                      fd_spots=frozenset(),
                      remove_sys_prefix=False)
return s
Parse a list of C function declarations and output to Python code that can be embedded into
    angr.procedures.definitions.

    >>> # parse the list of glibc C prototypes and output to a file
    >>> from angr.procedures.definitions import glibc
    >>> with open("glibc_protos", "w") as f: f.write(cprotos2py(glibc._libc_c_decls))

    :param parsed_cprotos:  A list of tuples where each tuple is (function name, parsed C function prototype,
                            the original function declaration).
    :return:                A Python string.
Parse a list of C function declarations and output to Python code that can be embedded into
    angr.procedures.definitions.
Parse a list of C function declarations and output to Python code that can be embedded into angr . procedures . definitions .
def parsedcprotos2py(parsed_cprotos: List[Tuple[str,'SimTypeFunction',str]],
                      fd_spots=frozenset(),
                      remove_sys_prefix=False) -> str:
    """
    Parse a list of C function declarations and output to Python code that can be embedded into
    angr.procedures.definitions.

    >>> # parse the list of glibc C prototypes and output to a file
    >>> from angr.procedures.definitions import glibc
    >>> with open("glibc_protos", "w") as f: f.write(cprotos2py(glibc._libc_c_decls))

    :param parsed_cprotos:  A list of tuples where each tuple is (function name, parsed C function prototype,
                            the original function declaration).
    :return:                A Python string.
    """
    s = ""
    for func_name, proto_, decl in parsed_cprotos:
        if remove_sys_prefix and func_name.startswith('sys'):
            func_name = '_'.join(func_name.split('_')[1:])
        if proto_ is not None:
            if (func_name, -1) in fd_spots:
                proto_.returnty = SimTypeFd(label=proto_.returnty.label)
            for i, arg in enumerate(proto_.args):
                if (func_name, i) in fd_spots:
                    proto_.args[i] = SimTypeFd(label=arg.label)

        line1 = ' '*8 + '# ' + decl + '\n'
        line2 = ' '*8 + repr(func_name) + ": " + (proto_._init_str() if proto_ is not None else "None") + ',' + '\n'
        s += line1 + line2
    return s
def parsedcprotos2py ( parsed_cprotos : List [ Tuple [ str , 'SimTypeFunction' , str ] ] , fd_spots = frozenset ( ) , remove_sys_prefix = False ) -> str : s = "" for func_name , proto_ , decl in parsed_cprotos : if remove_sys_prefix and func_name . startswith ( 'sys' ) : func_name = '_' . join ( func_name . split ( '_' ) [ 1 : ] ) if proto_ is not None : if ( func_name , - 1 ) in fd_spots : proto_ . returnty = SimTypeFd ( label = proto_ . returnty . label ) for i , arg in enumerate ( proto_ . args ) : if ( func_name , i ) in fd_spots : proto_ . args [ i ] = SimTypeFd ( label = arg . label ) line1 = ' ' * 8 + '# ' + decl + '\n' line2 = ' ' * 8 + repr ( func_name ) + ": " + ( proto_ . _init_str ( ) if proto_ is not None else "None" ) + ',' + '\n' s += line1 + line2 return s