Skip to content

Commit 40c80fb

Browse files
committed
Go over docs, yet again.
1 parent 3cd9636 commit 40c80fb

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

54 files changed

+177
-276
lines changed

command/eval.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# -*- shell-script -*-
22
# Eval and Print commands.
33
#
4-
# Copyright (C) 2008, 2010-2011, 2014-2015, 2017 Rocky Bernstein
4+
# Copyright (C) 2008, 2010-2011, 2014-2015, 2017, 2019 Rocky Bernstein
55
66
#
77
# This program is free software; you can redistribute it and/or
@@ -62,7 +62,7 @@ given, the following translations occur:
6262
See also:
6363
---------
6464
65-
**set autoeval**, **print** and **examine**.'
65+
**set autoeval** and **examine**.'
6666

6767
typeset -i _Dbg_show_eval_rc; _Dbg_show_eval_rc=1
6868

command/examine.sh

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# -*- shell-script -*-
22
# "Examine" debugger command.
33
#
4-
# Copyright (C) 2008, 2010-2011, 2016
4+
# Copyright (C) 2008, 2010-2011, 2016, 2019
55
# Rocky Bernstein <[email protected]>
66
#
77
# This program is free software; you can redistribute it and/or
@@ -26,18 +26,27 @@ if [[ 0 == ${#funcfiletrace[@]} ]] ; then
2626
fi
2727

2828
_Dbg_help_add 'examine' \
29-
"**examine** *expr*
29+
'**examine** *expr*
3030
31-
Print value of an expression via typeset, let, and failing these, eval.
31+
Print value of an expression via `typeset`, `let`, and failing these, `eval`.
3232
3333
Single variables and arithmetic expressions do not need leading $ for
3434
their value is to be substituted. However if neither these, variables
3535
need $ to have their value substituted.
3636
37+
In contrast to normal zsh expressions, expressions should not have
38+
blanks which would cause zsh to see them as different tokens.
39+
40+
Examples:
41+
---------
42+
43+
examine x+1 # ok
44+
examine x + 1 # not ok
45+
3746
See also:
3847
---------
3948
40-
**eval** and **pr**."
49+
**eval**.'
4150

4251
function _Dbg_do_examine {
4352
typeset _Dbg_expr; _Dbg_expr=${@:-"$_Dbg_last_x_args"}

command/kill.sh

Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
# -*- shell-script -*-
22
# gdb-like "kill" debugger command
33
#
4-
# Copyright (C) 2002-2006, 2008-2011, 2016 Rocky Bernstein <[email protected]>
4+
# Copyright (C) 2002-2006, 2008-2011, 2016-2019 Rocky Bernstein
5+
56
#
67
# This program is free software; you can redistribute it and/or
78
# modify it under the terms of the GNU General Public License as
@@ -19,15 +20,16 @@
1920
# MA 02111 USA.
2021

2122
_Dbg_help_add kill \
22-
"**kill** [*signal-number*]
23+
'**kill** [*signal-number*]
2324
24-
Send this process a POSIX signal ('9' for 'SIGKILL' or 'kill -SIGKILL')
25+
Send this process a POSIX signal ("9" for "SIGKILL" or "kill -SIGKILL")
2526
26-
9 is a non-maskable interrupt that terminates the program. If program is threaded it may
27-
be expedient to use this command to terminate the program.
27+
9 is a non-maskable interrupt that terminates the program. If program
28+
is threaded it may be expedient to use this command to terminate the
29+
program.
2830
29-
However other signals, such as those that allow for the debugged to handle them can be
30-
sent.
31+
However other signals, such 15 or `-INT` which allow for the debugged program to
32+
run an interrupt handler can be sent too.
3133
3234
Giving a negative number is the same as using its positive value.
3335
@@ -38,13 +40,16 @@ Examples:
3840
kill 9 # same as above
3941
kill -9 # same as above
4042
kill 15 # nicer, maskable TERM signal
41-
kill! 15 # same as above, but no confirmation
43+
kill -INT # same as above
44+
kill -SIGINT # same as above
45+
kill -WINCH # send "window change" signal
46+
kill -USR1 # send "user 1" signal
4247
4348
See also:
4449
---------
4550
4651
**quit** for less a forceful termination command.
47-
**run** is a way to restart the debugged program."
52+
**run** is a way to restart the debugged program.'
4853

4954
_Dbg_do_kill() {
5055
if (($# > 1)); then

command/quit.sh

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
# -*- shell-script -*-
22
# quit.sh - gdb-like "quit" debugger command
33
#
4-
# Copyright (C) 2008, 2010-2011, 2014, 2018 Rocky Bernstein <[email protected]>
4+
# Copyright (C) 2008, 2010-2011, 2014, 2018-2019 Rocky Bernstein
5+
56
#
67
# This program is free software; you can redistribute it and/or
78
# modify it under the terms of the GNU General Public License as
@@ -21,7 +22,7 @@
2122
_Dbg_help_add quit \
2223
'**quit** [*exit-code* [*shell-levels*]]
2324
24-
Quit the debugger.
25+
Gently quit the debugger.
2526
2627
The program being debugged is aborted. If *exit-code* is given, then
2728
that will be the exit return code. If *shell-levels* is given, then up
@@ -31,7 +32,7 @@ of those shells should have been run under the debugger.
3132
See also:
3233
---------
3334
34-
**finish**, **return** and **run**.'
35+
**kill**, **run** and **restart**.'
3536

3637
_Dbg_do_quit() {
3738
typeset -i return_code=${1:-$_Dbg_program_exit_code}

command/run.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,8 @@ Attempt to restart the program.
2929
See also:
3030
---------
3131
32-
**set args**, **kill** and **quit**'
32+
**kill** and **quit** for termintation commands, or
33+
**set args** for another way to set run arguments.'
3334

3435
_Dbg_do_run() {
3536

command/set_sub/annotate.sh

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
# -*- shell-script -*-
22
# "set annotate" debugger command
33
#
4-
# Copyright (C) 2010-2011, 2014, 2016 Rocky Bernstein <[email protected]>
4+
# Copyright (C) 2010-2011, 2014, 2016, 2019 Rocky Bernstein
5+
56
#
67
# This program is free software; you can redistribute it and/or
78
# modify it under the terms of the GNU General Public License as
@@ -32,10 +33,11 @@ _Dbg_complete_level_2_data[set_annotate]='0 1'
3233
_Dbg_help_add_sub set annotate \
3334
'**set annotate** {**0**|**1**}
3435
35-
Set annotation level.
36+
Set annotation level. This is a (mostly obsolete) gdb setting, but
37+
it is used in GNU Emacs.
3638
3739
0 - normal
38-
1 - fullname (for use when running under emacs).
40+
1 - fullname (for use when running under GNU Emacs).
3941
4042
See also:
4143
---------

command/set_sub/args.sh

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# -*- shell-script -*-
22
# "set args" debugger command
33
#
4-
# Copyright (C) 2010-2011, 2016 Rocky Bernstein <[email protected]>
4+
# Copyright (C) 2010-2011, 2016, 2019 Rocky Bernstein <[email protected]>
55
#
66
# This program is free software; you can redistribute it and/or
77
# modify it under the terms of the GNU General Public License as
@@ -22,7 +22,13 @@ _Dbg_help_add_sub set args \
2222
'**set** *args** *script-args*
2323
2424
Set argument list to give program being debugged when it is started.
25-
Follow this command with any number of args, to be passed to the program.'
25+
Follow this command with any number of args, to be passed to the program.
26+
27+
See also:
28+
---------
29+
30+
**run**
31+
'
2632

2733
_Dbg_do_set_args() {
2834
# We use the loop below rather than _Dbg_set_args="(@)" because

command/set_sub/autoeval.sh

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
# -*- shell-script -*-
22
# "set autoeval" debugger command
33
#
4-
# Copyright (C) 2011, 2014, 2016-2017 Rocky Bernstein <[email protected]>
4+
# Copyright (C) 2011, 2014, 2016-2017, 2019 Rocky Bernstein
5+
56
#
67
# This program is free software; you can redistribute it and/or
78
# modify it under the terms of the GNU General Public License as
@@ -35,9 +36,9 @@ _Dbg_help_add_sub set autoeval \
3536
Evaluate unrecognized debugger commands.
3637
3738
Often inside the debugger, one would like to be able to run arbitrary
38-
Python commands without having to preface Python expressions with
39+
zsh commands without having to preface zsh expressions with
3940
``print`` or ``eval``. Setting *autoeval* on will cause unrecognized
40-
debugger commands to be *eval* as a Python expression.
41+
debugger commands to be *eval* as a zsh expression.
4142
4243
Note that if this is set, on error the message shown on type a bad
4344
debugger command changes from:

command/show_sub/annotate.sh

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,14 @@
1919
# MA 02111 USA.
2020

2121
_Dbg_help_add_sub show annotate \
22-
"show annotate
22+
"**show annotate**
2323
24-
Show annotation level" 1
24+
Show annotation level. This is a (mostly obsolete) gdb setting, but
25+
it is used in GNU Emacs.
26+
27+
0 - normal
28+
1 - fullname (for use when running under emacs).
29+
" 1
2530

2631
_Dbg_do_show_annotate() {
2732
typeset label="$1"

docs/commands/data/eval.rst

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ Often when one is stopped at the line of the first part of an "if", "elif", "cas
2020
portion. For this, use eval?. Actually, any alias that ends in ? which is aliased to eval will
2121
do thie same thing.
2222

23-
Run *python-statement* in the context of the current frame.
23+
Run *cmd* in the context of the current frame.
2424

2525
If no string is given, we run the string from the current source code
2626
about to be run. If the command ends `?` (via an alias) and no string is
@@ -49,5 +49,4 @@ Examples:
4949

5050
.. seealso::
5151

52-
:ref:`set autoeval <set_autoeval>`
53-
and :ref:`examine <examine>`.
52+
:ref:`set autoeval <set_autoeval>` and :ref:`examine <examine>`.

0 commit comments

Comments
 (0)