Esempio n. 1
0
    def reload_info(self):
        if not dbg.is_process_suspended():
            return False

        self.ClearLines()
        for flag in dbg.registers.flags:
            value = idc.GetRegValue(flag)
            result = None

            if self.flag_vals[flag] != value:
                result = self.as_changed(str(value))
                self.flag_vals[flag] = value
            else:
                result = str(value)
            self.add_line('%-4s %s' % (flag, result))

        return True
Esempio n. 2
0
    def reload_info(self):
        if not dbg.is_process_suspended():
            return False

        self.ClearLines()
        dbg.set_thread_info()

        for reg in dbg.registers:
            line, changed = self.colorize_register(reg)
            self.add_line(line, changed)

        if dbg.is_pefile:
            self.add_line(*self.last_error_str())

        if config.show_leyend:
            self.add_leyend()
        return True
Esempio n. 3
0
    def reload_info(self):
        if not dbg.is_process_suspended():
            return False

        base_addr = None
        if self.base_expr is None:
            base_addr = idc.get_reg_value(dbg.registers.stack)
        else:
            base_addr = idaapi.str2ea(self.base_expr)
            if base_addr == idc.BADADDR:
                idaapi.warning("Invalid base expr: %s" % self.base_expr)
                return False

            if not idaapi.is_loaded(base_addr):
                idaapi.warning("Memory address is not loaded: $#x" % base_addr)
                return False

        self.ClearLines()
        dbg.set_thread_info()

        try:
            segm_end = idc.get_segm_end(base_addr)
            n_entries = config.n_stack_entries or ((segm_end - base_addr) //
                                                   dbg.ptr_size)

            for i in range(n_entries):
                offset = i * dbg.ptr_size
                ptr = base_addr + offset

                if not idaapi.is_loaded(ptr):
                    break

                value = dbg.get_ptr(ptr)
                self.add_line("%02d:%04X  %s" %
                              (i, offset, self.parse_value(ptr)))

        except Exception as e:
            idaapi.warning(str(e))
            return False
        return True