Issue 790710: breakpoint command lists in pdb (original) (raw)

Created on 2003-08-18 17:52 by dooms, last changed 2022-04-10 16:10 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
pdb_commands.diff dooms,2003-08-18 17:52 context diff for pdb.py and libpdb.tex
new_patch2.3.diff dooms,2005-02-06 13:03 new patch against python 2.3 (revision 1.66)
new_patch_cvs_1.73.diff dooms,2005-02-06 13:06 patch against pdb.py revision 1.73
Messages (9)
msg44468 - (view) Author: Grégoire Dooms (dooms) Date: 2003-08-18 17:52
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.
msg44469 - (view) Author: Guido van Rossum (gvanrossum) * (Python committer) Date: 2004-03-20 23:02
Logged In: YES user_id=6380 I'm all for this, but don't have the bandwidth to review it. Who does?
msg44470 - (view) Author: Martin v. Löwis (loewis) * (Python committer) Date: 2004-08-18 12:19
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).
msg44471 - (view) Author: Grégoire Dooms (dooms) Date: 2004-08-18 12:48
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 ?
msg44472 - (view) Author: Martin v. Löwis (loewis) * (Python committer) Date: 2004-08-18 17:40
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.
msg44473 - (view) Author: Grégoire Dooms (dooms) Date: 2005-02-06 13:03
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).
msg44474 - (view) Author: Grégoire Dooms (dooms) Date: 2005-02-06 13:06
Logged In: YES user_id=846867 Patch against python 2.4 : pdb.py revision 1.73
msg44475 - (view) Author: Guido van Rossum (gvanrossum) * (Python committer) Date: 2005-02-06 18:14
Logged In: YES user_id=6380 Still no time, so unassigning.
msg44476 - (view) Author: Martin v. Löwis (loewis) * (Python committer) Date: 2006-04-17 17:13
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.
History
Date User Action Args
2022-04-10 16:10:42 admin set github: 39083
2003-08-18 17:52:31 dooms create