def decorate(self, frame): """ Decorate a single `frame`. """ # Note, that `frame` may be either an instance of `gdb.Frame` or # another decorator, so make sure it is a decorator if isinstance(frame, gdb.Frame): frame = gdb.FrameDecorator.FrameDecorator(frame) symbol = _lookup_symbol_by_addr(frame.inferior_frame().pc()) if symbol != None: frame = FrameDecorator(frame, symbol) return frame
def __init__ (self, frames): FrameDecorator.__init__(self, frames[-1]) self.frame = frames[-1] self.frames = frames