[m-rev.] for review: Add additional mdb aliases.
Peter Wang
novalazy at gmail.com
Fri Aug 9 18:24:52 AEST 2019
scripts/mdbrc.in:
Add default mdb aliases:
n e pp bw st bt u (d) lv cur bi del dis en cond cv l pld
q Q exit depth lines size width
The 'd' alias has been changed from 'stack' to 'down'.
There are two new aliases for 'stack': 'bt' and 'st'.
Reorder aliases to match documentation.
doc/user_guide.texi:
Update list of default aliases in the Quick overview section,
with a short description of the common commands that have been
aliased.
diff --git a/doc/user_guide.texi b/doc/user_guide.texi
index 367ddd0fd..a6804c677 100644
--- a/doc/user_guide.texi
+++ b/doc/user_guide.texi
@@ -1444,33 +1444,112 @@ At the end is the file name and line number of the
called procedure and (if available) also the file name
and line number of the call.
-The most useful @code{mdb} commands have single-letter abbreviations.
-The @samp{alias} command will show these abbreviations:
+The most useful @code{mdb} commands have short abbreviations.
+The @samp{alias} command will show these abbreviations.
+Here are the default aliases grouped:
@example
-mdb> alias
+h => help
? => help
+
EMPTY => step
NUMBER => step
-P => print *
-b => break
-c => continue
-d => stack
-f => finish
+s => step
g => goto
-h => help
-p => print
+n => next -a
+f => finish
+e => exception
+c => continue
r => retry
-s => step
+
v => vars
+p => print
+pp => print -p
+P => print *
+bw => browse --web
+
+st => stack
+bt => stack
+u => up
+d => down
+lv => level
+cur => current
+
+b => break
+bi => break info
+del => delete
+dis => disable
+en => enable
+cond => condition
+cv => condition -v
+
+l => list
+pld => push_list_dir
+
+q => quit
+Q => quit -y
+exit => quit
+
+depth => format_param depth
+lines => format_param lines
+size => format_param size
+width => format_param width
@end example
+The @samp{step} command can be used to step forward by one or more events.
+As mentioned above, you can also enter an empty line or a number of steps.
+
+The @samp{goto} command continues execution until a given event number.
+
+The @samp{next} command can be used to skip over a call.
+
+The @samp{finish} command will continue execution
+to the end of the current call.
+
+The @samp{exception} command continues execution
+until the program throws an exception.
+
+The @samp{continue} command will continue execution
+until the end of the program.
+
+The @samp{retry} command can restart execution of the current call,
+or an earlier call.
+
+The @samp{vars} command will print the names of known variables
+in the current environment.
+
+The @samp{print} command can be used to display the value of a variable.
+Without any arguments, it displays the current goal.
+
+The @samp{pp} or @samp{print -p} command will pretty print the
+value of a variable or goal.
+
The @samp{P} or @samp{print *} command will display the values
of any live variables in scope.
-The @samp{f} or @samp{finish} command can be used if you want
-to skip over a call.
-The @samp{b} or @samp{break} command can be used to set breakpoints.
-The @samp{d} or @samp{stack} command will display the call stack.
+
+The @samp{bw} or @samp{browse --web} command will open a web browser
+to inspect a term.
+
+The @samp{stack} command will display the call stack.
+
+The @samp{up}, @samp{down} and @samp{level} commands
+will move up and down the call stack.
+
+The @samp{current} commands will display the current event.
+
+The @samp{break} command can be used to set breakpoints.
+The @samp{break info} command will list existing breakpoints.
+The @samp{delete}, @samp{disable}, @samp{enable} commands will
+delete, disable or enable breakpoints.
+
+The @samp{condition} command can be used to
+attach a condition to the most recent breakpoint.
+
+The @samp{list} command will list the source code for the
+current environment.
+The @samp{push_list_dir} command tells the debugger
+where to find the source files.
+
The @samp{quit} command will exit the debugger.
That should be enough to get you started.
diff --git a/scripts/mdbrc.in b/scripts/mdbrc.in
index bebbed6fd..c0c485aac 100644
--- a/scripts/mdbrc.in
+++ b/scripts/mdbrc.in
@@ -1,18 +1,40 @@
source @DEFAULT_MERCURY_DEBUGGER_DOC@
+alias h help
+alias ? help
alias s step
alias g goto
+alias n next -a
alias f finish
+alias e exception
+alias c continue
alias r retry
alias v vars
alias p print
+alias pp print -p
alias P print *
-alias d stack
-alias c continue
+alias bw browse --web
+alias st stack
+alias bt stack
+alias u up
+alias d down
+alias lv level
+alias cur current
alias b break
-alias h help
-alias ? help
-alias excp exception
-alias e exception
+alias bi break info
+alias del delete
+alias dis disable
+alias en enable
+alias cond condition
+alias cv condition -v
+alias l list
+alias pld push_list_dir
+alias q quit
+alias Q quit -y
+alias exit quit
+alias depth format_param depth
+alias lines format_param lines
+alias size format_param size
+alias width format_param width
alias EMPTY step
alias NUMBER step
alias ! shell
--
2.22.0
More information about the reviews
mailing list