Message41787
"Set Next Statement", aka "Jump", for Python debuggers.
For Python 2.3a0 on all platforms (built and tested in Win98).
This patch adds the ability for Python debuggers (including
pdb) to control which line of code in a frame will be executed
next. This allows the user to jump back and execute code
again, or jump forward to skip code that he doesn't want to
run. A debugger (or anything else that installs a trace
function) does this by setting the value of frame.f_lineno
from within a trace function.
There are some situations where you can't jump because it
would break the stack - these are caught and a ValueError
is raised.
There are other cases where the jump *is* possible but the
stack needs fixing up, and the code does that.
The patch includes:
o A setter for frame.f_lineno, in frameobject.c
o A new command 'j(ump) <line number>' for pdb.
o Tests in test_trace.py for all the allowed and disallowed
types of jumps.
o Updated documentation for pdb and frame objects.
|
|
Date |
User |
Action |
Args |
2007-08-23 15:18:33 | admin | link | issue643835 messages |
2007-08-23 15:18:33 | admin | create | |
|