(self, labels=None, types=None)
Assign default names to all SSA variables.

        :param labels:  Known labels in the binary.
        :return:        None
Assign default names to all SSA variables.
Assign default names to all SSA variables .
def assign_variable_names(self, labels=None, types=None):
        """
        Assign default names to all SSA variables.

        :param labels:  Known labels in the binary.
        :return:        None
        """

        for var in self._variables:
            if (types is None or SimStackVariable in types) and isinstance(var, SimStackVariable):
                if var.name is not None:
                    continue
                if var.ident.startswith('iarg'):
                    var.name = 'arg_%x' % var.offset
                else:
                    var.name = 's_%x' % (-var.offset)
                    # var.name = var.ident
            elif (types is None or SimRegisterVariable in types) and isinstance(var, SimRegisterVariable):
                if var.name is not None:
                    continue
                var.name = var.ident
            elif (types is None or SimMemoryVariable in types) and isinstance(var, SimMemoryVariable):
                if var.name is not None:
                    continue
                if labels is not None and var.addr in labels:
                    var.name = labels[var.addr]
                    if "@@" in var.name:
                        var.name = var.name[:var.name.index("@@")]
                elif isinstance(var.addr, int):
                    var.name = "g_%x" % var.addr
                elif var.ident is not None:
                    var.name = var.ident
                else:
                    var.name = "g_%s" % var.addr
def assign_variable_names ( self , labels = None , types = None ) : for var in self . _variables : if ( types is None or SimStackVariable in types ) and isinstance ( var , SimStackVariable ) : if var . name is not None : continue if var . ident . startswith ( 'iarg' ) : var . name = 'arg_%x' % var . offset else : var . name = 's_%x' % ( - var . offset ) # var.name = var.ident elif ( types is None or SimRegisterVariable in types ) and isinstance ( var , SimRegisterVariable ) : if var . name is not None : continue var . name = var . ident elif ( types is None or SimMemoryVariable in types ) and isinstance ( var , SimMemoryVariable ) : if var . name is not None : continue if labels is not None and var . addr in labels : var . name = labels [ var . addr ] if "@@" in var . name : var . name = var . name [ : var . name . index ( "@@" ) ] elif isinstance ( var . addr , int ) : var . name = "g_%x" % var . addr elif var . ident is not None : var . name = var . ident else : var . name = "g_%s" % var . addr