Closed fengjian closed 3 years ago
I think word_size = int(self.panda.bits/8)
def dump_stack(self, cpu, words=8): ''' Print (telescoping) most recent `words` words on the stack (from stack pointer to stack pointer + `words`*word_size) ''' base_reg_s = "SP" base_reg_val = self.get_reg(cpu, self.reg_sp) word_size = int(self.panda.bits/4) for word_idx in range(words): val_b = self.panda.virtual_memory_read(cpu, base_reg_val+word_idx*word_size, word_size) val = int.from_bytes(val_b, byteorder='little') print("[{}+0x{:0>2x} == 0x{:0<8x}]: 0x{:0<8x}".format(base_reg_s, word_idx*word_size, base_reg_val+word_idx*word_size, val), end="\t") telescope(self.panda, cpu, val)
Fixed by #1006
I think word_size = int(self.panda.bits/8)