Example #1
0
    def __init__( self, global_ns, binary_file, hint ):
        libparser_t.__init__( self, global_ns, binary_file )
        self.__formated_decls = {}
        self.undname_creator = undname.undname_creator_t()

        formatter = lambda decl: self.undname_creator.format_decl( decl, hint )

        for f in self.global_ns.calldefs( allow_empty=True, recursive=True ):
            self.__formated_decls[ formatter( f ) ] = f

        for v in self.global_ns.variables( allow_empty=True, recursive=True ):
            self.__formated_decls[ formatter( v ) ] = v
Example #2
0
    def __init__(self, global_ns, binary_file, hint):
        libparser_t.__init__(self, global_ns, binary_file)
        self.__formated_decls = {}
        self.undname_creator = undname.undname_creator_t()

        formatter = lambda decl: self.undname_creator.format_decl(decl, hint)

        for f in self.global_ns.calldefs(allow_empty=True, recursive=True):
            self.__formated_decls[formatter(f)] = f

        for v in self.global_ns.variables(allow_empty=True, recursive=True):
            self.__formated_decls[formatter(v)] = v
Example #3
0
def format_decl( decl, hint=None ):
    """
    returns string, that represents formatted declaration, according to some rules
    :param hint: valid values are: "msvc" and "nm"
    """
    return undname.undname_creator_t().format_decl( decl, hint=hint )
Example #4
0
def undecorate_blob( blob ):
    """returns undecorated\unmangled string, created from blob(exported symbol name)"""
    return undname.undname_creator_t().undecorate_blob( blob )