[Patches] [ python-Patches-809887 ] Improve pdb breakpoint feedback
SourceForge.net
noreply at sourceforge.net
Sat Sep 20 15:52:13 EDT 2003
Patches item #809887, was opened at 2003-09-20 13:52
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=809887&group_id=5470
Category: Library (Lib)
Group: Python 2.3
Status: Open
Resolution: None
Priority: 5
Submitted By: Kevin J. Butler (kevinbutler)
Assigned to: Nobody/Anonymous (nobody)
Summary: Improve pdb breakpoint feedback
Initial Comment:
pdb was inconsistent in reporting changes to
breakpoints, reporting 'Deleted breakpoint #' in one
case, and not reporting the deletion in another.
This patch makes pdb consistently report
"Deleted/disabled/enabled breakpoint # at PATH:#"
for deleting, enabling, or disabling a breakpoint.
This makes it easier to integrate with IDEs such as
emacs gud mode (see discussion on python-dev startig
with
http://mail.python.org/pipermail/python-dev/2003-September/038147.html
).
Potential items for concern:
- I completely replaced the Bdb.get_break method. It
was returning a boolean indicating if the breakpoint
existed or not, which appeared to be an error
(get_breaks returned the list of breakpoints). The
method was never used in bdb.py or pdb.py, so I
replaced it with what I thought it should be. :-)
That is, it now returns the breakpoint instance
requested. If there is a reason, I can easily make
this a new method
(get_breakpoint/get_breakpointinstance) rather than
replacing get_break.
- I've duplicated logic from Bdb.clear_bpbynumber into
a new method get_bpbynumber. The logic differs only in
the return error messages or None. This seemed the
simplest way to preserve the return value semantics
convention of the Bdb class.
- I'm also calling 'get', then 'clear' which does the
work of 'get' twice. I did this to preserve the return
value conventions of Bdb and make the breakpoint info
available to the UI. Shouldn't be a performance issue,
right? ;-)
I believe this could go into 2.3.* and 2.4
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=809887&group_id=5470
More information about the Patches
mailing list