Beispiel #1
0
    def last_error_str(self):
        result = None
        changed = False
        last_error = dbg.get_last_error()

        if last_error is not None:
            if last_error != self.last_error:
                result = '*'
                changed = True
            else:
                result = ' '

            result += 'GLE %s' % self.as_value(dbg.format_ptr(last_error))
            error_name = win2_errors.error_code_to_name(last_error)
            if error_name:
                result += ' (%s)' % (error_name)

            self.last_error = last_error
        return result, changed
Beispiel #2
0
 def colorize_value(self, v):
     ptr_str = dbg.format_ptr(v.value)
     return self.colours[v.type](ptr_str)