(self, varnode: Varnode)
return reg_offset
Map SLEIGH register offset to ArchInfo register offset based on name.

        :param varnode: Varnode to translate.
        :return:        Register file offset.
Map SLEIGH register offset to ArchInfo register offset based on name.
Map SLEIGH register offset to ArchInfo register offset based on name .
def _map_register_name(self, varnode: Varnode) -> int:
        """
        Map SLEIGH register offset to ArchInfo register offset based on name.

        :param varnode: Varnode to translate.
        :return:        Register file offset.
        """
        # FIXME: Will need performance optimization
        # FIXME: Should not get trans object this way. Moreover, should have a faster mapping method than going through trans
        reg_name = varnode.get_register_name()
        try:
            reg_offset = self.state.project.arch.get_register_offset(reg_name.lower())
            l.debug("Mapped register '%s' to offset %x", reg_name, reg_offset)
        except ValueError:
            reg_offset = varnode.offset + 0x100000
            l.debug("Could not map register '%s' from archinfo. Mapping to %x", reg_name, reg_offset)
        return reg_offset
def _map_register_name ( self , varnode : Varnode ) -> int : # FIXME: Will need performance optimization # FIXME: Should not get trans object this way. Moreover, should have a faster mapping method than going through trans reg_name = varnode . get_register_name ( ) try : reg_offset = self . state . project . arch . get_register_offset ( reg_name . lower ( ) ) l . debug ( "Mapped register '%s' to offset %x" , reg_name , reg_offset ) except ValueError : reg_offset = varnode . offset + 0x100000 l . debug ( "Could not map register '%s' from archinfo. Mapping to %x" , reg_name , reg_offset ) return reg_offset