Unnamed Fossil Project

Check-in [50758d1850]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Let up/down take # steps, nice for debugging stack overflow on deep recursion.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256:50758d1850a199e599a6a7029f9b70efa67fab6ba8dcbe6136fa9954e4bb5646
User & Date: vandys 2018-11-17 18:45:47
Context
2018-11-20
00:12
Add some documentation check-in: b376ac288c user: vandys tags: trunk
2018-11-17
18:45
Let up/down take # steps, nice for debugging stack overflow on deep recursion. check-in: 50758d1850 user: vandys tags: trunk
18:39
The obvious alias for "tbreak" (and supported by gdb, too) check-in: 6de4efb9f8 user: vandys tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to pdb.py.

637
638
639
640
641
642
643
644








645
646
647

648
649

650
651
652
653
654
655









656
657
658

659
660

661
662
663
664
665
666
667
        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.curframe_locals = self.curframe.f_locals

            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.curframe_locals = self.curframe.f_locals

            self.print_stack_entry(self.stack[self.curindex])
            self.lineno = None

    do_d = do_down

    def do_until(self, arg):
	self.pdb_state("stepping")
        self.set_until(self.curframe)
        return 1
    do_unt = do_until







|
>
>
>
>
>
>
>
>
|
|
|
>
|
|
>





<
>
>
>
>
>
>
>
>
>
|
|
|
>
|
|
>







637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664

665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
        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'
	    return

	# Default up 1, else count
	nup = 1
	if arg:
	    nup = int(eval(arg))
	while nup > 0:
	    if self.curindex == 0:
		break
	    self.curindex -= 1
	    self.curframe = self.stack[self.curindex][0]
	    self.curframe_locals = self.curframe.f_locals
	    nup -= 1
	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'

	    return

	# Default down 1, else count
	ndown = 1
	if arg:
	    ndown = int(eval(arg))
	while ndown > 0:
	    if self.curindex + 1 == len(self.stack):
		break
	    self.curindex += 1
	    self.curframe = self.stack[self.curindex][0]
	    self.curframe_locals = self.curframe.f_locals
	    ndown -= 1
	self.print_stack_entry(self.stack[self.curindex])
	self.lineno = None

    do_d = do_down

    def do_until(self, arg):
	self.pdb_state("stepping")
        self.set_until(self.curframe)
        return 1
    do_unt = do_until