doc/openocd.texi: Document command mode command
authorYasushi SHOJI <yashi@spacecubics.com>
Sun, 21 Nov 2021 23:23:32 +0000 (08:23 +0900)
committerAntonio Borneo <borneo.antonio@gmail.com>
Sat, 11 Dec 2021 17:42:33 +0000 (17:42 +0000)
Document "command mode" command Server Configuration -> Configuration
Stage.  The text is taken from command's help string.

In addition to the help string, this commit explain the words
mismatch, the doc uses "stage" but the command and source code uses
"mode" to describe the same thing.

Change-Id: I1d5fc8c64a3a0b07ea8430bf016bcbd54e52da1c
Signed-off-by: Yasushi SHOJI <yashi@spacecubics.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/6736
Tested-by: jenkins
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
doc/openocd.texi

index cceba7926059f75ba635c8c36af25e2a847513e1..fa1b8da05a44bd48008bd7aca3851aec75013dbc 100644 (file)
@@ -2040,6 +2040,19 @@ may access or activate TAPs.
 After it leaves this stage, configuration commands may no
 longer be issued.
 
+@deffn {Command} {command mode} [command_name]
+Returns the command modes allowed by a command: 'any', 'config', or
+'exec'. If no command is specified, returns the current command
+mode. Returns 'unknown' if an unknown command is given. Command can be
+multiple tokens. (command valid any time)
+
+In this document, the modes are described as stages, 'config' and
+'exec' mode correspond configuration stage and run stage. 'any' means
+the command can be executed in either
+stages. @xref{configurationstage,,Configuration Stage}, and
+@xref{enteringtherunstage,,Entering the Run Stage}.
+@end deffn
+
 @anchor{enteringtherunstage}
 @section Entering the Run Stage