[Patches] [ python-Patches-790710 ] breakpoint command lists in pdb

SourceForge.net noreply at sourceforge.net
Wed Feb 16 10:45:40 CET 2005


Patches item #790710, was opened at 2003-08-18 17:52
Message generated for change (Settings changed) made by dooms
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=790710&group_id=5470

Category: Library (Lib)
Group: Python 2.4
Status: Open
Resolution: None
Priority: 5
Submitted By: Grégoire Dooms (dooms)
>Assigned to: Martin v. Löwis (loewis)
Summary: breakpoint command lists in pdb

Initial Comment:
This patch enables the user to define a list of commands 
associated to a breakpoint. Those commands are executed 
whenever the given breakpoint makes the program stop 
execution. 
The "commands [bpnumber]" command works like in gdb. 
 
This patch is against the CVS HEAD, it has been tested with 
python 2.3. 
The documentation is updated too. 
 
 

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

Comment By: Guido van Rossum (gvanrossum)
Date: 2005-02-06 18:14

Message:
Logged In: YES 
user_id=6380

Still no time, so unassigning.

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

Comment By: Grégoire Dooms (dooms)
Date: 2005-02-06 13:06

Message:
Logged In: YES 
user_id=846867

Patch against python 2.4 : pdb.py revision 1.73 

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

Comment By: Grégoire Dooms (dooms)
Date: 2005-02-06 13:03

Message:
Logged In: YES 
user_id=846867

I redid this patch according to your comments. The command 
list definition interaction is made by calling cmdloop again. 
onecmd is overriden to check if the line is entered in "normal 
mode" or in "command list definition mode". This way is much 
cleaner than before. I also renamed all additional data 
attributes so they contain "commands" as a substring. 
 
I add the new patch against revision 1.66 (python 2.3) and 
revision 1.73 (python 2.4). This patch does not contain the 
documentation changes as I did not rewrite the doc (refer to 
the old diff file for the doc patch). 

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

Comment By: Martin v. Löwis (loewis)
Date: 2004-08-18 17:40

Message:
Logged In: YES 
user_id=21627

Oops. Changing the prompt itself is fine - I just disliked
the control flow that follows.

IDLE things can be discussed on either list, I guess, or
directly sent to kbk. If you mean changes, you best submit
them as a patch here to SF.

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

Comment By: Grégoire Dooms (dooms)
Date: 2004-08-18 12:48

Message:
Logged In: YES 
user_id=846867

Ok, I see. 
This implementation is one year old. 
I'll recode this according to your comments. 
 
Why should'nt 'commands' change the prompt ? 
Should I assign to somebody else ? 
Are IDLE topics preferably discussed in idle-dev or 
python-dev mailing list ?   
 

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

Comment By: Martin v. Löwis (loewis)
Date: 2004-08-18 12:19

Message:
Logged In: YES 
user_id=21627

I like the feature, but the implementation is not acceptable
in its current form: it changes the prompt, and the rebinds
all existing commands so that they add to self.commands.

Instead of all this trickery, do_commands should invoke
cmdloop directly, and add precmd and do_end implementations;
overriding onecmd also might be an option.

In addition, the patch should avoid setting member variables
of pdb in cases where a local variable is sufficient (e.g.
lastcmd_back).

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

Comment By: Guido van Rossum (gvanrossum)
Date: 2004-03-20 23:02

Message:
Logged In: YES 
user_id=6380

I'm all for this, but don't have the bandwidth to review it.
Who does?

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

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


More information about the Patches mailing list