[Patches] [ python-Patches-1393667 ] Add restart debugger command to pdb.py

SourceForge.net noreply at sourceforge.net
Sun Jun 18 22:46:20 CEST 2006


Patches item #1393667, was opened at 2005-12-30 10:14
Message generated for change (Comment added) made by rockyb
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=1393667&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: Open
Resolution: None
Priority: 5
Submitted By: Rocky Bernstein (rockyb)
Assigned to: Nobody/Anonymous (nobody)
Summary: Add restart debugger command to pdb.py

Initial Comment:
The enclosed patch adds a restart command to pdb. (The
short command name is "R" as it is in perldb). With an
optional argument, the program arguments are reassigned.

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

>Comment By: Rocky Bernstein (rockyb)
Date: 2006-06-18 16:46

Message:
Logged In: YES 
user_id=158581

Tried on both GNu/Linux and NetBSD:

restart
Undefined command: "restart".  Try "help".
(gdb) show version
GNU gdb 6.3
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public
License, and you are
welcome to change it and/or distribute copies of it under
certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show
warranty" for details.
This GDB was configured as "i686-pc-linux-gnu".
(gdb) info checkpoint
Undefined info command: "checkpoint".  Try "help info".


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

Comment By: Ilya Sandler (isandler)
Date: 2006-06-18 15:36

Message:
Logged In: YES 
user_id=971153

For the record:

gdb does have a "restart" command
http://sources.redhat.com/gdb/current/onlinedocs/gdb_5.html
(it's used to restart from a particular checkpoint)




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

Comment By: Rocky Bernstein (rockyb)
Date: 2006-06-08 04:06

Message:
Logged In: YES 
user_id=158581

Sorry for not responding earlier. As getting this was taking
a bit of time moving forward, in the interrum I had been
making much faster progress by splitting this off into it's
own little project under the bash debugger project I have on
sourceforge (http://bashdb.sourceforge.net/pydb). 

Being able to make public releases earlier and oftener has
offorded the oppertunity to move much further along much
quicker than via the patch method (where we still haven't
gotten past restarting the debugger).

Now back to your comments/questions. In pydb, there are two
kinds of "restart". "run" is like gdb's run. Debugger state
(breakpoints, watchpoints, display expressions, debugger
settings for list size, etc.) are preserved. Same as in gdb.

Gdb does not to my knowledge have a command called
"restart". However I've taken your suggestion of not having
a "restart" be the same thing as "run". "restart" is a
re-exec of the debugger. No state is save. As a debugger
writer, I personally find that one useful ;-)

Having the R be an alias for "run" is helpful since it's
short and matches what's used Perl where people use the
debugger more frequently. In fact there's a whole book
written on the Perl debugger. (And I also use 'R' in the GNU
Make and bash debuggers.)

As for "ru", well, since I've added command completion, I
feel this issue is less important.

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

Comment By: Ilya Sandler (isandler)
Date: 2006-02-01 23:51

Message:
Logged In: YES 
user_id=971153

one suggestion though: do we really need 'restart' alias?

The main problem is that gdb uses "restart" for a very
different purpose (restarting  a program from a known
state)..And we probably shouldn't deviate from gdb's command
set unless we have to.

Also I think we should not pollute the command space without
a real need...(a similar argument could be made agaist "ru"
abbreviation as well, but it's of lesser importance)

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

Comment By: Ilya Sandler (isandler)
Date: 2006-02-01 23:40

Message:
Logged In: YES 
user_id=971153

The patch works for me. I think the feature is desirable.

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

Comment By: Georg Brandl (birkenfeld)
Date: 2006-01-20 16:44

Message:
Logged In: YES 
user_id=1188172

Patch looks good from my POV.

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

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


More information about the Patches mailing list