(self, k, v)
Set value to a register.

        :param str k: Name of the register. Prefix it with "_" prevents SimInspect being triggered and SimActions being
                      created.
        :param v:     Value to set to the register.
        :return:      None
Set value to a register.
Set value to a register .
def __setattr__(self, k, v):
        """
        Set value to a register.

        :param str k: Name of the register. Prefix it with "_" prevents SimInspect being triggered and SimActions being
                      created.
        :param v:     Value to set to the register.
        :return:      None
        """

        if k == 'state' or k in dir(SimStatePlugin):
            return object.__setattr__(self, k, v)

        if isinstance(k, str) and k.startswith('_'):
            k = k[1:]
            inspect = False
            disable_actions = True
        else:
            inspect = True
            disable_actions = False

        # When executing a Java JNI application, we need to update the state's
        # instruction pointer flag every time the ip gets written.
        # This flag will then toggle between the native and the java view of the
        # state.
        if self.state.project and \
           isinstance(self.state.project.arch, ArchSoot) and \
           k == 'ip' and \
           self.state.project.simos.is_javavm_with_jni_support:
            self.state.ip_is_soot_addr = isinstance(v, SootAddressDescriptor)

        try:
            return self.state.registers.store(k, v, inspect=inspect, disable_actions=disable_actions)
        except KeyError:
            # What do we do in case we are dealing with soot? there are no register
            if isinstance(self.state.arch, ArchSoot):
                pass
            else:
                raise AttributeError(k)
def __setattr__ ( self , k , v ) : if k == 'state' or k in dir ( SimStatePlugin ) : return object . __setattr__ ( self , k , v ) if isinstance ( k , str ) and k . startswith ( '_' ) : k = k [ 1 : ] inspect = False disable_actions = True else : inspect = True disable_actions = False # When executing a Java JNI application, we need to update the state's # instruction pointer flag every time the ip gets written. # This flag will then toggle between the native and the java view of the # state. if self . state . project and isinstance ( self . state . project . arch , ArchSoot ) and k == 'ip' and self . state . project . simos . is_javavm_with_jni_support : self . state . ip_is_soot_addr = isinstance ( v , SootAddressDescriptor ) try : return self . state . registers . store ( k , v , inspect = inspect , disable_actions = disable_actions ) except KeyError : # What do we do in case we are dealing with soot? there are no register if isinstance ( self . state . arch , ArchSoot ) : pass else : raise AttributeError ( k )