def preloop(self): fns.runhooks(self, self.preloop_hooks) if self.annotate > 0: if self.__show_annotations: # if we are here, the stack frames have changed outside the # command loop (e.g. after a "continue" command), so we show # the annotations again self.__annotation('breakpoints', self.do_info, 'breakpoints') self.__annotation('stack', self.do_where, 0) self.__annotation('locals', self.do_info, 'locals')
def postcmd(self, stop, line): if self.annotate > 0: cmd = "" if line: cmd = line.split()[0].strip() if not cmd: cmd = self.lastcmd if cmd in self.__show_breakpoints_postcmd: self.__annotation('breakpoints', self.do_info, 'breakpoints') self.__show_annotations = cmd in self.__show_annotations_preloop if cmd in self.__show_annotations_postcmd: self.__annotation('stack', self.do_where, 0) self.__annotation('locals', self.do_info, 'locals') fns.runhooks(self, self.postcmd_hooks, stop, line) return stop
def postloop(self): fns.runhooks(self, self.postloop_hooks) return
def precmd(self, line): fns.runhooks(self, self.precmd_hooks, line) return line