This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: trace function not set, causing some Pdb commands to fail
Type: behavior Stage: patch review
Components: Library (Lib) Versions: Python 3.2, Python 3.3, Python 2.7
process
Status: open Resolution:
Dependencies: Superseder:
Assigned To: Nosy List: asvetlov, georg.brandl, loewis, neologix, orsenthil, terry.reedy, xdegaye
Priority: normal Keywords: patch

Created on 2012-05-05 10:43 by xdegaye, last changed 2022-04-11 14:57 by admin.

Files
File name Uploaded Description Edit
pdb.patch xdegaye, 2012-05-05 10:43 review
pdb_default.patch xdegaye, 2012-05-05 16:00 review
pdb_2.7.patch xdegaye, 2012-05-05 16:01
Messages (5)
msg159985 - (view) Author: Xavier de Gaye (xdegaye) * (Python triager) Date: 2012-05-05 10:43
The issue 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
      function

The attached patch fixes all those problems (by first removing the
changes made in bdb.py at issue 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.
msg159997 - (view) Author: Xavier de Gaye (xdegaye) * (Python triager) Date: 2012-05-05 16:00
Uploaded pdb_default.patch that applies on the default branch with
minor changes to the initial pdb.patch.
msg159998 - (view) Author: Xavier de Gaye (xdegaye) * (Python triager) Date: 2012-05-05 16:01
Uploaded pdb_2.7.patch that applies on the 2.7 branch.
msg160417 - (view) Author: Terry J. Reedy (terry.reedy) * (Python committer) Date: 2012-05-11 16:26
Since this pdb issue is a continuation of #13183 and repeals a part of that issue's patch, I nosy'ed the contributors to that issue.
msg176277 - (view) Author: Xavier de Gaye (xdegaye) * (Python triager) Date: 2012-11-24 10:58
See also how this is fixed at
http://code.google.com/p/pdb-clone/source/detail?r=4a6d8f2515eed16347d2e2c304e1942585427d50
History
Date User Action Args
2022-04-11 14:57:29adminsetgithub: 58933
2012-12-05 11:07:49asvetlovsetnosy: + asvetlov
2012-11-24 10:58:20xdegayesetmessages: + msg176277
2012-05-11 16:26:08terry.reedysetnosy: + terry.reedy, neologix, loewis, georg.brandl, orsenthil

messages: + msg160417
stage: patch review
2012-05-05 16:01:12xdegayesetfiles: + pdb_2.7.patch

messages: + msg159998
2012-05-05 16:00:24xdegayesetfiles: + pdb_default.patch

messages: + msg159997
2012-05-05 10:43:44xdegayecreate