Skip to content

Commit

Permalink
Work on set/show help. run,quit,restart recategorized as "running"
Browse files Browse the repository at this point in the history
commands. This is a departure from gdb, which having lived with for a
while I think is is plain wrong or unhelpful.
  • Loading branch information
rocky committed Jun 4, 2015
1 parent 46ee1c6 commit 66b1077
Show file tree
Hide file tree
Showing 8 changed files with 34 additions and 8 deletions.
12 changes: 12 additions & 0 deletions docs/commands/set.rst
Original file line number Diff line number Diff line change
@@ -1,5 +1,17 @@
.. _set:

**set* [ *set-subcommand* ]
Modifies parts of the debugger environment.

You can give unique prefix of the name of a subcommand to get information
about just that subcommand.

Type `set` for a list of set subcommands and what they do. Type help set *
for just the list of set subcommands.

All of the "set" commands have a corresponding :ref:`show <show>` command.

Set
===

Expand Down
10 changes: 10 additions & 0 deletions docs/commands/show.rst
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
.. _show:

**show** [ *subcommand* ]

A command for showing things about the debugger. You can give unique
prefix of the name of a subcommand to get information about just that
subcommand.

Type `show` for a list of show subcommands and what they do. Type help
`show *` for just a list of show subcommands. Many of the "show"
commands have a corresponding :ref:`set <set>` command.

Show
====

Expand Down
6 changes: 3 additions & 3 deletions docs/entry-exit.rst
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Invoking the Debugger Initially
===============================

The simplest way to debug your program is to call run `trepan2` (or
`trepan3k` for Python). Give the name of your program and its options
`trepan3k` for Python 3). Give the name of your program and its options
and any debugger options:

.. code:: console
Expand All @@ -33,7 +33,7 @@ For help on trepan2's options add the ``--help`` option.
...
To separate options to the program you want to debug from trepan2's
options put == after the debugger's options:
options put `--` after the debugger's options:

.. code:: console
Expand All @@ -49,7 +49,7 @@ Calling the debugger from IPython
Installing the IPython extension
--------------------------------

Use the `trepan IPython extension <https://pypi.python.org/pypi?:action=display&name=trepan>`_.
Use the `trepan IPython extension <https://github.com/rocky/ipython-trepan>`_.

To install execute the the following code snippet in an IPython shell or IPython notebook cell:

Expand Down
2 changes: 1 addition & 1 deletion trepan/processor/command/quit.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ class QuitCommand(Mbase_cmd.DebuggerCommand):
"""

aliases = ('q',)
category = 'support'
category = 'running'
min_args = 0
max_args = 0
name = os.path.basename(__file__).split('.')[0]
Expand Down
2 changes: 1 addition & 1 deletion trepan/processor/command/restart.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ class RestartCommand(Mbase_cmd.DebuggerCommand):
Restart debugger and program via an *exec()* call. All state is lost,
and new copy of the debugger is used."""

category = 'support'
category = 'running'
min_args = 0
max_args = 0
name = os.path.basename(__file__).split('.')[0]
Expand Down
2 changes: 1 addition & 1 deletion trepan/processor/command/run.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ class RunCommand(Mbase_cmd.DebuggerCommand):
"""

aliases = ('R',)
category = 'support'
category = 'running'
min_args = 0
max_args = 0
name = os.path.basename(__file__).split('.')[0]
Expand Down
6 changes: 4 additions & 2 deletions trepan/processor/command/set.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# -*- coding: utf-8 -*-
# Copyright (C) 2009, 2013 Rocky Bernstein
# Copyright (C) 2009, 2013, 2015 Rocky Bernstein
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
Expand All @@ -20,7 +20,7 @@


class SetCommand(base_submgr.SubcommandMgr):
"""**set** *set subcommand*
"""**set** *set-subcommand*
Modifies parts of the debugger environment.
Expand All @@ -29,6 +29,8 @@ class SetCommand(base_submgr.SubcommandMgr):
Type `set` for a list of *set* subcommands and what they do.
Type `help set *` for just the list of *set* subcommands.
All of the `set` commands have a corresponding `show` command.
"""

category = 'data'
Expand Down
2 changes: 2 additions & 0 deletions trepan/processor/command/show.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ class ShowCommand(Mbase_submgr.SubcommandMgr):
Type `show` for a list of *show* subcommands and what they do.
Type `help show *` for just a list of *show* subcommands.
Many of the `show` commands have a corresponding `set` command.
"""

category = 'status'
Expand Down

0 comments on commit 66b1077

Please sign in to comment.