*** pdb.py 2010/06/15 17:17:36 1.1 --- pdb.py 2010/06/15 18:02:28 *************** *** 602,630 **** def do_where(self, arg): self.print_stack_trace() do_w = do_where do_bt = do_where def do_up(self, arg): ! if self.curindex == 0: ! print >>self.stdout, '*** Oldest frame' ! else: ! self.curindex = self.curindex - 1 self.curframe = self.stack[self.curindex][0] - self.print_stack_entry(self.stack[self.curindex]) self.lineno = None do_u = do_up def do_down(self, arg): ! if self.curindex + 1 == len(self.stack): ! print >>self.stdout, '*** Newest frame' ! else: ! self.curindex = self.curindex + 1 self.curframe = self.stack[self.curindex][0] - self.print_stack_entry(self.stack[self.curindex]) self.lineno = None do_d = do_down def do_until(self, arg): self.set_until(self.curframe) return 1 do_unt = do_until --- 602,652 ---- def do_where(self, arg): self.print_stack_trace() do_w = do_where do_bt = do_where def do_up(self, arg): ! nup = 1 ! if arg: ! try: ! nup = int(arg) ! if nup < 0: ! nup = self.curindex ! except: ! pass ! ! for _ignore in xrange(nup): ! if self.curindex is 0: ! print >>self.stdout, '*** Oldest frame' ! break ! self.curindex -= 1 self.curframe = self.stack[self.curindex][0] self.lineno = None + self.print_stack_entry(self.stack[self.curindex]) + do_u = do_up def do_down(self, arg): ! ndown = 1 ! if arg: ! try: ! ndown = int(arg) ! if ndown < 0: ! ndown = len(self.stack) - self.curindex ! except: ! pass ! ! for _ignore in xrange(ndown): ! if self.curindex + 1 is len(self.stack): ! print >>self.stdout, '*** Newest frame' ! break ! self.curindex += 1 self.curframe = self.stack[self.curindex][0] self.lineno = None + self.print_stack_entry(self.stack[self.curindex]) + do_d = do_down def do_until(self, arg): self.set_until(self.curframe) return 1 do_unt = do_until *************** *** 895,917 **** help_bt = help_w def help_down(self): self.help_d() def help_d(self): ! print >>self.stdout, """d(own) ! Move the current frame one level down in the stack trace ! (to a newer frame).""" def help_up(self): self.help_u() def help_u(self): ! print >>self.stdout, """u(p) ! Move the current frame one level up in the stack trace ! (to an older frame).""" def help_break(self): self.help_b() def help_b(self): print >>self.stdout, """b(reak) ([file:]lineno | function) [, condition] --- 917,939 ---- help_bt = help_w def help_down(self): self.help_d() def help_d(self): ! print >>self.stdout, """d(own) [#steps] ! Move the current frame #steps levels (default 1) down (towards newer frames) ! in the stack trace. If #steps is -1, move to bottom of trace.""" def help_up(self): self.help_u() def help_u(self): ! print >>self.stdout, """u(p) [#steps] ! Move the current frame #steps levels (default 1) up (towards older frames) ! in the stack trace. If #steps is -1, move to top of trace.""" def help_break(self): self.help_b() def help_b(self): print >>self.stdout, """b(reak) ([file:]lineno | function) [, condition]