* gdb.base/help.exp (help thread find): Fix one forgotten quote.
[deliverable/binutils-gdb.git] / gdb / testsuite / gdb.base / help.exp
index 50da6774373307a26f9d6570ca9024b6c2d1bb69..a97ec88f9f1252a10089295e79957da8215913bb 100644 (file)
@@ -1,23 +1,19 @@
 #   Copyright 1988, 1990, 1991, 1992, 1994, 1995, 1996, 1997, 1998, 1999,
-#   2000, 2002
+#   2000, 2002, 2003, 2005, 2006, 2007, 2008, 2009, 2010, 2011
 #   Free Software Foundation, Inc.
 
 # 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 of the License, or
+# the Free Software Foundation; either version 3 of the License, or
 # (at your option) any later version.
-# 
+#
 # 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 this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-# Please email any bugs, comments, and/or additions to this file to:
-# bug-gdb@prep.ai.mit.edu
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 # This file was written by Rob Savoye. (rob@cygnus.com)
 
 # test gdb help commands
 #
 
-set prms_id 0
-set bug_id 0
 
 gdb_start
 
-# force the height of the debugger to be pretty large so no pagers getused
-gdb_test "set height 400" "" "test set height"
+# force the height of the debugger to be pretty large so no pagers get used
+gdb_test_no_output "set height 400" "test set height"
 
 # use a larger expect input buffer for long help outputs.
 # test help add-symbol-file
-gdb_test "help add-symbol-file" "Usage: add-symbol-file FILE ADDR \\\[-s <SECT> <SECT_ADDR> -s <SECT> <SECT_ADDR> \.\.\.\\\]\[\r\n\]+Load the symbols from FILE, assuming FILE has been dynamically loaded\.\[\r\n\]+ADDR is the starting address of the file's text\.\[\r\n\]+The optional arguments are section-name section-address pairs and\[\r\n\]+should be specified if the data and bss segments are not contiguous\[\r\n\]+with the text\.  SECT is a section name to be loaded at SECT_ADDR\." "help add-symbol-file"
+gdb_test "help add-symbol-file" "Load symbols from FILE, assuming FILE has been dynamically loaded\.\[\r\n\]+Usage: add-symbol-file FILE ADDR \\\[-s <SECT> <SECT_ADDR> -s <SECT> <SECT_ADDR> \.\.\.\\\]\[\r\n\]+ADDR is the starting address of the file's text\.\[\r\n\]+The optional arguments are section-name section-address pairs and\[\r\n\]+should be specified if the data and bss segments are not contiguous\[\r\n\]+with the text\.  SECT is a section name to be loaded at SECT_ADDR\." "help add-symbol-file"
+# test help advance
+gdb_test "help advance" "Continue the program up to the given location \\(same form as args for break command\\)\.\[\r\n]+Execution will also stop upon exit from the current stack frame\." "help advance"
 # test help aliases
-gdb_test "help aliases" "Aliases of other commands\.\[\r\n\]+List of commands\:.*\[\r\n\]+Type \"help\" followed by command name for full documentation\.\[\r\n\]+Command name abbreviations are allowed if unambiguous\." "help aliases"
+test_class_help "aliases" {"Aliases of other commands\.\[\r\n\]+"}
+
 # test help append
 gdb_test "help append" "Append target code/data to a local file\.\[\r\n\]+List of append subcommands:.*" 
 gdb_test "help append binary" "Append target code/data to a raw binary file\.\[\r\n\]+List of append binary subcommands:.*" 
@@ -48,17 +45,17 @@ gdb_test "help append binary value" "Append the value of an expression to a raw
 # test help attach
 gdb_test "help attach" "Attach to a process or file outside of GDB\.\[\r\n\]+This command attaches to another target, of the same type as your last\[\r\n\]+\"target\" command \\(\"info files\" will show your target stack\\)\.\[\r\n\]+The command may take as argument a process id or a device file\.\[\r\n\]+For a process id, you must have permission to send the process a signal,\[\r\n\]+and it must have the same effective uid as the debugger\.\[\r\n\]+When using \"attach\" with a process id, the debugger finds the\[\r\n\]+program running in the process, looking first in the current working\[\r\n\]+directory, or \\(if not found there\\) using the source file search path\[\r\n\]+\\(see the \"directory\" command\\)\.  You can also use the \"file\" command\[\r\n\]+to specify the program, and to load its symbol table\." "help attach"
 # test help breakpoint "b" abbreviation
-gdb_test "help b" "Set breakpoint at specified line or function\.\[\r\n\]+Argument may be line number, function name, or \"\[*\]\" and an address\.\[\r\n\]+If line number is specified, break at start of code for that line\.\[\r\n\]+If function is specified, break at start of code for that function\.\[\r\n\]+If an address is specified, break at that exact address\.\[\r\n\]+With no arg, uses current execution address of selected stack frame\.\[\r\n\]+This is useful for breaking on return to a stack frame\.\[\r\n\]+Multiple breakpoints at one place are permitted, and useful if conditional\.\[\r\n\]+Do \"help breakpoints\" for info on other commands dealing with breakpoints\." "help breakpoint \"b\" abbreviation"
+gdb_test "help b" "Set breakpoint at specified line or function\.\[\r\n\]+break \\\[LOCATION\] \\\[thread THREADNUM\] \\\[if CONDITION\]\[\r\n\]+LOCATION may be a line number, function name, or \"\[*\]\" and an address\.\[\r\n\]+If a line number is specified, break at start of code for that line\.\[\r\n\]+If a function is specified, break at start of code for that function\.\[\r\n\]+If an address is specified, break at that exact address\.\[\r\n\]+With no LOCATION, uses current execution address of the selected\[\r\n\]+stack frame\.  This is useful for breaking on return to a stack frame\.\[\r\n\]+THREADNUM is the number from \"info threads\"\.\[\r\n\]+CONDITION is a boolean expression\.\[\r\n\]+Multiple breakpoints at one place are permitted, and useful if their\[\r\n\]+conditions are different\.\[\r\n\]+Do \"help breakpoints\" for info on other commands dealing with breakpoints\." "help breakpoint \"b\" abbreviation"
 # test help breakpoint "br" abbreviation
-gdb_test "help br" "Set breakpoint at specified line or function\.\[\r\n\]+Argument may be line number, function name, or \"\[*\]\" and an address\.\[\r\n\]+If line number is specified, break at start of code for that line\.\[\r\n\]+If function is specified, break at start of code for that function\.\[\r\n\]+If an address is specified, break at that exact address\.\[\r\n\]+With no arg, uses current execution address of selected stack frame\.\[\r\n\]+This is useful for breaking on return to a stack frame\.\[\r\n\]+Multiple breakpoints at one place are permitted, and useful if conditional\.\[\r\n\]+Do \"help breakpoints\" for info on other commands dealing with breakpoints\." "help breakpoint \"br\" abbreviation"
+gdb_test "help br" "Set breakpoint at specified line or function\.\[\r\n\]+break \\\[LOCATION\] \\\[thread THREADNUM\] \\\[if CONDITION\]\[\r\n\]+LOCATION may be a line number, function name, or \"\[*\]\" and an address\.\[\r\n\]+If a line number is specified, break at start of code for that line\.\[\r\n\]+If a function is specified, break at start of code for that function\.\[\r\n\]+If an address is specified, break at that exact address\.\[\r\n\]+With no LOCATION, uses current execution address of the selected\[\r\n\]+stack frame\.  This is useful for breaking on return to a stack frame\.\[\r\n\]+THREADNUM is the number from \"info threads\"\.\[\r\n\]+CONDITION is a boolean expression\.\[\r\n\]+Multiple breakpoints at one place are permitted, and useful if their\[\r\n\]+conditions are different\.\[\r\n\]+Do \"help breakpoints\" for info on other commands dealing with breakpoints\." "help breakpoint \"br\" abbreviation"
 # test help breakpoint "bre" abbreviation
-gdb_test "help bre" "Set breakpoint at specified line or function\.\[\r\n\]+Argument may be line number, function name, or \"\[*\]\" and an address\.\[\r\n\]+If line number is specified, break at start of code for that line\.\[\r\n\]+If function is specified, break at start of code for that function\.\[\r\n\]+If an address is specified, break at that exact address\.\[\r\n\]+With no arg, uses current execution address of selected stack frame\.\[\r\n\]+This is useful for breaking on return to a stack frame\.\[\r\n\]+Multiple breakpoints at one place are permitted, and useful if conditional\.\[\r\n\]+Do \"help breakpoints\" for info on other commands dealing with breakpoints\." "help breakpoint \"bre\" abbreviation"
+gdb_test "help bre" "Set breakpoint at specified line or function\.\[\r\n\]+break \\\[LOCATION\] \\\[thread THREADNUM\] \\\[if CONDITION\]\[\r\n\]+LOCATION may be a line number, function name, or \"\[*\]\" and an address\.\[\r\n\]+If a line number is specified, break at start of code for that line\.\[\r\n\]+If a function is specified, break at start of code for that function\.\[\r\n\]+If an address is specified, break at that exact address\.\[\r\n\]+With no LOCATION, uses current execution address of the selected\[\r\n\]+stack frame\.  This is useful for breaking on return to a stack frame\.\[\r\n\]+THREADNUM is the number from \"info threads\"\.\[\r\n\]+CONDITION is a boolean expression\.\[\r\n\]+Multiple breakpoints at one place are permitted, and useful if their\[\r\n\]+conditions are different\.\[\r\n\]+Do \"help breakpoints\" for info on other commands dealing with breakpoints\." "help breakpoint \"bre\" abbreviation"
 # test help breakpoint "brea" abbreviation
-gdb_test "help brea" "Set breakpoint at specified line or function\.\[\r\n\]+Argument may be line number, function name, or \"\[*\]\" and an address\.\[\r\n\]+If line number is specified, break at start of code for that line\.\[\r\n\]+If function is specified, break at start of code for that function\.\[\r\n\]+If an address is specified, break at that exact address\.\[\r\n\]+With no arg, uses current execution address of selected stack frame\.\[\r\n\]+This is useful for breaking on return to a stack frame\.\[\r\n\]+Multiple breakpoints at one place are permitted, and useful if conditional\.\[\r\n\]+Do \"help breakpoints\" for info on other commands dealing with breakpoints\." "help breakpoint \"brea\" abbreviation"
+gdb_test "help brea" "Set breakpoint at specified line or function\.\[\r\n\]+break \\\[LOCATION\] \\\[thread THREADNUM\] \\\[if CONDITION\]\[\r\n\]+LOCATION may be a line number, function name, or \"\[*\]\" and an address\.\[\r\n\]+If a line number is specified, break at start of code for that line\.\[\r\n\]+If a function is specified, break at start of code for that function\.\[\r\n\]+If an address is specified, break at that exact address\.\[\r\n\]+With no LOCATION, uses current execution address of the selected\[\r\n\]+stack frame\.  This is useful for breaking on return to a stack frame\.\[\r\n\]+THREADNUM is the number from \"info threads\"\.\[\r\n\]+CONDITION is a boolean expression\.\[\r\n\]+Multiple breakpoints at one place are permitted, and useful if their\[\r\n\]+conditions are different\.\[\r\n\]+Do \"help breakpoints\" for info on other commands dealing with breakpoints\." "help breakpoint \"brea\" abbreviation"
 # test help breakpoint "break" abbreviation
-gdb_test "help break" "Set breakpoint at specified line or function\.\[\r\n\]+Argument may be line number, function name, or \"\[*\]\" and an address\.\[\r\n\]+If line number is specified, break at start of code for that line\.\[\r\n\]+If function is specified, break at start of code for that function\.\[\r\n\]+If an address is specified, break at that exact address\.\[\r\n\]+With no arg, uses current execution address of selected stack frame\.\[\r\n\]+This is useful for breaking on return to a stack frame\.\[\r\n\]+Multiple breakpoints at one place are permitted, and useful if conditional\.\[\r\n\]+Do \"help breakpoints\" for info on other commands dealing with breakpoints\." "help breakpoint \"break\" abbreviation"
+gdb_test "help break" "Set breakpoint at specified line or function\.\[\r\n\]+break \\\[LOCATION\] \\\[thread THREADNUM\] \\\[if CONDITION\]\[\r\n\]+LOCATION may be a line number, function name, or \"\[*\]\" and an address\.\[\r\n\]+If a line number is specified, break at start of code for that line\.\[\r\n\]+If a function is specified, break at start of code for that function\.\[\r\n\]+If an address is specified, break at that exact address\.\[\r\n\]+With no LOCATION, uses current execution address of the selected\[\r\n\]+stack frame\.  This is useful for breaking on return to a stack frame\.\[\r\n\]+THREADNUM is the number from \"info threads\"\.\[\r\n\]+CONDITION is a boolean expression\.\[\r\n\]+Multiple breakpoints at one place are permitted, and useful if their\[\r\n\]+conditions are different\.\[\r\n\]+Do \"help breakpoints\" for info on other commands dealing with breakpoints\." "help breakpoint \"break\" abbreviation"
 # test help breakpoints
-gdb_test "help breakpoints" "Making program stop at certain points\.\[\r\n\]+List of commands:\[\r\n\]+awatch -- Set a watchpoint for an expression\[\r\n\]+break -- Set breakpoint at specified line or function\[\r\n\]+catch -- Set catchpoints to catch events\[\r\n\]+clear -- Clear breakpoint at specified line or function\[\r\n\]+commands -- Set commands to be executed when a breakpoint is hit\[\r\n\]+condition -- Specify breakpoint number N to break only if COND is true\[\r\n\]+delete -- Delete some breakpoints or auto-display expressions\[\r\n\]+disable -- Disable some breakpoints\[\r\n\]+enable -- Enable some breakpoints\[\r\n\]+hbreak -- Set a hardware assisted  breakpoint\[\r\n\]+ignore -- Set ignore-count of breakpoint number N to COUNT\[\r\n\]+rbreak -- Set a breakpoint for all functions matching REGEXP\[\r\n\]+rwatch -- Set a read watchpoint for an expression\[\r\n\]+tbreak -- Set a temporary breakpoint\[\r\n\]+tcatch -- Set temporary catchpoints to catch events\[\r\n\]+thbreak -- Set a temporary hardware assisted breakpoint\[\r\n\]+watch -- Set a watchpoint for an expression\[\r\n\]+Type \"help\" followed by command name for full documentation\.\[\r\n\]+Command name abbreviations are allowed if unambiguous\." "help breakpoints"
+test_class_help "breakpoints" {"Making program stop at certain points\.\[\r\n\]+"}
 # test help backtrace "bt" abbreviation
 gdb_test "help bt" "Print backtrace of all stack frames, or innermost COUNT frames\.\[\r\n\]+With a negative argument, print outermost -COUNT frames\.\[\r\n\]+Use of the 'full' qualifier also prints the values of the local variables\." "help backtrace \"bt\" abbreviation"
 # test help backtrace
@@ -70,7 +67,7 @@ gdb_test "help continue" "Continue program being debugged.*" "help continue"
 # test help call
 gdb_test "help call" "Call a function.*" "help call"
 # test help catch
-gdb_test "help catch" "Set catchpoints to catch events.*Raised signals may be caught:.*catch signal.*all signals.*catch signal.*signame.*a particular signal.*Raised exceptions may be caught:.*catch throw.*all exceptions, when thrown.*catch throw.*exceptname.*a particular exception, when thrown.*catch catch.*all exceptions, when caught.*catch catch.*exceptname.*a particular exception, when caught.*Thread or process events may be caught:.*catch thread_start.*any threads, just after creation.*catch thread_exit.*any threads, just before expiration.*catch thread_join.*any threads, just after joins.*catch start.*any processes, just after creation.*catch exit.*any processes, just before expiration.*catch fork.*calls to fork.*catch vfork.*calls to vfork.*catch exec.*calls to exec.*Dynamically.linked library events may be caught:.*catch load.*loads of any library.*catch load.*libname.*loads of a particular library.*catch unload.*unloads of any library.*catch unload.*libname.*unloads of a particular library.*The act of your program's execution stopping may also be caught:.*catch stop.*Do.*help set follow-fork-mode.*for info on debugging your program.*after a fork or vfork is caught.*Do.*help breakpoints.*for info on other commands dealing with breakpoints." "help catch"
+gdb_test "help catch" "Set catchpoints to catch events.*List of catch subcommands:.*catch assert -- Catch failed Ada assertions.*catch catch -- Catch an exception.*catch exception -- Catch Ada exceptions.*catch exec -- Catch calls to exec.*catch fork -- Catch calls to fork.*catch vfork -- Catch calls to vfork.*Type .help catch. followed by catch subcommand name for full documentation.*Type .apropos word. to search for commands related to .word..*Command name abbreviations are allowed if unambiguous.*" "help catch"
 # test help cd
 gdb_test "help cd" "Set working directory to DIR for debugger and program being debugged\.\[\r\n\]+The change does not take effect for the program being debugged\[\r\n\]+until the next time it is started\." "help cd"
 # test help clear
@@ -82,11 +79,18 @@ gdb_test "help condition" "Specify breakpoint number N to break only if COND is
 # test help core-file
 gdb_test "help core-file" "Use FILE as core dump for examining memory and registers\.\[\r\n\]+No arg means have no core file\.  This command has been superseded by the\[\r\n\]+`target core' and `detach' commands\." "help core-file"
 # test help delete "d" abbreviation
-gdb_test "help d" "Delete some breakpoints or auto-display expressions\.\[\r\n\]+Arguments are breakpoint numbers with spaces in between\.\[\r\n\]+To delete all breakpoints, give no argument\.\[\r\n\]+Also a prefix command for deletion of other GDB objects\.\[\r\n\]+The \"unset\" command is also an alias for \"delete\"\.\[\r\n\]+List of delete subcommands:\[\r\n\]+delete breakpoints -- Delete some breakpoints or auto-display expressions\[\r\n\]+delete display -- Cancel some expressions to be displayed when program stops\[\r\n\]+delete mem -- Delete memory region\[\r\n\]+delete tracepoints -- Delete specified tracepoints\[\r\n\]+Type \"help delete\" followed by delete subcommand name for full documentation\.\[\r\n\]+Command name abbreviations are allowed if unambiguous\." "help delete \"d\" abbreviation"
+set expected_help_delete {
+    "Delete some breakpoints or auto-display expressions\.\[\r\n\]+"
+    "Arguments are breakpoint numbers with spaces in between\.\[\r\n\]+"
+    "To delete all breakpoints, give no argument\.\[\r\n\]+"
+    "Also a prefix command for deletion of other GDB objects\.\[\r\n\]+"
+    "The \"unset\" command is also an alias for \"delete\"\.\[\r\n\]+"
+}
+test_prefix_command_help {"d" "delete"} $expected_help_delete "help delete \"d\" abbreviation"
 # test help delete
-gdb_test "help delete" "Delete some breakpoints or auto-display expressions\.\[\r\n\]+Arguments are breakpoint numbers with spaces in between\.\[\r\n\]+To delete all breakpoints, give no argument\.\[\r\n\]+Also a prefix command for deletion of other GDB objects\.\[\r\n\]+The \"unset\" command is also an alias for \"delete\"\.\[\r\n\]+List of delete subcommands:\[\r\n\]+delete breakpoints -- Delete some breakpoints or auto-display expressions\[\r\n\]+delete display -- Cancel some expressions to be displayed when program stops\[\r\n\]+delete mem -- Delete memory region\[\r\n\]+delete tracepoints -- Delete specified tracepoints\[\r\n\]+Type \"help delete\" followed by delete subcommand name for full documentation\.\[\r\n\]+Command name abbreviations are allowed if unambiguous\." "help delete"
+test_prefix_command_help "delete" $expected_help_delete
 # test help data
-gdb_test "help data" "Examining data\.\[\r\n\]+List of commands:.*\[\r\n\]+Type \"help\" followed by command name for full documentation\.\[\r\n\]+Command name abbreviations are allowed if unambiguous\." "help data"
+test_class_help "data" {"Examining data\.\[\r\n\]+"}
 # test help define
 gdb_test "help define" "Define a new command.*" "help define"
 # test help delete breakpoints
@@ -94,21 +98,31 @@ gdb_test "help delete breakpoints" "Delete some breakpoints or auto-display expr
 # test help delete display
 gdb_test "help delete display" "Cancel some expressions to be displayed when program stops\.\[\r\n\]+Arguments are the code numbers of the expressions to stop displaying\.\[\r\n\]+No argument means cancel all automatic-display expressions\.\[\r\n\]+Do \"info display\" to see current list of code numbers\." "help delete display"
 # test help detach
-gdb_test "help detach" "Detach a process or file previously attached\.\[\r\n\]+If a process, it is no longer traced, and it continues its execution\.\[ \r\n\]+If\[ \r\n\]+you were debugging a file, the file is closed and gdb no longer accesses it\." "help detach"
+test_prefix_command_help "detach" {
+    "Detach a process or file previously attached\.\[\r\n\]+"
+    "If a process, it is no longer traced, and it continues its execution\.\[ \r\n\]+If\[ \r\n\]+"
+    "you were debugging a file, the file is closed and gdb no longer accesses it\.\[ \r\n\]+"
+}
 # test help directory
 gdb_test "help directory" "Add directory DIR to beginning of search path for source files\.\[\r\n\]+Forget cached info on source file locations and line positions\.\[\r\n\]+DIR can also be \\\$cwd for the current working directory, or \\\$cdir for the\[\r\n\]+directory in which the source file was compiled into object code\.\[\r\n\]+With no argument, reset the search path to \\\$cdir:\\\$cwd, the default\." "help directory"
 # test help disable "dis" abbreviation
-gdb_test "help dis" "Disable some breakpoints\.\[\r\n\]+Arguments are breakpoint numbers with spaces in between\.\[\r\n\]+To disable all breakpoints, give no argument\.\[\r\n\]+A disabled breakpoint is not forgotten, but has no effect until reenabled\.\[\r\n\]+List of disable subcommands:\[\r\n\]+disable breakpoints -- Disable some breakpoints\[\r\n\]+disable display -- Disable some expressions to be displayed when program stops\[\r\n\]+disable mem -- Disable memory region\[\r\n\]+disable tracepoints -- Disable specified tracepoints\[\r\n\]+Type \"help disable\" followed by disable subcommand name for full documentation\.\[\r\n\]+Command name abbreviations are allowed if unambiguous\." "help disable \"dis\" abbreviation"
+set expected_help_disable {
+    "Disable some breakpoints\.\[\r\n\]+"
+    "Arguments are breakpoint numbers with spaces in between\.\[\r\n\]+"
+    "To disable all breakpoints, give no argument\.\[\r\n\]+"
+    "A disabled breakpoint is not forgotten, but has no effect until reenabled\.\[\r\n\]+"
+}
+test_prefix_command_help {"dis" "disable"} $expected_help_disable "help disable \"dis\" abbreviation"
 # test help disable "disa" abbreviation
-gdb_test "help disa" "Disable some breakpoints\.\[\r\n\]+Arguments are breakpoint numbers with spaces in between\.\[\r\n\]+To disable all breakpoints, give no argument\.\[\r\n\]+A disabled breakpoint is not forgotten, but has no effect until reenabled\.\[\r\n\]+List of disable subcommands:\[\r\n\]+disable breakpoints -- Disable some breakpoints\[\r\n\]+disable display -- Disable some expressions to be displayed when program stops\[\r\n\]+disable mem -- Disable memory region\[\r\n\]+disable tracepoints -- Disable specified tracepoints\[\r\n\]+Type \"help disable\" followed by disable subcommand name for full documentation\.\[\r\n\]+Command name abbreviations are allowed if unambiguous\." "help disable \"disa\" abbreviation"
+test_prefix_command_help {"disa" "disable"} $expected_help_disable "help disable \"disa\" abbreviation"
 # test help disable
-gdb_test "help disable" "Disable some breakpoints\.\[\r\n\]+Arguments are breakpoint numbers with spaces in between\.\[\r\n\]+To disable all breakpoints, give no argument\.\[\r\n\]+A disabled breakpoint is not forgotten, but has no effect until reenabled\.\[\r\n\]+List of disable subcommands:\[\r\n\]+disable breakpoints -- Disable some breakpoints\[\r\n\]+disable display -- Disable some expressions to be displayed when program stops\[\r\n\]+disable mem -- Disable memory region\[\r\n\]+disable tracepoints -- Disable specified tracepoints\[\r\n\]+Type \"help disable\" followed by disable subcommand name for full documentation\.\[\r\n\]+Command name abbreviations are allowed if unambiguous\." "help disable"
+test_prefix_command_help "disable" $expected_help_disable
 # test help disable breakpoints
 gdb_test "help disable breakpoints" "Disable some breakpoints\.\[\r\n\]+Arguments are breakpoint numbers with spaces in between\.\[\r\n\]+To disable all breakpoints, give no argument\.\[\r\n\]+A disabled breakpoint is not forgotten, but has no effect until reenabled\.\[\r\n\]+This command may be abbreviated \"disable\"." "help disable breakpoints"
 # test help disable display
 gdb_test "help disable display" "Disable some expressions to be displayed when program stops\.\[\r\n\]+Arguments are the code numbers of the expressions to stop displaying\.\[\r\n\]+No argument means disable all automatic-display expressions\.\[\r\n\]+Do \"info display\" to see current list of code numbers\." "help disable display"
 # test help disassemble
-gdb_test "help disassemble" "Disassemble a specified section of memory\.\[\r\n\]+Default is the function surrounding the pc of the selected frame\.\[\r\n\]+With a single argument, the function surrounding that address is dumped\.\[\r\n\]+Two arguments are taken as a range of memory to dump\." "help disassemble"
+gdb_test "help disassemble" "Disassemble a specified section of memory\.\[\r\n\]+Default is the function surrounding the pc of the selected frame\.\[\r\n\]+With a /m modifier, source lines are included \\(if available\\)\.\[\r\n\]+With a /r modifier, raw instructions in hex are included\.\[\r\n\]+With a single argument, the function surrounding that address is dumped\.\[\r\n\]+Two arguments \\(separated by a comma\\) are taken as a range of memory to dump,\[\r\n\]+  in the form of \"start,end\", or \"start,\\+length\"\." "help disassemble"
 # test help display
 gdb_test "help display" "Print value of expression EXP each time the program stops\.\[\r\n\]+/FMT may be used before EXP as in the \"print\" command\.\[\r\n\]+/FMT \"i\" or \"s\" or including a size-letter is allowed,\[\r\n\]+as in the \"x\" command, and then EXP is used to get the address to examine\[\r\n\]+and examining is done as in the \"x\" command\.\[\r\n\]+With no argument, display all currently requested auto-display expressions\.\[\r\n\]+Use \"undisplay\" to cancel display requests previously made\." "help display"
 # test help do
@@ -148,7 +162,12 @@ gdb_test "help enable breakpoints delete" "Enable breakpoints and delete when hi
 # test help enable breakpoints once
 gdb_test "help enable breakpoints once" "Enable breakpoints for one hit.*" "help enable breakpoints once"
 # test help enable breakpoints
-gdb_test "help enable breakpoints" "Enable some breakpoints\.\[\r\n\]+Give breakpoint numbers \\(separated by spaces\\) as arguments\.\[\r\n\]+This is used to cancel the effect of the \"disable\" command\.\[\r\n\]+May be abbreviated to simply \"enable\"\.\[\r\n\]+List of enable breakpoints subcommands:\[\r\n\]+enable breakpoints delete -- Enable breakpoints and delete when hit\[\r\n\]+enable breakpoints once -- Enable breakpoints for one hit\[\r\n\]+Type \"help enable breakpoints\" followed by enable breakpoints subcommand name for full documentation\.\[\r\n\]+Command name abbreviations are allowed if unambiguous\." "help enable breakpoints"
+test_prefix_command_help {"enable breakpoints"} {
+    "Enable some breakpoints\.\[\r\n\]+"
+    "Give breakpoint numbers \\(separated by spaces\\) as arguments\.\[\r\n\]+"
+    "This is used to cancel the effect of the \"disable\" command\.\[\r\n\]+"
+    "May be abbreviated to simply \"enable\"\.\[\r\n\]+"
+}
 # test help enable delete
 gdb_test "help enable delete" "Enable breakpoints and delete when hit\.  Give breakpoint numbers\.\[\r\n\]+If a breakpoint is hit while enabled in this fashion, it is deleted\." "help enable delete"
 # test help enable display
@@ -156,7 +175,13 @@ gdb_test "help enable display" "Enable some expressions to be displayed when pro
 # test help enable once
 gdb_test "help enable once" "Enable breakpoints for one hit.*" "help enable once"
 # test help enable
-gdb_test "help enable" "Enable some breakpoints\.\[\r\n\]+Give breakpoint numbers \\(separated by spaces\\) as arguments\.\[\r\n\]+With no subcommand, breakpoints are enabled until you command otherwise\.\[\r\n\]+This is used to cancel the effect of the \"disable\" command\.\[\r\n\]+With a subcommand you can enable temporarily\.\[\r\n\]+List of enable subcommands:\[\r\n\]+enable delete -- Enable breakpoints and delete when hit\[\r\n\]+enable display -- Enable some expressions to be displayed when program stops\[\r\n\]+enable mem -- Enable memory region\[\r\n\]+enable once -- Enable breakpoints for one hit\[\r\n\]+enable tracepoints -- Enable specified tracepoints\[\r\n\]+Type \"help enable\" followed by enable subcommand name for full documentation\.\[\r\n\]+Command name abbreviations are allowed if unambiguous\." "help enable"
+test_prefix_command_help "enable" {
+    "Enable some breakpoints\.\[\r\n\]+"
+    "Give breakpoint numbers \\(separated by spaces\\) as arguments\.\[\r\n\]+"
+    "With no subcommand, breakpoints are enabled until you command otherwise.\.\[\r\n\]+"
+    "This is used to cancel the effect of the \"disable\" command\.\[\r\n\]+"
+    "With a subcommand you can enable temporarily\.\[\r\n\]+"
+}
 # test help exec-file
 gdb_test "help exec-file" "Use FILE as program for getting contents of pure memory\.\[\r\n\]+If FILE cannot be found as specified, your execution directory path\[\r\n\]+is searched for a command of that name\.\[\r\n\]+No arg means have no executable file\." "help exec-file"
 # test help frame "f" abbreviation
@@ -174,25 +199,21 @@ gdb_test "help finish" "Execute until selected stack frame returns\.\[\r\n\]+Upo
 # test help forward-search
 gdb_test "help forward-search" "Search for regular expression \\(see regex\\(3\\)\\) from last line listed.*" "help forward-search"
 # test help gcore
-send_gdb "help gcore\n"
-gdb_expect {
+gdb_test_multiple "help gcore" "help gcore" {
     -re "Undefined command: \"gcore\"\.  Try \"help\".*$gdb_prompt $" {
        pass "help gcore"
     }
     -re "Save a core file with the current state of the debugged process\.\[\r\n\]+Argument is optional filename\.  Default filename is 'core\.<process_id>'.*$gdb_prompt $" {
        pass "help gcore"
     }
-    default { fail "help gcore" }
 }
-send_gdb "help generate-core-file\n"
-gdb_expect {
+gdb_test_multiple "help generate-core-file" "help generate-core-file" {
     -re "Undefined command: \"generate-core-file\"\.  Try \"help\".*$gdb_prompt $" {
        pass "help gcore"
     }
     -re "Save a core file with the current state of the debugged process\.\[\r\n\]+Argument is optional filename\.  Default filename is 'core\.<process_id>'.*$gdb_prompt $" {
        pass "help gcore"
     }
-    default { fail "help gcore" }
 }
 # test help help "h" abbreviation 
 gdb_test "help h" "Print list of commands\." "help help \"h\" abbreviation"
@@ -201,9 +222,13 @@ gdb_test "help help" "Print list of commands\." "help help"
 # test help handle
 gdb_test "help handle" "Specify how to handle a signal\..*" "help handle"
 # test help info "i" abbreviation
-gdb_test "help i" "Generic command for showing things about the program being debugged\.\[\r\n\]+List of info subcommands:.*\[\r\n\]+Type \"help info\" followed by info subcommand name for full documentation\.\[\r\n\]+Command name abbreviations are allowed if unambiguous\." "help info \"i\" abbreviation"
+test_prefix_command_help {"i" "info"} {
+    "Generic command for showing things about the program being debugged\.\[\r\n\]+"
+} "help info \"i\" abbreviation"
 # test help info
-gdb_test "help info" "Generic command for showing things about the program being debugged\.\[\r\n\]+List of info subcommands:.*\[\r\n\]+Type \"help info\" followed by info subcommand name for full documentation\.\[\r\n\]+Command name abbreviations are allowed if unambiguous\." "help info"
+test_prefix_command_help "info" {
+    "Generic command for showing things about the program being debugged\.\[\r\n\]+"
+}
 # test help ignore
 gdb_test "help ignore" "Set ignore-count of breakpoint number N to COUNT\.\[\r\n\]+Usage is `ignore N COUNT'\." "help ignore"
 # test help info address
@@ -213,7 +238,9 @@ gdb_test "help info all-registers" "List of all registers and their contents, fo
 # test help info args
 gdb_test "help info args" "Argument variables of current stack frame\." "help info args"
 # test help info breakpoints
-gdb_test "help info breakpoints" "Status of user-settable breakpoints, or breakpoint number NUMBER\..*\[\r\n\]+breakpoint set\." "help info breakpoints"
+gdb_test "help info breakpoints" \
+    "Status of specified breakpoints .all user-settable breakpoints if no argument.*\[\r\n\]+breakpoint set\." \
+    "help info breakpoints"
 # test help info catch
 gdb_test "help info catch" "Exceptions that can be caught in the current stack frame\." "help info catch"
 # test help info copying
@@ -256,6 +283,8 @@ gdb_test "help info symbol" "Describe what symbol is at location ADDR.*"
 gdb_test "help info target" "Names of targets and files being debugged\.\[\r\n\]+Shows the entire stack of targets currently in use \\(including the exec-file,\[\r\n\]+core-file, and process, if any\\), as well as the symbol file name\." "help info target"
 # test help info terminal
 gdb_test "help info terminal" "Print inferior's saved terminal status\." "help info terminal"
+# test help info threads
+gdb_test "help info threads" "Display currently known threads.*" "help info threads"
 # test help info types
 gdb_test "help info types" "All type names, or those matching REGEXP\." "help info types"
 # test help info variables
@@ -263,19 +292,23 @@ gdb_test "help info variables" "All global and static variable names, or those m
 # test help info warranty
 gdb_test "help info warranty" "Various kinds of warranty you do not have\." "help info warranty"
 # test help info watchpoints
-gdb_test "help info watchpoints" "Synonym for ``info breakpoints''\." "help info watchpoints"
+gdb_test "help info watchpoints" \
+    "Status of specified watchpoints .all watchpoints if no argument.\." \
+    "help info watchpoints"
 # test help inspect
 gdb_test "help inspect" "Same as \"print\" command, except that if you are running in the epoch\[\r\n\]+environment, the value is printed in its own window\." "help inspect"
 # test help jump
 gdb_test "help jump" "Continue program being debugged at specified line or address\.\[\r\n\]+Give as argument either LINENUM or \[*\]+ADDR, where ADDR is an expression\[\r\n\]+for an address to start at\." "help jump"
 # test help kill
-gdb_test "help kill" "Kill execution of program being debugged\." "help kill"
+test_prefix_command_help "kill" {
+    "Kill execution of program being debugged\.\[\r\n\]+"
+}
 # test help list "l" abbreviation
 gdb_test "help l" "List specified function or line\.\[\r\n\]+With no argument, lists ten more lines after or around previous listing\.\[\r\n\]+\"list -\" lists the ten lines before a previous ten-line listing\.\[\r\n\]+One argument specifies a line, and ten lines are listed around that line\.\[\r\n\]+Two arguments with comma between specify starting and ending lines to list\.\[\r\n\]+Lines can be specified in these ways:\[\r\n\]+  LINENUM, to list around that line in current file,\[\r\n\]+  FILE:LINENUM, to list around that line in that file,\[\r\n\]+  FUNCTION, to list around beginning of that function,\[\r\n\]+  FILE:FUNCTION, to distinguish among like-named static functions\.\[\r\n\]+  \[*\]ADDRESS, to list around the line containing that address\.\[\r\n\]+With two args if one is empty it stands for ten lines away from the other arg\." "help list \"l\" abbreviation"
 # test help list
 gdb_test "help list" "List specified function or line\.\[\r\n\]+With no argument, lists ten more lines after or around previous listing\.\[\r\n\]+\"list -\" lists the ten lines before a previous ten-line listing\.\[\r\n\]+One argument specifies a line, and ten lines are listed around that line\.\[\r\n\]+Two arguments with comma between specify starting and ending lines to list\.\[\r\n\]+Lines can be specified in these ways:\[\r\n\]+  LINENUM, to list around that line in current file,\[\r\n\]+  FILE:LINENUM, to list around that line in that file,\[\r\n\]+  FUNCTION, to list around beginning of that function,\[\r\n\]+  FILE:FUNCTION, to distinguish among like-named static functions\.\[\r\n\]+  \[*\]ADDRESS, to list around the line containing that address\.\[\r\n\]+With two args if one is empty it stands for ten lines away from the other arg\." "help list"
 # test help load
-gdb_test "help load" "Dynamically load FILE into the running program, and record its symbols\[\r\n\]+for access from GDB\." "help load"
+gdb_test "help load" "Dynamically load FILE into the running program, and record its symbols\[\r\n\]+for access from GDB\.\[\r\n\]+A load OFFSET may also be given\." "help load"
 # test help make
 gdb_test "help make" "Run the ``make'' program using the rest of the line as arguments\." "help make"
 # test help next "n" abbreviation
@@ -286,7 +319,9 @@ gdb_test "help next" "Step program, proceeding through subroutine calls\.\[\r\n\
 gdb_test "help ni" "Step one instruction, but proceed through subroutine calls\.\[\r\n\]+Argument N means do this N times \\(or till program stops for another reason\\)\." "help nexti"
 # all the commands that used to be here are now in "maintainance" instead
 # test help obscure
-gdb_test "help obscure" "Obscure features\.\[\r\n\]+List of commands:.*\[\r\n\]+Type \"help\" followed by command name for full documentation\.\[\r\n\]+Command name abbreviations are allowed if unambiguous\." "help obscure"
+test_class_help "obscure" {
+    "Obscure features\.\[\r\n\]+"
+}
 # test help output
 gdb_test "help output" "Like \"print\" but don't put in value history and don't print newline\.\[\r\n\]+This is useful in user-defined commands\." "help output"
 # test help overlay
@@ -329,7 +364,9 @@ gdb_test "help return" "Make selected stack frame return to its caller\.\[\r\n\]
 # test help reverse-search
 gdb_test "help reverse-search" "Search backward for regular expression \\(see regex\\(3\\)\\) from last line listed\..*" "help reverse-search"
 # test help running
-gdb_test "help running" "Running the program\.\[\r\n\]+List of commands:.*\[\r\n\]+Type \"help\" followed by command name for full documentation\.\[\r\n\]+Command name abbreviations are allowed if unambiguous\." "help running"
+test_class_help "running" {
+    "Running the program\.\[\r\n\]+"
+}
 # test help step "s" abbreviation
 gdb_test "help s" "Step program until it reaches a different source line\.\[\r\n\]+Argument N means do this N times \\(or till program stops for another reason\\)\." "help step \"s\" abbreviation"
 # test help step
@@ -343,11 +380,17 @@ gdb_test "help set annotate" "Set annotation_level\.\[\r\n\]+0 == normal;     1
 # test help set args
 gdb_test "help set args" "Set argument list to give program being debugged when it is started\.\[\r\n\]+Follow this command with any number of args, to be passed to the program\."
 # test help set check "c" abbreviation
-gdb_test "help set c" "Set the status of the type/range checker\.\[\r\n\]+List of set check subcommands:\[\r\n\]+set check range -- Set range checking\[\r\n\]+set check type -- Set type checking\[\r\n\]+Type \"help set check\" followed by set check subcommand name for full documentation\.\[\r\n\]+Command name abbreviations are allowed if unambiguous\." "help set check \"c\" abbreviation"
+test_prefix_command_help {"set c" "set check"} {
+    "Set the status of the type/range checker\.\[\r\n\]+"
+} "help set check \"c\" abbreviation"
 # test help set check "ch" abbreviation
-gdb_test "help set ch" "Set the status of the type/range checker\.\[\r\n\]+List of set check subcommands:\[\r\n\]+set check range -- Set range checking\[\r\n\]+set check type -- Set type checking\[\r\n\]+Type \"help set check\" followed by set check subcommand name for full documentation\.\[\r\n\]+Command name abbreviations are allowed if unambiguous\." "help set check \"ch\" abbreviation"
+test_prefix_command_help {"set ch" "set check"} {
+    "Set the status of the type/range checker\.\[\r\n\]+"
+} "help set check \"ch\" abbreviation"
 # test help set check
-gdb_test "help set check" "Set the status of the type/range checker\.\[\r\n\]+List of set check subcommands:\[\r\n\]+set check range -- Set range checking\[\r\n\]+set check type -- Set type checking\[\r\n\]+Type \"help set check\" followed by set check subcommand name for full documentation\.\[\r\n\]+Command name abbreviations are allowed if unambiguous\." "help set check"
+test_prefix_command_help {"set check"} {
+    "Set the status of the type/range checker\.\[\r\n\]+"
+}
 # test help set check range
 gdb_test "help set check range" "Set range checking\.  \\(on/warn/off/auto\\)" "help set check range"
 # test help set check type
@@ -371,20 +414,29 @@ gdb_test "help set history save" "Set saving of the history record on exit\.\[\r
 # test help set history size
 gdb_test "help set history size" "Set the size of the command history,\[\r\n\]+ie\. the number of previous commands to keep a record of\." "help set history size"
 # test help set history
-gdb_test "help set history" "Generic command for setting command history parameters\.\[\r\n\]+List of set history subcommands:\[\r\n\]+set history expansion -- Set history expansion on command input\[\r\n\]+set history filename -- Set the filename in which to record the command history\[\r\n\]+set history save -- Set saving of the history record on exit\[\r\n\]+set history size -- Set the size of the command history\[\r\n\]+Type \"help set history\" followed by set history subcommand name for full documentation\.\[\r\n\]+Command name abbreviations are allowed if unambiguous\." "help set history"
+test_prefix_command_help {"set history"} {
+    "Generic command for setting command history parameters\.\[\r\n\]+"
+}
 # test help set language
-gdb_test "help set language" "Set the current source language\." "help set language"
+gdb_test "help set language" "Set the current source language\.\[\r\n\]+The currently understood settings are:(\[^\r\n\]*\[\r\n\])+local or auto  *Automatic setting based on source file(\[^\r\n\]*\[\r\n\])+c  *Use the C language(\[^\r\n\]*\[\r\n\])+c\[+\]+  *Use the C\[+\]+ language(\[^\r\n\]*\[\r\n\])+modula-2  *Use the Modula-2 language.*" "help set language"
+
 # test help set listsize
 gdb_test "help set listsize" "Set number of source lines gdb will list by default\." "help set listsize"
 # test help set print "p" abbreviation
 # FIXME -- Ultrix hangs randomly on this very long output from gdb and
 # continues with its output only if something is sent to gdb.
 # Also, if the system is slow, it may time out because the output is large.
-gdb_test "help set p" "Generic command for setting how things print\.\[\r\n\]+List of set print subcommands:.*\[\r\n\]+Type \"help set print\" followed by set print subcommand name for full documentation\.\[\r\n\]+Command name abbreviations are allowed if unambiguous\." "help set print \"p\" abbreviation"
+test_prefix_command_help {"set p" "set print"} {
+    "Generic command for setting how things print\.\[\r\n\]+"
+} "help set print \"p\" abbreviation"
 # test help set print "pr" abbreviation
-gdb_test "help set pr" "Generic command for setting how things print\.\[\r\n\]+List of set print subcommands:.*\[\r\n\]+Type \"help set print\" followed by set print subcommand name for full documentation\.\[\r\n\]+Command name abbreviations are allowed if unambiguous\." "help set print \"pr\" abbreviation"
+test_prefix_command_help {"set pr" "set print"} {
+    "Generic command for setting how things print\.\[\r\n\]+"
+} "help set print \"pr\" abbreviation"
 # test help set print
-gdb_test "help set print" "Generic command for setting how things print\.\[\r\n\]+List of set print subcommands:.*\[\r\n\]+Type \"help set print\" followed by set print subcommand name for full documentation\.\[\r\n\]+Command name abbreviations are allowed if unambiguous\." "help set print"
+test_prefix_command_help {"set print"} {
+    "Generic command for setting how things print\.\[\r\n\]+"
+}
 # test help set print address
 gdb_test "help set print address" "Set printing of addresses\." "help set print address"
 # test help set print array
@@ -424,7 +476,16 @@ gdb_test "help set write" "Set writing into executable and core files\." "help s
 # FIXME -- Ultrix hangs randomly on this very long output from gdb and
 # continues with its output only if something is sent to gdb.
 # Also, if the system is slow, it may time out because the output is large.
-gdb_test "help set" "Evaluate expression EXP and assign result to variable VAR, using assignment\[\r\n\]+syntax appropriate for the current language \\(VAR = EXP or VAR := EXP for\[\r\n\]+example\\)\.  VAR may be a debugger \"convenience\" variable \\(names starting\[\r\n\]+with \\\$\\), a register \\(a few standard names starting with \\\$\\), or an actual\[\r\n\]+variable in the program being debugged\.  EXP is any valid expression.*\[\r\n\]+set listsize -- Set number of source lines gdb will list by default.*\[\r\n\]+Type \"help set\" followed by set subcommand name for full documentation\.\[\r\n\]+Command name abbreviations are allowed if unambiguous..*\[\r\n\]+" "help set"
+test_prefix_command_help "set" {
+    "Evaluate expression EXP and assign result to variable VAR, using assignment\[\r\n\]+"
+    "syntax appropriate for the current language \\(VAR = EXP or VAR := EXP for\[\r\n\]+"
+    "example\\)\.  VAR may be a debugger \"convenience\" variable \\(names starting\[\r\n\]+"
+    "with \\\$\\), a register \\(a few standard names starting with \\\$\\), or an actual\[\r\n\]+"
+    "variable in the program being debugged\.  EXP is any valid expression.*\[\r\n\]+"
+    "Use \"set variable\" for variables with names identical to set subcommands\.\[\r\n\]+"
+    "With a subcommand, this command modifies parts of the gdb environment\.\[\r\n\]+"
+    "You can see these environment settings with the \"show\" command\.\[\r\n\]+"
+}
 # test help shell
 gdb_test "help shell" "Execute the rest of the line as a shell command\.\[\r\n\]+With no arguments, run an inferior shell\." "help shell"
 #test help show annotate
@@ -432,9 +493,13 @@ gdb_test "help show annotate" "Show annotation_level\.\[\r\n\]+0 == normal;
 # test help show args
 gdb_test "help show args" "Show argument list to give program being debugged when it is started\.\[\r\n\]+Follow this command with any number of args, to be passed to the program\."
 # test help show check "c" abbreviation
-gdb_test "help show c" "Show the status of the type/range checker\.\[\r\n\]+List of show check subcommands:\[\r\n\]+show check range -- Show range checking\[\r\n\]+show check type -- Show type checking\[\r\n\]+Type \"help show check\" followed by show check subcommand name for full documentation\.\[\r\n\]+Command name abbreviations are allowed if unambiguous\." "help show check \"c\" abbreviation"
+test_prefix_command_help {"show c" "show check"} {
+    "Show the status of the type/range checker\.\[\r\n\]+"
+} "help show check \"c\" abbreviation"
 # test help show check
-gdb_test "help show check" "Show the status of the type/range checker\.\[\r\n\]+List of show check subcommands:\[\r\n\]+show check range -- Show range checking\[\r\n\]+show check type -- Show type checking\[\r\n\]+Type \"help show check\" followed by show check subcommand name for full documentation\.\[\r\n\]+Command name abbreviations are allowed if unambiguous\." "help show check"
+test_prefix_command_help {"show check"} {
+    "Show the status of the type/range checker\.\[\r\n\]+"
+}
 # test help show check range
 gdb_test "help show check range" "Show range checking\.  \\(on/warn/off/auto\\)" "help show check range"
 # test help show check type
@@ -448,7 +513,7 @@ gdb_test "help show confirm" "Show whether to confirm potentially dangerous oper
 # test help show convenience
 gdb_test "help show convenience" "Debugger convenience \\(\"\\\$foo\"\\) variables\.\[\r\n\]+These variables are created when you assign them values;\[\r\n\]+thus, \"print \\\$foo=1\" gives \"\\\$foo\" the value 1\.  Values may be any type\.\[\r\n\]+A few convenience variables are given values automatically:\[\r\n\]+\"\\\$_\"holds the last address examined with \"x\" or \"info lines\",\[\r\n\]+\"\\\$__\" holds the contents of the last address examined with \"x\"\." "help show convenience"
 # test help show directories
-gdb_test "help show directories" "Current search path for finding source files\.\[\r\n\]+\\\$cwd in the path means the current working directory\.\[\r\n\]+\\\$cdir in the path means the compilation directory of the source file\." "help show directories"
+gdb_test "help show directories" "Show the search path for finding source files\.\[\r\n\]+\\\$cwd in the path means the current working directory\.\[\r\n\]+\\\$cdir in the path means the compilation directory of the source file\..*" "help show directories"
 # test help show editing
 gdb_test "help show editing" "Show editing of command lines as they are typed\.\[\r\n\]+Use \"on\" to enable the editing, and \"off\" to disable it\.\[\r\n\]+Without an argument, command line editing is enabled\.  To edit, use\[\r\n\]+EMACS-like or VI-like commands like control-P or ESC\." "help show editing"
 # test help show environment
@@ -464,17 +529,25 @@ gdb_test "help show history save" "Show saving of the history record on exit\.\[
 # test help show history size
 gdb_test "help show history size" "Show the size of the command history,\[\r\n\]+ie\. the number of previous commands to keep a record of\." "help show history size"
 # test help show history
-gdb_test "help show history" "Generic command for showing command history parameters\.\[\r\n\]+List of show history subcommands:\[\r\n\]+show history expansion -- Show history expansion on command input\[\r\n\]+show history filename -- Show the filename in which to record the command history\[\r\n\]+show history save -- Show saving of the history record on exit\[\r\n\]+show history size -- Show the size of the command history\[\r\n\]+Type \"help show history\" followed by show history subcommand name for full documentation\.\[\r\n\]+Command name abbreviations are allowed if unambiguous\." "help show history"
+test_prefix_command_help {"show history"} {
+    "Generic command for showing command history parameters\.\[\r\n\]+"
+}
 # test help show language
 gdb_test "help show language" "Show the current source language\." "help show language"
 # test help show listsize
 gdb_test "help show listsize" "Show number of source lines gdb will list by default\." "help show listsize"
 # test help show print "p" abbreviation
-gdb_test "help show p" "Generic command for showing print settings\.\[\r\n\]+List of show print subcommands:.*\[\r\n\]+Type \"help show print\" followed by show print subcommand name for full documentation\.\[\r\n\]+Command name abbreviations are allowed if unambiguous\." "help show print \"p\" abbreviation"
+test_prefix_command_help {"show p" "show print"} {
+    "Generic command for showing print settings\.\[\r\n\]+"
+} "help show print \"p\" abbreviation"
 # test help show print "pr" abbreviation
-gdb_test "help show pr" "Generic command for showing print settings\.\[\r\n\]+List of show print subcommands:.*\[\r\n\]+Type \"help show print\" followed by show print subcommand name for full documentation\.\[\r\n\]+Command name abbreviations are allowed if unambiguous\." "help show print \"pr\" abbreviation"
+test_prefix_command_help {"show pr" "show print"} {
+    "Generic command for showing print settings\.\[\r\n\]+"
+} "help show print \"pr\" abbreviation"
 # test help show print
-gdb_test "help show print" "Generic command for showing print settings\.\[\r\n\]+List of show print subcommands:.*\[\r\n\]+Type \"help show print\" followed by show print subcommand name for full documentation\.\[\r\n\]+Command name abbreviations are allowed if unambiguous\." "help show print"
+test_prefix_command_help {"show print"} {
+    "Generic command for showing print settings\.\[\r\n\]+"
+} "help show print \"p\" abbreviation"
 # test help show paths
 gdb_test "help show paths" "Current search path for finding object files\.\[\r\n\]+\\\$cwd in the path means the current working directory\.\[\r\n\]+This path is equivalent to the \\\$PATH shell variable\.  It is a list of\[\r\n\]+directories, separated by colons\.  These directories are searched to find\[\r\n\]+fully linked executable files and separately compiled object files as needed\." "help show paths"
 # test help show print address
@@ -520,7 +593,9 @@ gdb_test "help show write" "Show writing into executable and core files\." "help
 # FIXME -- Ultrix hangs randomly on this very long output from gdb and
 # continues with its output only if something is sent to gdb.
 # Also, if the system is slow, it may time out because the output is large.
-gdb_test "help show" "Generic command for showing things about the debugger\.\[\r\n\]+List of show subcommands:.*\[\r\n\]+show directories -- Current search path for finding source files.*\[\r\n\]+show listsize -- Show number of source lines gdb will list by default.*\[\r\n\]+Type \"help show\" followed by show subcommand name for full documentation\.\[\r\n\]+Command name abbreviations are allowed if unambiguous\." "help show"
+test_prefix_command_help "show" {
+    "Generic command for showing things about the debugger\.\[\r\n\]+"
+}
 # test help step
 gdb_test "help step" "Step program until it reaches a different source line\.\[\r\n\]+Argument N means do this N times \\(or till program stops for another reason\\)\." "help step #2"
 # test help stepi "si" abbreviation
@@ -531,21 +606,31 @@ gdb_test "help stepi" "Step one instruction exactly\.\[\r\n\]+Argument N means d
 gdb_test "help signal" "Continue program giving it signal.*" "help signal"
 # test help source
 # vxgdb reads .vxgdbinit
-gdb_test "help source" "Read commands from a file named FILE\.\[\r\n\]+Note that the file \"\[^\"\]*\" is read automatically in this way\[\r\n\]+when gdb is started\." "help source"
+# ".-s. .-v." is written that way to avoid the complications of trying
+# to get "[-s] [-v]" through expect and tcl.
+gdb_test "help source" "Read commands from a file named FILE\.\[\r\n\]+Usage: source .-s. .-v. FILE\[\r\n\]+-s: search for the script in the source search path,\[\r\n\]+\[ \]+even if FILE contains directories\.\[\r\n\]+-v: each command in FILE is echoed as it is executed\.\[\r\n\]+Note that the file \"\[^\"\]*\" is read automatically in this way\[\r\n\]+when GDB is started\." "help source"
 # test help stack
-gdb_test "help stack" "Examining the stack\..*\[\r\n\]+When the program being debugged stops, gdb selects the innermost frame\.\[\r\n\]+The commands below can be used to select other frames by number or address\.\[\r\n\]+List of commands:\[\r\n\]+backtrace -- Print backtrace of all stack frames\[\r\n\]+bt -- Print backtrace of all stack frames\[\r\n\]+down -- Select and print stack frame called by this one\[\r\n\]+frame -- Select and print a stack frame\[\r\n\]+return -- Make selected stack frame return to its caller\[\r\n\]+select-frame -- Select a stack frame without printing anything\[\r\n\]+up -- Select and print stack frame that called this one\[\r\n\]+Type \"help\" followed by command name for full documentation\.\[\r\n\]+Command name abbreviations are allowed if unambiguous\." "help stack"
+test_class_help "stack" {
+    "Examining the stack\..*\[\r\n\]+"
+    "When the program being debugged stops, gdb selects the innermost frame\.\[\r\n\]+"
+    "The commands below can be used to select other frames by number or address\.\[\r\n\]+"
+}
 # test help status
-gdb_test "help status" "Status inquiries\.\[\r\n\]+List of commands:\[\r\n\]+info -- Generic command for showing things about the program being debugged.*\[\r\n\]+show -- Generic command for showing things about the debugger\[\r\n\]+Type \"help\" followed by command name for full documentation\.\[\r\n\]+Command name abbreviations are allowed if unambiguous\." "help status"
+test_class_help "status" {
+    "Status inquiries\.\[\r\n\]+"
+}
 
 # test help support
 # FIXME -- Ultrix hangs randomly on this very long output from gdb and
 # continues with its output only if something is sent to gdb.
 # Also, if the system is slow, it may time out because the output is large.
-gdb_test "help support" "Support facilities\.\[\r\n\]+List of commands:.*\[\r\n\]+show confirm -- Show whether to confirm potentially dangerous operations.*\[\r\n\]+show history -- Generic command for showing command history parameters.*\[\r\n\]+Type \"help\" followed by command name for full documentation\.\[\r\n\]+Command name abbreviations are allowed if unambiguous\." "help support"
+test_class_help "support" {
+    "Support facilities\.\[\r\n\]+"
+}
 # test help symbol-file
 gdb_test "help symbol-file" "Load symbol table from executable file FILE\.\[\r\n\]+The `file' command can also load symbol tables, as well as setting the file\[\r\n\]+to execute\." "help symbol-file"
 # test help target child
-gdb_test "help target child" "Unix child process \\(started by the \"run\" command\\)\.|Undefined target command: \"child\"\.  Try \"help target\"\." "help target child"
+gdb_test "help target child" "(Unix|Win32) child process \\(started by the \"run\" command\\)\.|Undefined target command: \"child\"\.  Try \"help target\"\." "help target child"
 # test help target procfs
 gdb_test "help target procfs" "Unix /proc child process \\(started by the \"run\" command\\)\.|Undefined target command: \"procfs\"\.  Try \"help target\"\." "help target procfs (procfs version)"
 # test help target core
@@ -556,29 +641,49 @@ gdb_test "help target exec" "Use an executable file as a target\.\[\r\n\]+Specif
 gdb_test "help target remote" "Use a remote computer via a serial line, using a gdb-specific protocol\.\[\r\n\]+Specify the serial device it is connected to\[\r\n\]+\\(e.g. .*" "help target remote"
 # test help target
 # the child process target may be "target child" or "target procfs"
-gdb_test "help target" "Connect to a target machine or process\.\[\r\n\]+The first argument is the type or protocol of the target machine\.\[\r\n\]+Remaining arguments are interpreted by the target protocol\.  For more\[\r\n\]+information on the arguments for a particular protocol, type\[\r\n\]+`help target ' followed by the protocol name\.\[\r\n\]+List of target subcommands:.*\[\r\n\]+target exec -- Use an executable file as a target.*\[\r\n\]+Type \"help target\" followed by target subcommand name for full documentation\.\[\r\n\]+Command name abbreviations are allowed if unambiguous\." "help target"
+test_prefix_command_help "target" {
+    "Connect to a target machine or process\.\[\r\n\]+"
+    "The first argument is the type or protocol of the target machine\.\[\r\n\]+"
+    "Remaining arguments are interpreted by the target protocol\.  For more\[\r\n\]+"
+    "information on the arguments for a particular protocol, type\[\r\n\]+"
+    "`help target ' followed by the protocol name\.\[\r\n\]+"
+}
 # test help tbreak
 gdb_test "help tbreak" "Set a temporary breakpoint.*" "help tbreak"
+#test help thread
+gdb_test "help thread" "Use this command to switch between threads.*" "help thread"
+# test help thread apply
+gdb_test "help thread apply" "Apply a command to a list of threads.*" "help thread apply"
+# test help thread find
+gdb_test "help thread find" "Find threads that match a regular.*" "help thread find"
+# test help thread name
+gdb_test "help thread name" "Set the current thread's name.*" "help thread name"
 # test help tty
-gdb_test "help tty" "Set terminal for future runs of program being debugged\." "help tty"
+gdb_test "help tty" "Set terminal for future runs of program being debugged\.\[\r\n\]+Usage: set inferior-tty /dev/pts/1" "help tty"
 # test help until "u" abbreviation
-gdb_test "help u" "Execute until the program reaches a source line greater than the current\[\r\n\]+or a specified line or address or function \\(same args as break command\\)\.\[\r\n\]+Execution will also stop upon exit from the current stack frame\." "help until \"u\" abbreviation"
+gdb_test "help u" "Execute until the program reaches a source line greater than the current\[\r\n\]+or a specified location \\(same args as break command\\) within the current frame\." "help until \"u\" abbreviation"
 # test help until
-gdb_test "help until" "Execute until the program reaches a source line greater than the current\[\r\n\]+or a specified line or address or function \\(same args as break command\\)\.\[\r\n\]+Execution will also stop upon exit from the current stack frame\." "help until"
+gdb_test "help until" "Execute until the program reaches a source line greater than the current\[\r\n\]+or a specified location \\(same args as break command\\) within the current frame\." "help until"
 # test help undisplay
 gdb_test "help undisplay" "Cancel some expressions to be displayed when program stops\.\[\r\n\]+Arguments are the code numbers of the expressions to stop displaying\.\[\r\n\]+No argument means cancel all automatic-display expressions\.\[\r\n\]+\"delete display\" has the same effect as this command\.\[\r\n\]+Do \"info display\" to see current list of code numbers\." "help undisplay"
 # test help unset environment
 gdb_test "help unset environment" "Cancel environment variable VAR for the program\.\[\r\n\]+This does not affect the program until the next \"run\" command\." "help unset environment"
 # test help unset
-gdb_test "help unset" "Complement to certain \"set\" commands\.\[\r\n\]+List of unset subcommands:\[\r\n\]+unset environment -- Cancel environment variable VAR for the program\[\r\n\]+Type \"help unset\" followed by unset subcommand name for full documentation\.\[\r\n\]+Command name abbreviations are allowed if unambiguous\." "help unset"
+test_prefix_command_help "unset" {
+    "Complement to certain \"set\" commands\.\[\r\n\]+"
+}
 # test help up
 gdb_test "help up" "Select and print stack frame that called this one\.\[\r\n\]+An argument says how many frames up to go\." "help up"
 # test help up-silently
 gdb_test "help up-silently" "Same as the `up' command, but does not print anything\.\[\r\n\]+This is useful in command scripts\." "help up-silently"
 # test help user-defined
-gdb_test "help user-defined" "User-defined commands\.\[\r\n\]+The commands in this class are those defined by the user\.\[\r\n\]+Use the \"define\" command to define a command\.\[\r\n\]+List of commands:.*\[\r\n\]+Type \"help\" followed by command name for full documentation\.\[\r\n\]+Command name abbreviations are allowed if unambiguous\." "help user-defined"
+test_class_help "user-defined" {
+    "User-defined commands\.\[\r\n\]+"
+    "The commands in this class are those defined by the user\.\[\r\n\]+"
+    "Use the \"define\" command to define a command\.\[\r\n\]+"
+}
 # test help watch
-gdb_test "help watch" "Set a watchpoint for an expression\.\[\r\n\]+A watchpoint stops execution of your program whenever the value of\[\r\n\]+an expression changes\." "help watch"
+gdb_test "help watch" "Set a watchpoint for an expression\.\[\r\n\]+Usage: watch .-l.-location. EXPRESSION\[\r\n\]+A watchpoint stops execution of your program whenever the value of\[\r\n\]+an expression changes\.\[\r\n\]+If -l or -location is given, this evaluates EXPRESSION and watches\[\r\n\]+the memory to which it refers\." "help watch"
 # test help whatis
 gdb_test "help whatis" "Print data type of expression EXP\." "help whatis"
 # test help where
This page took 0.032831 seconds and 4 git commands to generate.