def __read_register(self, register): base_register, base_value, offset = self.__get_register_value(register) value = extract_value(base_value, offset, register.size) # Keep track of native register reads. if register.name in self.__arch.registers_gp_all: self.__regs_read.add(register.name) if DEBUG: self.__debug_read_operand(base_register, register.name, value) return value
def _compute_full_context(self, registers): regs_full = {} reg_mapper = self._arch_info.alias_mapper for reg in self._arch_regs: base_reg_name, offset = reg_mapper.get(reg, (None, None)) if base_reg_name: reg_value = registers[base_reg_name] reg_value = extract_value(reg_value, offset, self._arch_info.registers_size[reg]) else: reg_value = registers[reg] regs_full[reg] = reg_value return regs_full