def __str__(self): result = [str(f) for f in self] if self.abnormal_termination: reason = self[-1].unwind_stop_reason() result.append("abnormal stack unwind termination: {}".format( gdb.frame_stop_reason_string(reason))) return "\n".join(result)
def __str__(self): result = "\n".join([str(f) for f in self]) if self.abnormal_termination: reason = self[len(self) - 1].unwind_stop_reason() result += "\nabnormal stack unwind termination: %s" % \ gdb.frame_stop_reason_string(reason) return result
def get_contents(self): str = '' str += Strongdb.border_header('Backtrace') frame = gdb.selected_frame() while frame != None: str += '\t%s -> %s()\n' % (Strongdb.colorize(hex(frame.pc())[:-1], Colors.address_color), frame.name() if frame.name() != None else '??') older_frm = frame.older() if older_frm == None: str += Strongdb.colorize('\t' + gdb.frame_stop_reason_string(frame.unwind_stop_reason()), Colors.address_color) frame = older_frm str += Strongdb.border_footer() return str
def get_contents(self): str = '' str += Strongdb.border_header('Backtrace') frame = gdb.selected_frame() while frame != None: str += '\t%s -> %s()\n' % (Strongdb.colorize( hex(frame.pc())[:-1], Colors.address_color), frame.name() if frame.name() != None else '??') older_frm = frame.older() if older_frm == None: str += Strongdb.colorize( '\t' + gdb.frame_stop_reason_string(frame.unwind_stop_reason()), Colors.address_color) frame = older_frm str += Strongdb.border_footer() return str