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

SourceForge.net noreply at sourceforge.net
Mon Apr 17 19:13:52 CEST 2006


Patches item #790710, was opened at 2003-08-18 19:52
Message generated for change (Comment added) made by loewis
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=790710&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: Library (Lib)
Group: Python 2.4
>Status: Closed
>Resolution: Accepted
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: Martin v. Löwis (loewis)
Date: 2006-04-17 19:13

Message:
Logged In: YES 
user_id=21627

Thanks for again for the patch; I committed it as r45492.
Sorry it took so long. I forgot that you had created a
documentation patch originally also; I just redid the
documentation from the doc string. If you think the
documentation should be changed, please submit a new patch.

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

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

Message:
Logged In: YES 
user_id=6380

Still no time, so unassigning.

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

Comment By: Grégoire Dooms (dooms)
Date: 2005-02-06 14: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 14: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 19: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 14: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 14: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-21 00: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