Repository navigation
trace function not set, causing some Pdb commands to fail #58933
Description
Activity
The bpo-13183 raises the problem that when the trace function is not
set in the caller frame, the step command fails at a return statement.This new issue raises the point that, for the same reason:
* the next, until and return statements fail also at a return statement when the caller frame does not have a trace function * when the user runs the up and down commands at any line in a frame to select a new frame, then the next, until or return commands fail when the selected frame does not have a trace functionThe attached patch fixes all those problems (by first removing the
changes made in bdb.py at bpo-13183).After the patch, the implementation ensures now that self.stopframe is
either None, or belongs to the stack frame in the interval
[self.botframe, self._curframe] and that it is set to self.botframe
when the debugging session terminates. This allows removing the while
loop in stop_here with an improvement in the performance of Pdb (since
stop_here may be called at each line, even when no breakpoint is set
in the function).The patch applies to the default branch and includes 5 new test cases.
A patch for 2.7 will be submitted later.- addedstdlibStandard Library Python modules in the Lib/ directoryStandard Library Python modules in the Lib/ directorytype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error
on May 5, 2012 Uploaded pdb_default.patch that applies on the default branch with
minor changes to the initial pdb.patch.Uploaded pdb_2.7.patch that applies on the 2.7 branch.
Since this pdb issue is a continuation of bpo-13183 and repeals a part of that issue's patch, I nosy'ed the contributors to that issue.
See also how this is fixed at
http://code.google.com/p/pdb-clone/source/detail?r=4a6d8f2515eed16347d2e2c304e1942585427d50- added a commit that references this issue
on May 13, 2024 - added a commit that references this issue
on Jul 17, 2024
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
Linked PRs