[ python-Bugs-1472191 ] pdb 'clear' command doesn't clear selected bp's

SourceForge.net noreply at sourceforge.net
Tue Apr 18 11:49:45 CEST 2006


Bugs item #1472191, was opened at 2006-04-18 09:49
Message generated for change (Settings changed) made by jakamkon
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1472191&group_id=5470

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Python Library
Group: Python 2.5
Status: Open
Resolution: None
>Priority: 6
Submitted By: Kuba Kończyk (jakamkon)
Assigned to: Nobody/Anonymous (nobody)
Summary: pdb 'clear' command doesn't clear selected bp's

Initial Comment:
 Pdb 'clear x' command doesn't clear selected breakpoints
that are already set:

$ ./python -m pdb ../test.py
> /home/xyz/python/test.py(3)<module>()
-> def t(x):
(Pdb) break 5
Breakpoint 1 at /home/xyz/python/test.py:5
(Pdb) break
Num Type Disp Enb Where
1 breakpoint keep yes at /home/xyz/python/test.py:5
(Pdb) clear 1
No breakpoint numbered 1
(Pdb)
...
for i in numberlist:
* if not (0 <= i < len(bdb.Breakpoint.bpbynumber)):
print 'No breakpoint numbered', i
...

Each i is a string and it's compared to 0 and len(...),
so condition * is always True.
The fix is trivial:
* if not (0 <= int(i) < len(bdb.Breakpoint.bpbynumber)):
Fix is in #1472184

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1472191&group_id=5470


More information about the Python-bugs-list mailing list