Skip to content

Commit

Permalink
Go over docs for next/step...
Browse files Browse the repository at this point in the history
* Remove "step+" and "step-" from list of commands. They are suffixes to
  "step".
* Update "step" doc to include "step+", "step-" behavior.
* Go over "step" formatting so this renders nicer.
* Mention "next", "step" "set force"  in "step" and "next" docs
  • Loading branch information
rocky committed Feb 14, 2024
1 parent 6beeda3 commit 51c6837
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 31 deletions.
5 changes: 3 additions & 2 deletions command/next.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
# -*- shell-script -*-
# gdb-like "next" (step through) commmand.
#
# Copyright (C) 2008, 2010, 2015, 2016 Rocky Bernstein rocky@gnu.org
# Copyright (C) 2008, 2010, 2015, 2016, 2024
# Rocky Bernstein rocky@gnu.org
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License as
Expand Down Expand Up @@ -38,7 +39,7 @@ Functions and source'd files are not traced. This is in contrast to
See also:
---------
**skip**." 1
**skip**, *step**, and **set force**." 1

# Next command
# $1 is command next+, next-, or next
Expand Down
57 changes: 28 additions & 29 deletions command/step.sh
Original file line number Diff line number Diff line change
@@ -1,21 +1,23 @@
# -*- shell-script -*-
# step.sh - Debugger step ("step into") commmand.
#
# Copyright (C) 2006, 2008, 2009, 2010, 2015 Rocky Bernstein rocky@gnu.org
# Copyright (C) 2006, 2008, 2009, 2010, 2015
# 2024 Rocky Bernstein rocky@gnu.org
#
# bashdb is free software; you can redistribute it and/or modify it under
# the terms of the GNU General Public License as published by the Free
# Software Foundation; either version 2, or (at your option) any later
# version.
# 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 the Free Software Foundation; either version 2, or
# (at your option) any later version.
#
# bashdb is distributed in the hope that it will be useful, but WITHOUT ANY
# WARRANTY; without even the implied warranty of MERCHANTABILITY or
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
# for more details.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# General Public License for more details.
#
# You should have received a copy of the GNU General Public License along
# with bashdb; see the file COPYING. If not, write to the Free Software
# Foundation, 59 Temple Place, Suite 330, Boston, MA 02111 USA.
# You should have received a copy of the GNU General Public License
# along with this program; see the file COPYING. If not, write to
# the Free Software Foundation, 59 Temple Place, Suite 330, Boston,
# MA 02111 USA.

# Sets whether or not to display command to be executed in debugger prompt.
# If yes, always show. If auto, show only if the same line is to be run
Expand All @@ -25,33 +27,30 @@
typeset -i _Dbg_set_different=0

_Dbg_help_add step \
"step [COUNT]
"**step** [*count*]
Single step an statement. This is sometimes called 'step into'.
If COUNT is given, stepping occurs that many times before
stopping. Otherwise COUNT is one. COUNT an be an arithmetic
If *count* is given, stepping occurs that many times before
stopping. Otherwise *count* is one. *count* an be an arithmetic
expression.
In contrast to \"next\", functions and source'd files are stepped
into. See also \"skip\"."
If suffix \"+\" is added, we ensure that the file and line position is
different from the last one just stopped at.
_Dbg_help_add 'step+' \
"step+ -- Single step a statement ensuring a different line after the step.
However in contrast to \"next\", functions and source'd files are stepped
into.
In contrast to \"step\", we ensure that the file and line position is
different from the last one just stopped at.
If suffix \"-\" is added, the different line aspect of \"step+\" does not occur.
See also \"step-\" and \"set force\"." 0
With no suffix is given, the behavior is dicted by the setting of **set force**.
_Dbg_help_add 'step-' \
"step- -- Single step a statement without the \`step force' setting.
See also:
---------
Set step force may have been set on. step- ensures we turn that off for
this command.
**next**, **skip**, and **set force**." 1

See also \"step\" and \"set force\"." 0

# Step command
# $1 is command step+, step-, or step
Expand Down Expand Up @@ -92,5 +91,5 @@ _Dbg_do_step() {
}

_Dbg_alias_add 's' 'step'
_Dbg_alias_add 's+' 'step+'
_Dbg_alias_add 's-' 'step-'
_Dbg_alias_add 's+' 'step+'
_Dbg_alias_add 's-' 'step-'

0 comments on commit 51c6837

Please sign in to comment.