[Python-checkins] python/dist/src/Lib/bdb.py
Christian Tismer
tismer@tismer.com
Tue, 28 May 2002 13:08:30 -0700
(this message is hand-generated, due to a crash in the notification system)
Update of /cvsroot/python/python/dist/src/Lib
Modified files:
bdb.py
Log message:
This is a Python 2.1 and 2.2 bugfix candidate:
(or how do I "mark" something to be a candidate?)
fixed an old buglet that caused bdb to be unable to
continue in the botframe, after a breakpoint was set.
the key idea is not to set botframe to the bottom level frame,
but its f_back, which actually might be None.
Additional changes: migrated old exception trick to use
sys._getframe(), which exists both in 2.1 and 2.2 .
Note: I believe Mark Hammond needs to look over his code now.
F5 correctly starts up in the debugger, but later on doesn't stop at a given
breakpoint any longer.
kind regards - chris
Index: bdb.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/bdb.py,v
retrieving revision 1.38
retrieving revision 1.39
diff -r1.38 -r1.39
68c68
< self.botframe = frame
---
> self.botframe = frame.f_back # (CT) Note that this may
also be None!
94,95c94,95
< if self.stopframe is None:
< return True
---
> # (CT) stopframe may now also be None, see dispatch_call.
> # (CT) the former test for None is therefore removed from here.
172,175c172
< try:
< raise Exception
< except:
< frame = sys.exc_info()[2].tb_frame.f_back
---
> frame = sys._getframe().f_back
192,195c189
< try:
< raise Exception
< except:
< frame = sys.exc_info()[2].tb_frame.f_back
---
> frame = sys._getframe().f_back