Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add restart debugger command to pdb.py #42741

Closed
rockyb mannequin opened this issue Dec 30, 2005 · 8 comments
Closed

Add restart debugger command to pdb.py #42741

rockyb mannequin opened this issue Dec 30, 2005 · 8 comments
Labels
stdlib Python modules in the Lib dir

Comments

@rockyb
Copy link
Mannequin

rockyb mannequin commented Dec 30, 2005

BPO 1393667
Nosy @birkenfeld, @birkenfeld
Files
  • pdb-add-restart.diff: Patch to add "run" or "restart" to pdb.py
  • Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

    Show more details

    GitHub fields:

    assignee = None
    closed_at = <Date 2007-03-13.21:09:14.000>
    created_at = <Date 2005-12-30.15:14:29.000>
    labels = ['library']
    title = 'Add restart debugger command to pdb.py'
    updated_at = <Date 2007-03-13.21:09:14.000>
    user = 'https://bugs.python.org/rockyb'

    bugs.python.org fields:

    activity = <Date 2007-03-13.21:09:14.000>
    actor = 'georg.brandl'
    assignee = 'none'
    closed = True
    closed_date = None
    closer = None
    components = ['Library (Lib)']
    creation = <Date 2005-12-30.15:14:29.000>
    creator = 'rockyb'
    dependencies = []
    files = ['6934']
    hgrepos = []
    issue_num = 1393667
    keywords = ['patch']
    message_count = 8.0
    messages = ['49240', '49241', '49242', '49243', '49244', '49245', '49246', '49247']
    nosy_count = 4.0
    nosy_names = ['georg.brandl', 'georg.brandl', 'isandler', 'rockyb']
    pr_nums = []
    priority = 'normal'
    resolution = 'accepted'
    stage = None
    status = 'closed'
    superseder = None
    type = None
    url = 'https://bugs.python.org/issue1393667'
    versions = ['Python 2.4']

    @rockyb
    Copy link
    Mannequin Author

    rockyb mannequin commented Dec 30, 2005

    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.

    @rockyb rockyb mannequin closed this as completed Dec 30, 2005
    @rockyb rockyb mannequin added the stdlib Python modules in the Lib dir label Dec 30, 2005
    @rockyb rockyb mannequin closed this as completed Dec 30, 2005
    @rockyb rockyb mannequin added the stdlib Python modules in the Lib dir label Dec 30, 2005
    @birkenfeld
    Copy link
    Member

    Logged In: YES
    user_id=1188172

    Patch looks good from my POV.

    @isandler
    Copy link
    Mannequin

    isandler mannequin commented Feb 2, 2006

    Logged In: YES
    user_id=971153

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

    @isandler
    Copy link
    Mannequin

    isandler mannequin commented Feb 2, 2006

    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)

    @rockyb
    Copy link
    Mannequin Author

    rockyb mannequin commented Jun 8, 2006

    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.

    @isandler
    Copy link
    Mannequin

    isandler mannequin commented Jun 18, 2006

    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)

    @rockyb
    Copy link
    Mannequin Author

    rockyb mannequin commented Jun 18, 2006

    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".

    @birkenfeld
    Copy link
    Member

    Committed and added docs in rev. 54360.

    @ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    stdlib Python modules in the Lib dir
    Projects
    None yet
    Development

    No branches or pull requests

    1 participant