diff options
author | Tian Gao <gaogaotiantian@hotmail.com> | 2024-10-15 14:51:37 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-10-15 14:51:37 (GMT) |
commit | 703227dd021491ceb9343f69fa48f4b6a05adbb3 (patch) | |
tree | 2e68e677552b09c6a997e0377d24bb30ec948efb /Lib/bdb.py | |
parent | d3c82b9ccedd77fc302f5ab8ab0220b3372f574c (diff) | |
download | cpython-703227dd021491ceb9343f69fa48f4b6a05adbb3.zip cpython-703227dd021491ceb9343f69fa48f4b6a05adbb3.tar.gz cpython-703227dd021491ceb9343f69fa48f4b6a05adbb3.tar.bz2 |
gh-125422: Don't set the caller's f_trace if it's botframe (#125427)
Diffstat (limited to 'Lib/bdb.py')
-rw-r--r-- | Lib/bdb.py | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -350,9 +350,10 @@ class Bdb: # Issue #13183: pdb skips frames after hitting a breakpoint and running # step commands. # Restore the trace function in the caller (that may not have been set - # for performance reasons) when returning from the current frame. + # for performance reasons) when returning from the current frame, unless + # the caller is the botframe. caller_frame = current_frame.f_back - if caller_frame and not caller_frame.f_trace: + if caller_frame and not caller_frame.f_trace and caller_frame is not self.botframe: caller_frame.f_trace = self.trace_dispatch # Derived classes and clients can call the following methods |