gdb
[deliverable/binutils-gdb.git] / gdb / testsuite / gdb.base / help.exp
CommitLineData
b6ba6518 1# Copyright 1988, 1990, 1991, 1992, 1994, 1995, 1996, 1997, 1998, 1999,
4c38e0a4 2# 2000, 2002, 2003, 2005, 2006, 2007, 2008, 2009, 2010
0fb0cc75 3# Free Software Foundation, Inc.
c906108c
SS
4
5# This program is free software; you can redistribute it and/or modify
6# it under the terms of the GNU General Public License as published by
e22f8b7c 7# the Free Software Foundation; either version 3 of the License, or
c906108c 8# (at your option) any later version.
e22f8b7c 9#
c906108c
SS
10# This program is distributed in the hope that it will be useful,
11# but WITHOUT ANY WARRANTY; without even the implied warranty of
12# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13# GNU General Public License for more details.
e22f8b7c 14#
c906108c 15# You should have received a copy of the GNU General Public License
e22f8b7c 16# along with this program. If not, see <http://www.gnu.org/licenses/>.
c906108c 17
c906108c
SS
18# This file was written by Rob Savoye. (rob@cygnus.com)
19
20#
21# test gdb help commands
22#
23
c906108c
SS
24
25gdb_start
26
27d3a1a2
MS
27# force the height of the debugger to be pretty large so no pagers get used
28gdb_test_no_output "set height 400" "test set height"
c906108c
SS
29
30# use a larger expect input buffer for long help outputs.
31# test help add-symbol-file
5b96932b 32gdb_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"
0fbc361c
EZ
33# test help advance
34gdb_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"
c906108c 35# test help aliases
a38cd180
VP
36test_class_help "aliases" {"Aliases of other commands\.\[\r\n\]+"}
37
dd7dfd64
MS
38# test help append
39gdb_test "help append" "Append target code/data to a local file\.\[\r\n\]+List of append subcommands:.*"
40gdb_test "help append binary" "Append target code/data to a raw binary file\.\[\r\n\]+List of append binary subcommands:.*"
41gdb_test "help append memory" "Append contents of memory to a raw binary file\.\[\r\n\]+Arguments are FILE START STOP\. Writes the contents of memory within the\[\r\n\]+range \\\[START \.\. STOP\\) to the specifed FILE in raw target ordered bytes\."
42gdb_test "help append value" "Append the value of an expression to a raw binary file\.\[\r\n\]+Arguments are FILE EXPRESSION\. Writes the value of EXPRESSION to\[\r\n\]+the specified FILE in raw target ordered bytes\."
43gdb_test "help append binary memory" "Append contents of memory to a raw binary file\.\[\r\n\]+Arguments are FILE START STOP\. Writes the contents of memory within the\[\r\n\]+range \\\[START \.\. STOP\\) to the specifed FILE in raw target ordered bytes\."
44gdb_test "help append binary value" "Append the value of an expression to a raw binary file\.\[\r\n\]+Arguments are FILE EXPRESSION\. Writes the value of EXPRESSION\[\r\n\]+to the specified FILE in raw target ordered bytes\."
45# test help attach
523ac3f9 46gdb_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"
c906108c 47# test help breakpoint "b" abbreviation
d41c0fc8 48gdb_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"
c906108c 49# test help breakpoint "br" abbreviation
d41c0fc8 50gdb_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"
c906108c 51# test help breakpoint "bre" abbreviation
d41c0fc8 52gdb_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"
c906108c 53# test help breakpoint "brea" abbreviation
d41c0fc8 54gdb_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"
c906108c 55# test help breakpoint "break" abbreviation
d41c0fc8 56gdb_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"
c906108c 57# test help breakpoints
a38cd180 58test_class_help "breakpoints" {"Making program stop at certain points\.\[\r\n\]+"}
c906108c 59# test help backtrace "bt" abbreviation
523ac3f9 60gdb_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"
c906108c 61# test help backtrace
523ac3f9 62gdb_test "help backtrace" "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"
c906108c 63# test help continue "c" abbreviation
523ac3f9 64gdb_test "help c" "Continue program being debugged.*" "help continue \"c\" abbreviation"
c906108c 65# test help continue
523ac3f9 66gdb_test "help continue" "Continue program being debugged.*" "help continue"
c906108c 67# test help call
523ac3f9 68gdb_test "help call" "Call a function.*" "help call"
c906108c 69# test help catch
808104c8 70gdb_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"
c906108c 71# test help cd
523ac3f9 72gdb_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"
c906108c 73# test help clear
523ac3f9 74gdb_test "help clear" "Clear 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, all breakpoints in that line are cleared\.\[\r\n\]+If function is specified, breakpoints at beginning of function are cleared\.\[\r\n\]+If an address is specified, breakpoints at that address are cleared\.\[\r\n\]+With no argument, clears all breakpoints in the line that the selected frame\[\r\n\]+is executing in\.\[\r\n\]+See also the \"delete\" command which clears breakpoints by number\." "help clear"
c906108c 75# test help commands
523ac3f9 76gdb_test "help commands" "Set commands to be executed when a breakpoint is hit\.\[\r\n\]+Give breakpoint number as argument after \"commands\"\.\[\r\n\]+With no argument, the targeted breakpoint is the last one set\.\[\r\n\]+The commands themselves follow starting on the next line\.\[\r\n\]+Type a line containing \"end\" to indicate the end of them\.\[\r\n\]+Give \"silent\" as the first line to make the breakpoint silent;\[\r\n\]+then no output is printed when it is hit, except what the commands print\." "help commands"
c906108c 77# test help condition
48b2f8d7 78gdb_test "help condition" "Specify breakpoint number N to break only if COND is true\.\[\r\n\]+Usage is `condition N COND', where N is an integer and COND is an\[\r\n\]+expression to be evaluated whenever breakpoint N is reached." "help condition"
c906108c 79# test help core-file
523ac3f9 80gdb_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"
c906108c 81# test help delete "d" abbreviation
a38cd180
VP
82set expected_help_delete {
83 "Delete some breakpoints or auto-display expressions\.\[\r\n\]+"
84 "Arguments are breakpoint numbers with spaces in between\.\[\r\n\]+"
85 "To delete all breakpoints, give no argument\.\[\r\n\]+"
86 "Also a prefix command for deletion of other GDB objects\.\[\r\n\]+"
87 "The \"unset\" command is also an alias for \"delete\"\.\[\r\n\]+"
88}
89test_prefix_command_help {"d" "delete"} $expected_help_delete "help delete \"d\" abbreviation"
c906108c 90# test help delete
a38cd180 91test_prefix_command_help "delete" $expected_help_delete
c906108c 92# test help data
a38cd180 93test_class_help "data" {"Examining data\.\[\r\n\]+"}
c906108c 94# test help define
523ac3f9 95gdb_test "help define" "Define a new command.*" "help define"
c906108c 96# test help delete breakpoints
523ac3f9 97gdb_test "help delete breakpoints" "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\]+This command may be abbreviated \"delete\"\." "help delete breakpoints"
c906108c 98# test help delete display
523ac3f9 99gdb_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"
c906108c 100# test help detach
a38cd180
VP
101test_prefix_command_help "detach" {
102 "Detach a process or file previously attached\.\[\r\n\]+"
103 "If a process, it is no longer traced, and it continues its execution\.\[ \r\n\]+If\[ \r\n\]+"
104 "you were debugging a file, the file is closed and gdb no longer accesses it\.\[ \r\n\]+"
105}
c906108c 106# test help directory
523ac3f9 107gdb_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"
c906108c 108# test help disable "dis" abbreviation
a38cd180
VP
109set expected_help_disable {
110 "Disable some breakpoints\.\[\r\n\]+"
111 "Arguments are breakpoint numbers with spaces in between\.\[\r\n\]+"
112 "To disable all breakpoints, give no argument\.\[\r\n\]+"
113 "A disabled breakpoint is not forgotten, but has no effect until reenabled\.\[\r\n\]+"
114}
115test_prefix_command_help {"dis" "disable"} $expected_help_disable "help disable \"dis\" abbreviation"
c906108c 116# test help disable "disa" abbreviation
a38cd180 117test_prefix_command_help {"disa" "disable"} $expected_help_disable "help disable \"disa\" abbreviation"
c906108c 118# test help disable
a38cd180 119test_prefix_command_help "disable" $expected_help_disable
c906108c 120# test help disable breakpoints
523ac3f9 121gdb_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"
c906108c 122# test help disable display
523ac3f9 123gdb_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"
c906108c 124# test help disassemble
d41b819e 125gdb_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"
c906108c 126# test help display
523ac3f9 127gdb_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"
c906108c 128# test help do
523ac3f9 129gdb_test "help do" "Select and print stack frame called by this one\.\[\r\n\]+An argument says how many frames down to go\." "help do"
c906108c 130# test help document
523ac3f9 131gdb_test "help document" "Document a user-defined command\.\[\r\n\]+Give command name as argument\. Give documentation on following lines\.\[\r\n\]+End with a line of just \"end\"\." "help document"
c906108c 132# test help down
523ac3f9 133gdb_test "help down" "Select and print stack frame called by this one\.\[\r\n\]+An argument says how many frames down to go\." "help down"
c906108c 134# test help down-silently
523ac3f9 135gdb_test "help down-silently" "Same as the `down' command, but does not print anything\.\[\r\n\]+This is useful in command scripts\." "help down-silently"
dd7dfd64
MS
136# test help dump
137gdb_test "help dump" "Dump target code/data to a local file\.\[\r\n\]+List of dump subcommands:.*"
138gdb_test "help dump binary" "Write target code/data to a raw binary file\.\[\r\n\]+List of dump binary subcommands:.*"
139gdb_test "help dump ihex" "Write target code/data to an intel hex file\.\[\r\n\]+List of dump ihex subcommands:.*"
140gdb_test "help dump memory" "Write contents of memory to a raw binary file\.\[\r\n\]+Arguments are FILE START STOP\. Writes the contents of memory within the\[\r\n\]+range \\\[START \.\. STOP\\) to the specifed FILE in raw target ordered bytes\."
141gdb_test "help dump srec" "Write target code/data to an srec file\.\[\r\n\]+List of dump srec subcommands:.*"
142gdb_test "help dump tekhex" "Write target code/data to a tekhex file\.\[\r\n\]+List of dump tekhex subcommands:.*"
143gdb_test "help dump value" "Write the value of an expression to a raw binary file\.\[\r\n\]+Arguments are FILE EXPRESSION\. Writes the value of EXPRESSION to\[\r\n\]+the specified FILE in raw target ordered bytes\."
144gdb_test "help dump binary memory" "Write contents of memory to a raw binary file\.\[\r\n\]+Arguments are FILE START STOP\. Writes the contents of memory\[\r\n\]+within the range \\\[START \.\. STOP\\) to the specifed FILE in binary format\."
145gdb_test "help dump binary value" "Write the value of an expression to a raw binary file\.\[\r\n\]+Arguments are FILE EXPRESSION\. Writes the value of EXPRESSION\[\r\n\]+to the specified FILE in raw target ordered bytes\." "help dump binary value"
146gdb_test "help dump ihex memory" "Write contents of memory to an ihex file\.\[\r\n\]+Arguments are FILE START STOP\. Writes the contents of memory within\[\r\n\]+the range \\\[START \.\. STOP\\) to the specifed FILE in intel hex format\."
147gdb_test "help dump ihex value" "Write the value of an expression to an ihex file\.\[\r\n\]+Arguments are FILE EXPRESSION\. Writes the value of EXPRESSION\[\r\n\]+to the specified FILE in intel hex format\."
148gdb_test "help dump srec memory" "Write contents of memory to an srec file\.\[\r\n\]+Arguments are FILE START STOP\. Writes the contents of memory\[\r\n\]+within the range \\\[START \.\. STOP\\) to the specifed FILE in srec format\."
149gdb_test "help dump srec value" "Write the value of an expression to an srec file\.\[\r\n\]+Arguments are FILE EXPRESSION\. Writes the value of EXPRESSION\[\r\n\]+to the specified FILE in srec format\."
150gdb_test "help dump tekhex memory" "Write contents of memory to a tekhex file\.\[\r\n\]+Arguments are FILE START STOP\. Writes the contents of memory\[\r\n\]+within the range \\\[START \.\. STOP\\) to the specifed FILE in tekhex format\."
151gdb_test "help dump tekhex value" "Write the value of an expression to a tekhex file\.\[\r\n\]+Arguments are FILE EXPRESSION\. Writes the value of EXPRESSION\[\r\n\]+to the specified FILE in tekhex format\."
c906108c
SS
152# this command was removed from GDB 4.5.8
153# test help dump-me
154#send_gdb "help dump-me"
523ac3f9 155# -re "Get fatal error; make debugger dump its core\."
c906108c
SS
156#
157# }
158# test help echo
523ac3f9 159gdb_test "help echo" "Print a constant string\. Give string as argument\.\[\r\n\]+C escape sequences may be used in the argument\.\[\r\n\]+No newline is added at the end of the argument;\[\r\n\]+use \"\\\\n\" if you want a newline to be printed\.\[\r\n\]+Since leading and trailing whitespace are ignored in command arguments,\[\r\n\]+if you want to print some you must use \"\\\\\" before leading whitespace\[\r\n\]+to be printed or after trailing whitespace\." "help echo"
c906108c 160# test help enable breakpoints delete
523ac3f9 161gdb_test "help enable breakpoints 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 breakpoints delete"
c906108c 162# test help enable breakpoints once
523ac3f9 163gdb_test "help enable breakpoints once" "Enable breakpoints for one hit.*" "help enable breakpoints once"
c906108c 164# test help enable breakpoints
a38cd180
VP
165test_prefix_command_help {"enable breakpoints"} {
166 "Enable some breakpoints\.\[\r\n\]+"
167 "Give breakpoint numbers \\(separated by spaces\\) as arguments\.\[\r\n\]+"
168 "This is used to cancel the effect of the \"disable\" command\.\[\r\n\]+"
169 "May be abbreviated to simply \"enable\"\.\[\r\n\]+"
170}
c906108c 171# test help enable delete
523ac3f9 172gdb_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"
c906108c 173# test help enable display
523ac3f9 174gdb_test "help enable display" "Enable some expressions to be displayed when program stops\.\[\r\n\]+Arguments are the code numbers of the expressions to resume displaying\.\[\r\n\]+No argument means enable all automatic-display expressions\.\[\r\n\]+Do \"info display\" to see current list of code numbers\." "help enable display"
c906108c 175# test help enable once
523ac3f9 176gdb_test "help enable once" "Enable breakpoints for one hit.*" "help enable once"
c906108c 177# test help enable
a38cd180
VP
178test_prefix_command_help "enable" {
179 "Enable some breakpoints\.\[\r\n\]+"
180 "Give breakpoint numbers \\(separated by spaces\\) as arguments\.\[\r\n\]+"
181 "With no subcommand, breakpoints are enabled until you command otherwise.\.\[\r\n\]+"
182 "This is used to cancel the effect of the \"disable\" command\.\[\r\n\]+"
183 "With a subcommand you can enable temporarily\.\[\r\n\]+"
184}
c906108c 185# test help exec-file
523ac3f9 186gdb_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"
c906108c 187# test help frame "f" abbreviation
523ac3f9 188gdb_test "help f" "Select and print a stack frame\.\[\r\n\]+With no argument, print the selected stack frame\. \\(See also \"info frame\"\\)\.\[\r\n\]+An argument specifies the frame to select\.\[\r\n\]+It can be a stack frame number or the address of the frame\.\[\r\n\]+With argument, nothing is printed if input is coming from\[\r\n\]+a command file or a user-defined command\." "help frame \"f\" abbreviation"
c906108c 189# test help frame
523ac3f9 190gdb_test "help frame" "Select and print a stack frame\.\[\r\n\]+With no argument, print the selected stack frame\. \\(See also \"info frame\"\\)\.\[\r\n\]+An argument specifies the frame to select\.\[\r\n\]+It can be a stack frame number or the address of the frame\.\[\r\n\]+With argument, nothing is printed if input is coming from\[\r\n\]+a command file or a user-defined command\." "help frame"
c906108c 191# test help fg
523ac3f9 192gdb_test "help fg" "Continue program being debugged.*" "help fg"
c906108c 193# test help file
523ac3f9 194gdb_test "help file" "Use FILE as program to be debugged\.\[\r\n\]+It is read for its symbols, for getting the contents of pure memory,\[\r\n\]+and it is the program executed when you use the `run' command\.\[\r\n\]+If FILE cannot be found as specified, your execution directory path\[\r\n\]+\\(\\\$PATH\\) is searched for a command of that name\.\[\r\n\]+No arg means to have no executable file and no symbols\." "help file"
c906108c
SS
195# test help files
196gdb_test "help files" "Specifying.*" "help files"
197# test help finish
523ac3f9 198gdb_test "help finish" "Execute until selected stack frame returns\.\[\r\n\]+Upon return, the value returned is printed and put in the value history\." "help finish"
c906108c 199# test help forward-search
523ac3f9 200gdb_test "help forward-search" "Search for regular expression \\(see regex\\(3\\)\\) from last line listed.*" "help forward-search"
d43e73ee 201# test help gcore
a76e022a 202gdb_test_multiple "help gcore" "help gcore" {
523ac3f9 203 -re "Undefined command: \"gcore\"\. Try \"help\".*$gdb_prompt $" {
d43e73ee
MS
204 pass "help gcore"
205 }
523ac3f9 206 -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 $" {
d43e73ee
MS
207 pass "help gcore"
208 }
d43e73ee 209}
a76e022a 210gdb_test_multiple "help generate-core-file" "help generate-core-file" {
523ac3f9 211 -re "Undefined command: \"generate-core-file\"\. Try \"help\".*$gdb_prompt $" {
d43e73ee
MS
212 pass "help gcore"
213 }
523ac3f9 214 -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 $" {
d43e73ee
MS
215 pass "help gcore"
216 }
d43e73ee 217}
c906108c 218# test help help "h" abbreviation
523ac3f9 219gdb_test "help h" "Print list of commands\." "help help \"h\" abbreviation"
c906108c 220# test help help
523ac3f9 221gdb_test "help help" "Print list of commands\." "help help"
c906108c 222# test help handle
523ac3f9 223gdb_test "help handle" "Specify how to handle a signal\..*" "help handle"
c906108c 224# test help info "i" abbreviation
a38cd180
VP
225test_prefix_command_help {"i" "info"} {
226 "Generic command for showing things about the program being debugged\.\[\r\n\]+"
227} "help info \"i\" abbreviation"
c906108c 228# test help info
a38cd180
VP
229test_prefix_command_help "info" {
230 "Generic command for showing things about the program being debugged\.\[\r\n\]+"
231}
c906108c 232# test help ignore
523ac3f9 233gdb_test "help ignore" "Set ignore-count of breakpoint number N to COUNT\.\[\r\n\]+Usage is `ignore N COUNT'\." "help ignore"
c906108c 234# test help info address
523ac3f9 235gdb_test "help info address" "Describe where symbol SYM is stored\." "help info address"
c906108c 236# test help info all-registers
523ac3f9 237gdb_test "help info all-registers" "List of all registers and their contents, for selected stack frame\.\[\r\n\]+Register name as argument means describe only that register\." "help info all-registers"
c906108c 238# test help info args
523ac3f9 239gdb_test "help info args" "Argument variables of current stack frame\." "help info args"
c906108c 240# test help info breakpoints
523ac3f9 241gdb_test "help info breakpoints" "Status of user-settable breakpoints, or breakpoint number NUMBER\..*\[\r\n\]+breakpoint set\." "help info breakpoints"
c906108c 242# test help info catch
523ac3f9 243gdb_test "help info catch" "Exceptions that can be caught in the current stack frame\." "help info catch"
c906108c 244# test help info copying
523ac3f9 245gdb_test "help info copying" "Conditions for redistributing copies of GDB\." "help info copying"
c906108c 246# test help info display
523ac3f9 247gdb_test "help info display" "Expressions to display when program stops, with code numbers\." "help info display"
c906108c 248# test help info frame "f" abbreviation
523ac3f9 249gdb_test "help info f" "All about selected stack frame, or frame at ADDR\." "help info frame \"f\" abbreviation"
c906108c 250# test help info frame
523ac3f9 251gdb_test "help info frame" "All about selected stack frame, or frame at ADDR\." "help info frame"
c906108c 252# test help info files
523ac3f9 253gdb_test "help info files" "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 files"
c906108c 254# test help info float
523ac3f9 255gdb_test "help info float" "Print the status of the floating point unit" "help info float"
c906108c 256# test help info functions
523ac3f9 257gdb_test "help info functions" "All function names, or those matching REGEXP\." "help info functions"
c906108c 258# test help info line
523ac3f9 259gdb_test "help info line" "Core addresses of the code for a source line\.\[\r\n\]+Line can be specified as\[\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\]+Default is to describe the last source line that was listed\.\[\r\n\]+This sets the default address for \"x\" to the line's first instruction\[\r\n\]+so that \"x/i\" suffices to start examining the machine code\.\[\r\n\]+The address is also stored as the value of \"\\\$_\"\." "help info line"
c906108c 260# test help info locals
523ac3f9 261gdb_test "help info locals" "Local variables of current stack frame\." "help info locals"
c906108c 262# test help info program
523ac3f9 263gdb_test "help info program" "Execution status of the program\." "help info program"
c906108c 264# test help info registers
523ac3f9 265gdb_test "help info registers" "List of integer registers and their contents, for selected stack frame\.\[\r\n\]+Register name as argument means describe only that register\." "help info registers"
c906108c 266# test help info stack "s" abbreviation
523ac3f9 267gdb_test "help info s" "Backtrace of the stack, or innermost COUNT frames\." "help info stack \"s\" abbreviation"
c906108c 268# test help info stack
523ac3f9 269gdb_test "help info stack" "Backtrace of the stack, or innermost COUNT frames\." "help info stack"
c906108c 270# test help info set
523ac3f9 271gdb_test "help info set" "Show all GDB settings\." "help info set"
c906108c 272# test help info signals
523ac3f9 273gdb_test "help info signals" "What debugger does when program gets various signals.*" "help info signals"
c906108c 274# test help info source
523ac3f9 275gdb_test "help info source" "Information about the current source file\." "help info source"
c906108c 276# test help info sources
523ac3f9 277gdb_test "help info sources" "Source files in the program\." "help info sources"
c906108c
SS
278# test help info symbol
279gdb_test "help info symbol" "Describe what symbol is at location ADDR.*"
280# test help info target
523ac3f9 281gdb_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"
c906108c 282# test help info terminal
523ac3f9 283gdb_test "help info terminal" "Print inferior's saved terminal status\." "help info terminal"
c906108c 284# test help info types
523ac3f9 285gdb_test "help info types" "All type names, or those matching REGEXP\." "help info types"
c906108c 286# test help info variables
523ac3f9 287gdb_test "help info variables" "All global and static variable names, or those matching REGEXP\." "help info variables"
c906108c 288# test help info warranty
523ac3f9 289gdb_test "help info warranty" "Various kinds of warranty you do not have\." "help info warranty"
c906108c 290# test help info watchpoints
d77f58be 291gdb_test "help info watchpoints" "Status of watchpoints, or watchpoint number NUMBER\." "help info watchpoints"
c906108c 292# test help inspect
523ac3f9 293gdb_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"
c906108c 294# test help jump
523ac3f9 295gdb_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"
c906108c 296# test help kill
2277426b
PA
297test_prefix_command_help "kill" {
298 "Kill execution of program being debugged\.\[\r\n\]+"
299}
c906108c 300# test help list "l" abbreviation
523ac3f9 301gdb_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"
c906108c 302# test help list
523ac3f9 303gdb_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"
c906108c 304# test help load
1986bccd 305gdb_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"
c906108c 306# test help make
523ac3f9 307gdb_test "help make" "Run the ``make'' program using the rest of the line as arguments\." "help make"
c906108c 308# test help next "n" abbreviation
523ac3f9 309gdb_test "help n" "Step program, proceeding through subroutine calls\.\[\r\n\]+Like the \"step\" command as long as subroutine calls do not happen;\[\r\n\]+when they do, the call is treated as one instruction\.\[\r\n\]+Argument N means do this N times \\(or till program stops for another reason\\)\." "help next \"n\" abbreviation"
c906108c 310# test help next
523ac3f9 311gdb_test "help next" "Step program, proceeding through subroutine calls\.\[\r\n\]+Like the \"step\" command as long as subroutine calls do not happen;\[\r\n\]+when they do, the call is treated as one instruction\.\[\r\n\]+Argument N means do this N times \\(or till program stops for another reason\\)\." "help next"
c906108c 312# test help nexti
523ac3f9 313gdb_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"
c906108c
SS
314# all the commands that used to be here are now in "maintainance" instead
315# test help obscure
a38cd180
VP
316test_class_help "obscure" {
317 "Obscure features\.\[\r\n\]+"
318}
c906108c 319# test help output
523ac3f9 320gdb_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"
c906108c
SS
321# test help overlay
322gdb_test "help overlay" "Commands for debugging overlays.*"
523ac3f9
MS
323gdb_test "help overlay off" "Disable overlay debugging\."
324gdb_test "help overlay manual" "Enable overlay debugging\."
325gdb_test "help overlay auto" "Enable automatic overlay debugging\."
326gdb_test "help overlay list" "List mappings of overlay sections\."
327gdb_test "help overlay map" "Assert that an overlay section is mapped\."
328gdb_test "help overlay unmap" "Assert that an overlay section is unmapped\."
329gdb_test "help overlay load" "Read the overlay mapping state from the target\."
c906108c 330# test help print "p" abbreviation
523ac3f9 331gdb_test "help p" "Print value of expression EXP\.\[\r\n\]+Variables accessible are those of the lexical environment of the selected.*\[\r\n\]+EXP may be preceded with /FMT, where FMT is a format letter\[\r\n\]+but no count or size letter \\(see \"x\" command\\)\." "help print \"p\" abbreviation"
c906108c 332# test help print
523ac3f9 333gdb_test "help print" "Print value of expression EXP\.\[\r\n\]+Variables accessible are those of the lexical environment of the selected.*\[\r\n\]+EXP may be preceded with /FMT, where FMT is a format letter\[\r\n\]+but no count or size letter \\(see \"x\" command\\)\." "help print"
c906108c 334# test help path
523ac3f9 335gdb_test "help path" "Add directory DIR\\(s\\) to beginning of search path for 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 path"
c906108c 336# test help printcmds
523ac3f9 337gdb_test "help printcmds" "Undefined command: \"printcmds\"\. Try \"help\"\." "help printcmds"
c906108c 338# test help printf
523ac3f9 339gdb_test "help printf" "printf \"printf format string\", arg1, arg2, arg3, \.\.\., argn\[\r\n\]+This is useful for formatted output in user-defined commands\." "help printf"
c906108c 340# test help ptype
523ac3f9 341gdb_test "help ptype" "Print definition of type.*" "help ptype"
c906108c 342# test help pwd
523ac3f9 343gdb_test "help pwd" "Print working directory\. This is used for your program as well\." "help pwd"
c906108c 344# test help quit "q" abbreviation
523ac3f9 345gdb_test "help q" "Exit gdb\." "help quit \"q\" abbreviation"
c906108c 346# test help quit
523ac3f9 347gdb_test "help quit" "Exit gdb\." "help quit"
c906108c 348# test help run "r" abbreviation
523ac3f9 349gdb_test "help r" "Start debugged program\. You may specify arguments to give it\.\[\r\n\]+Args may include \"\\*\", or \"\\\[\.\.\.\\\]\"; they are expanded using \"sh\"\.\[\r\n\]+Input and output redirection with \">\", \"<\", or \">>\" are also allowed\.\[\r\n\]+With no arguments, uses arguments last specified \\(with \"run\" or \"set args\"\\)\.\[\r\n\]+To cancel previous arguments and run with no arguments,\[\r\n\]+use \"set args\" without arguments\." "help run \"r\" abbreviation"
c906108c 350# test help run
523ac3f9 351gdb_test "help run" "Start debugged program\. You may specify arguments to give it\.\[\r\n\]+Args may include \"\\*\", or \"\\\[\.\.\.\\\]\"; they are expanded using \"sh\"\.\[\r\n\]+Input and output redirection with \">\", \"<\", or \">>\" are also allowed\.\[\r\n\]+With no arguments, uses arguments last specified \\(with \"run\" or \"set args\"\\)\.\[\r\n\]+To cancel previous arguments and run with no arguments,\[\r\n\]+use \"set args\" without arguments\." "help run"
c906108c 352# test help rbreak
523ac3f9 353gdb_test "help rbreak" "Set a breakpoint for all functions matching REGEXP\." "help rbreak"
dd7dfd64
MS
354# test help restore
355gdb_test "help restore" "Restore the contents of FILE to target memory\.\[\r\n\]+Arguments are FILE OFFSET START END where all except FILE are optional\.\[\r\n\]+OFFSET will be added to the base address of the file \\(default zero\\)\.\[\r\n\]+If START and END are given, only the file contents within that range\[\r\n\]+\\(file relative\\) will be restored to target memory\."
c906108c 356# test help return
523ac3f9 357gdb_test "help return" "Make selected stack frame return to its caller\.\[\r\n\]+Control remains in the debugger, but when you continue\[\r\n\]+execution will resume in the frame above the one now selected\.\[\r\n\]+If an argument is given, it is an expression for the value to return\." "help return"
c906108c 358# test help reverse-search
523ac3f9 359gdb_test "help reverse-search" "Search backward for regular expression \\(see regex\\(3\\)\\) from last line listed\..*" "help reverse-search"
c906108c 360# test help running
a38cd180
VP
361test_class_help "running" {
362 "Running the program\.\[\r\n\]+"
363}
c906108c 364# test help step "s" abbreviation
523ac3f9 365gdb_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"
c906108c 366# test help step
523ac3f9 367gdb_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 #1"
c906108c 368# test help search
523ac3f9 369gdb_test "help search" "Search for regular expression \\(see regex\\(3\\)\\) from last line listed\..*" "help search"
c906108c 370# test help section
523ac3f9 371gdb_test "help section" "Change the base address of section SECTION of the exec file to ADDR\.\[\r\n\]+This can be used if the exec file does not contain section addresses,\[\r\n\]+\\(such as in the a\.out format\\), or when the addresses specified in the\[\r\n\]+file itself are wrong\. Each section must be changed separately\. The\[\r\n\]+``info files'' command lists all the sections and their addresses\." "help section"
c906108c 372#test help set annotate
523ac3f9 373gdb_test "help set annotate" "Set annotation_level\.\[\r\n\]+0 == normal; 1 == fullname \\(for use when running under emacs\\)\[\r\n\]+2 == output annotated suitably for use by programs that control GDB\." "help set annotate"
c906108c 374# test help set args
523ac3f9 375gdb_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\."
c906108c 376# test help set check "c" abbreviation
a38cd180
VP
377test_prefix_command_help {"set c" "set check"} {
378 "Set the status of the type/range checker\.\[\r\n\]+"
379} "help set check \"c\" abbreviation"
c906108c 380# test help set check "ch" abbreviation
a38cd180
VP
381test_prefix_command_help {"set ch" "set check"} {
382 "Set the status of the type/range checker\.\[\r\n\]+"
383} "help set check \"ch\" abbreviation"
c906108c 384# test help set check
a38cd180
VP
385test_prefix_command_help {"set check"} {
386 "Set the status of the type/range checker\.\[\r\n\]+"
387}
c906108c 388# test help set check range
523ac3f9 389gdb_test "help set check range" "Set range checking\. \\(on/warn/off/auto\\)" "help set check range"
c906108c 390# test help set check type
523ac3f9 391gdb_test "help set check type" "Set type checking\. \\(on/warn/off/auto\\)." "help set check type"
c906108c 392# test help set complaints
523ac3f9 393gdb_test "help set complaints" "Set max number of complaints about incorrect symbols\." "help set complaints"
c906108c 394# test help set confirm
523ac3f9 395gdb_test "help set confirm" "Set whether to confirm potentially dangerous operations\." "help set confirm"
c906108c 396# test help set editing
523ac3f9 397gdb_test "help set editing" "Set 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 set editing"
c906108c 398# test help set environment
523ac3f9 399gdb_test "help set environment" "Set environment variable value to give the program\.\[\r\n\]+Arguments are VAR VALUE where VAR is variable name and VALUE is value\.\[\r\n\]+VALUES of environment variables are uninterpreted strings\.\[\r\n\]+This does not affect the program until the next \"run\" command\." "help set environment"
c906108c 400# test help set height
523ac3f9 401gdb_test "help set height" "Set number of lines gdb thinks are in a page\." "help set height"
c906108c 402# test help set history expansion
523ac3f9 403gdb_test "help set history expansion" "Set history expansion on command input\.\[\r\n\]+Without an argument, history expansion is enabled\." "help set history expansion"
c906108c 404# test help set history filename
dd7dfd64 405gdb_test "help set history filename" "Set the filename in which to record the command history\[\r\n\]+\\(the list of previous commands of which a record is kept\\)\." "help set history filename"
c906108c 406# test help set history save
523ac3f9 407gdb_test "help set history save" "Set saving of the history record on exit\.\[\r\n\]+Use \"on\" to enable the saving, and \"off\" to disable it\.\[\r\n\]+Without an argument, saving is enabled\." "help set history save"
c906108c 408# test help set history size
48b2f8d7 409gdb_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"
c906108c 410# test help set history
a38cd180
VP
411test_prefix_command_help {"set history"} {
412 "Generic command for setting command history parameters\.\[\r\n\]+"
413}
c906108c 414# test help set language
b84aa90a
PA
415gdb_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"
416
c906108c 417# test help set listsize
523ac3f9 418gdb_test "help set listsize" "Set number of source lines gdb will list by default\." "help set listsize"
c906108c
SS
419# test help set print "p" abbreviation
420# FIXME -- Ultrix hangs randomly on this very long output from gdb and
421# continues with its output only if something is sent to gdb.
422# Also, if the system is slow, it may time out because the output is large.
a38cd180
VP
423test_prefix_command_help {"set p" "set print"} {
424 "Generic command for setting how things print\.\[\r\n\]+"
425} "help set print \"p\" abbreviation"
c906108c 426# test help set print "pr" abbreviation
a38cd180
VP
427test_prefix_command_help {"set pr" "set print"} {
428 "Generic command for setting how things print\.\[\r\n\]+"
429} "help set print \"pr\" abbreviation"
c906108c 430# test help set print
a38cd180
VP
431test_prefix_command_help {"set print"} {
432 "Generic command for setting how things print\.\[\r\n\]+"
433}
c906108c 434# test help set print address
523ac3f9 435gdb_test "help set print address" "Set printing of addresses\." "help set print address"
c906108c 436# test help set print array
523ac3f9 437gdb_test "help set print array" "Set prettyprinting of arrays\." "help set print array"
c906108c 438# test help set print asm-demangle
5e2fe5b8 439gdb_test "help set print asm-demangle" "Set demangling of C\[+\]+/ObjC names in disassembly listings\." "help set print asm-demangle"
c906108c 440# test help set print demangle
5e2fe5b8 441gdb_test "help set print demangle" "Set demangling of encoded C\[+\]+/ObjC names when displaying symbols\." "help set print demangle"
c906108c 442# test help set print elements
523ac3f9 443gdb_test "help set print elements" "Set limit on string chars or array elements to print\.\[\r\n\]+\"set print elements 0\" causes there to be no limit\." "help set print elements"
c906108c 444# test help set print object
523ac3f9 445gdb_test "help set print object" "Set printing of object's derived type based on vtable info\." "help set print object"
c906108c 446# test help set print pretty
523ac3f9 447gdb_test "help set print pretty" "Set prettyprinting of structures\." "help set print pretty"
c906108c 448# test help set print sevenbit-strings
523ac3f9 449gdb_test "help set print sevenbit-strings" "Set printing of 8-bit characters in strings as \\\\nnn\." "help set print sevenbit-strings"
c906108c 450# test help set print union
523ac3f9 451gdb_test "help set print union" "Set printing of unions interior to structures\." "help set print union"
c906108c 452# test help set print vtbl
523ac3f9 453gdb_test "help set print vtbl" "Set printing of C\[+\]+ virtual function tables\." "help set print vtbl"
c906108c 454# test help set prompt
523ac3f9 455gdb_test "help set prompt" "Set gdb's prompt" "help set prompt"
c906108c 456# test help set radix
523ac3f9 457gdb_test "help set radix" "Set default input and output number radices\.\[\r\n\]+Use \'set input-radix\' or \'set output-radix\' to independently set each\.\[\r\n\]+Without an argument, sets both radices back to the default value of 10\." "help set radix"
c906108c 458# test help set symbol-reloading
523ac3f9 459gdb_test "help set symbol-reloading" "Set dynamic symbol table reloading multiple times in one run\." "help set symbol-reloading"
c906108c 460# test help set variable
523ac3f9 461gdb_test "help set variable" "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\]+This may usually be abbreviated to simply \"set\"\." "help set variable"
c906108c 462# test help set verbose
523ac3f9 463gdb_test "help set verbose" "Set verbosity\." "help set verbose"
c906108c 464#test help set width
523ac3f9 465gdb_test "help set width" "Set number of characters gdb thinks are in a line\." "help set width"
c906108c
SS
466# test help set write
467# This is only supported on targets which use exec.o.
523ac3f9 468gdb_test "help set write" "Set writing into executable and core files\." "help set write"
c906108c
SS
469# test help set
470# FIXME -- Ultrix hangs randomly on this very long output from gdb and
471# continues with its output only if something is sent to gdb.
472# Also, if the system is slow, it may time out because the output is large.
a38cd180
VP
473test_prefix_command_help "set" {
474 "Evaluate expression EXP and assign result to variable VAR, using assignment\[\r\n\]+"
475 "syntax appropriate for the current language \\(VAR = EXP or VAR := EXP for\[\r\n\]+"
476 "example\\)\. VAR may be a debugger \"convenience\" variable \\(names starting\[\r\n\]+"
477 "with \\\$\\), a register \\(a few standard names starting with \\\$\\), or an actual\[\r\n\]+"
478 "variable in the program being debugged\. EXP is any valid expression.*\[\r\n\]+"
479 "Use \"set variable\" for variables with names identical to set subcommands\.\[\r\n\]+"
480 "With a subcommand, this command modifies parts of the gdb environment\.\[\r\n\]+"
481 "You can see these environment settings with the \"show\" command\.\[\r\n\]+"
482}
c906108c 483# test help shell
48b2f8d7 484gdb_test "help shell" "Execute the rest of the line as a shell command\.\[\r\n\]+With no arguments, run an inferior shell\." "help shell"
c906108c 485#test help show annotate
523ac3f9 486gdb_test "help show annotate" "Show annotation_level\.\[\r\n\]+0 == normal; 1 == fullname \\(for use when running under emacs\\)\[\r\n\]+2 == output annotated suitably for use by programs that control GDB\." "help show annotate"
c906108c 487# test help show args
523ac3f9 488gdb_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\."
c906108c 489# test help show check "c" abbreviation
a38cd180
VP
490test_prefix_command_help {"show c" "show check"} {
491 "Show the status of the type/range checker\.\[\r\n\]+"
492} "help show check \"c\" abbreviation"
c906108c 493# test help show check
a38cd180
VP
494test_prefix_command_help {"show check"} {
495 "Show the status of the type/range checker\.\[\r\n\]+"
496}
c906108c 497# test help show check range
523ac3f9 498gdb_test "help show check range" "Show range checking\. \\(on/warn/off/auto\\)" "help show check range"
c906108c 499# test help show check type
523ac3f9 500gdb_test "help show check type" "Show type checking\. \\(on/warn/off/auto\\)" "help show check type"
c906108c 501# test help show commands
523ac3f9 502gdb_test "help show commands" "Show the history of commands you typed\.\[\r\n\]+You can supply a command number to start with, or a `\[+\]' to start after\[\r\n\]+the previous command number shown\." "help show commands"
c906108c 503# test help show complaints
523ac3f9 504gdb_test "help show complaints" "Show max number of complaints about incorrect symbols\." "help show complaints"
c906108c 505# test help show confirm
523ac3f9 506gdb_test "help show confirm" "Show whether to confirm potentially dangerous operations\." "help show confirm"
c906108c 507# test help show convenience
523ac3f9 508gdb_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"
c906108c 509# test help show directories
523ac3f9 510gdb_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"
c906108c 511# test help show editing
523ac3f9 512gdb_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"
c906108c 513# test help show environment
523ac3f9 514gdb_test "help show environment" "The environment to give the program, or one variable's value\.\[\r\n\]+With an argument VAR, prints the value of environment variable VAR to\[\r\n\]+give the program being debugged\. With no arguments, prints the entire\[\r\n\]+environment to be given to the program\." "help show environment"
c906108c 515# test help show height
523ac3f9 516gdb_test "help show height" "Show number of lines gdb thinks are in a page\." "help show height"
c906108c 517# test help show history expansion
523ac3f9 518gdb_test "help show history expansion" "Show history expansion on command input\.\[\r\n\]+Without an argument, history expansion is enabled\." "help show history expansion"
c906108c 519# test help show history filename
48b2f8d7 520gdb_test "help show history filename" "Show the filename in which to record the command history\[\r\n\]+\\(the list of previous commands of which a record is kept\\)\." "help show history filename"
c906108c 521# test help show history save
523ac3f9 522gdb_test "help show history save" "Show saving of the history record on exit\.\[\r\n\]+Use \"on\" to enable the saving, and \"off\" to disable it\.\[\r\n\]+Without an argument, saving is enabled\." "help show history save"
c906108c 523# test help show history size
dd7dfd64 524gdb_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"
c906108c 525# test help show history
a38cd180
VP
526test_prefix_command_help {"show history"} {
527 "Generic command for showing command history parameters\.\[\r\n\]+"
528}
c906108c 529# test help show language
523ac3f9 530gdb_test "help show language" "Show the current source language\." "help show language"
c906108c 531# test help show listsize
523ac3f9 532gdb_test "help show listsize" "Show number of source lines gdb will list by default\." "help show listsize"
c906108c 533# test help show print "p" abbreviation
a38cd180
VP
534test_prefix_command_help {"show p" "show print"} {
535 "Generic command for showing print settings\.\[\r\n\]+"
536} "help show print \"p\" abbreviation"
c906108c 537# test help show print "pr" abbreviation
a38cd180
VP
538test_prefix_command_help {"show pr" "show print"} {
539 "Generic command for showing print settings\.\[\r\n\]+"
540} "help show print \"pr\" abbreviation"
c906108c 541# test help show print
a38cd180
VP
542test_prefix_command_help {"show print"} {
543 "Generic command for showing print settings\.\[\r\n\]+"
544} "help show print \"p\" abbreviation"
c906108c 545# test help show paths
523ac3f9 546gdb_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"
c906108c 547# test help show print address
523ac3f9 548gdb_test "help show print address" "Show printing of addresses\." "help show print address"
c906108c 549# test help show print array
523ac3f9 550gdb_test "help show print array" "Show prettyprinting of arrays\." "help show print array"
c906108c 551# test help show print asm-demangle
5e2fe5b8 552gdb_test "help show print asm-demangle" "Show demangling of C\[+\]+/ObjC names in disassembly listings\." "help show print asm-demangle"
c906108c 553# test help show print demangle
5e2fe5b8 554gdb_test "help show print demangle" "Show demangling of encoded C\[+\]+/ObjC names when displaying symbols\." "help show print demangle"
c906108c 555# test help show print elements
523ac3f9 556gdb_test "help show print elements" "Show limit on string chars or array elements to print\.\[\r\n\]+\"set print elements 0\" causes there to be no limit\." "help show print elements"
c906108c 557# test help show print object
523ac3f9 558gdb_test "help show print object" "Show printing of object's derived type based on vtable info\." "help show print object"
c906108c 559# test help show print pretty
523ac3f9 560gdb_test "help show print pretty" "Show prettyprinting of structures\." "help show print pretty"
c906108c 561# test help show print sevenbit-strings
523ac3f9 562gdb_test "help show print sevenbit-strings" "Show printing of 8-bit characters in strings as \\\\nnn\." "help show print sevenbit-strings"
c906108c 563# test help show print union
523ac3f9 564gdb_test "help show print union" "Show printing of unions interior to structures\." "help show print union"
c906108c 565# test help show print vtbl
523ac3f9 566gdb_test "help show print vtbl" "Show printing of C\[+\]+ virtual function tables\." "help show print vtbl"
c906108c 567# test help show prompt
523ac3f9 568gdb_test "help show prompt" "Show gdb's prompt" "help show prompt"
c906108c 569# test help show radix
523ac3f9 570gdb_test "help show radix" "Show the default input and output number radices\.\[\r\n\]+Use \'show input-radix\' or \'show output-radix\' to independently show each\." "help show radix"
c906108c 571# test help show symbol-reloading
523ac3f9 572gdb_test "help show symbol-reloading" "Show dynamic symbol table reloading multiple times in one run\." "help show symbol-reloading"
c906108c 573# test help show user
523ac3f9 574gdb_test "help show user" "Show definitions of user defined commands\.\[\r\n\]+Argument is the name of the user defined command\.\[\r\n\]+With no argument, show definitions of all user defined commands\." "help show user"
c906108c 575# test help show values
523ac3f9 576gdb_test "help show values" "Elements of value history around item number IDX \\(or last ten\\)\." "help show values"
c906108c 577# test help show verbose
523ac3f9 578gdb_test "help show verbose" "Show verbosity\." "help show verbose"
c906108c 579# test help show version
523ac3f9 580gdb_test "help show version" "Show what version of GDB this is\." "help show version"
c906108c 581# test help show width
523ac3f9 582gdb_test "help show width" "Show number of characters gdb thinks are in a line\." "help show width"
c906108c
SS
583# test help show write
584# This is only supported on targets which use exec.o.
523ac3f9 585gdb_test "help show write" "Show writing into executable and core files\." "help show write"
c906108c
SS
586# test help show
587# FIXME -- Ultrix hangs randomly on this very long output from gdb and
588# continues with its output only if something is sent to gdb.
589# Also, if the system is slow, it may time out because the output is large.
a38cd180
VP
590test_prefix_command_help "show" {
591 "Generic command for showing things about the debugger\.\[\r\n\]+"
592}
c906108c 593# test help step
523ac3f9 594gdb_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"
c906108c 595# test help stepi "si" abbreviation
523ac3f9 596gdb_test "help si" "Step one instruction exactly\.\[\r\n\]+Argument N means do this N times \\(or till program stops for another reason\\)\." "help stepi \"si\" abbreviation"
c906108c 597# test help stepi
523ac3f9 598gdb_test "help stepi" "Step one instruction exactly\.\[\r\n\]+Argument N means do this N times \\(or till program stops for another reason\\)\." "help stepi"
c906108c 599# test help signal
523ac3f9 600gdb_test "help signal" "Continue program giving it signal.*" "help signal"
c906108c
SS
601# test help source
602# vxgdb reads .vxgdbinit
3436961f
DE
603# ".-s. .-v." is written that way to avoid the complications of trying
604# to get "[-s] [-v]" through expect and tcl.
605gdb_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"
c906108c 606# test help stack
a38cd180
VP
607test_class_help "stack" {
608 "Examining the stack\..*\[\r\n\]+"
609 "When the program being debugged stops, gdb selects the innermost frame\.\[\r\n\]+"
610 "The commands below can be used to select other frames by number or address\.\[\r\n\]+"
611}
c906108c 612# test help status
a38cd180
VP
613test_class_help "status" {
614 "Status inquiries\.\[\r\n\]+"
615}
96b3d632 616
c906108c
SS
617# test help support
618# FIXME -- Ultrix hangs randomly on this very long output from gdb and
619# continues with its output only if something is sent to gdb.
620# Also, if the system is slow, it may time out because the output is large.
a38cd180
VP
621test_class_help "support" {
622 "Support facilities\.\[\r\n\]+"
623}
c906108c 624# test help symbol-file
523ac3f9 625gdb_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"
c906108c 626# test help target child
8a2dbca8 627gdb_test "help target child" "(Unix|Win32) child process \\(started by the \"run\" command\\)\.|Undefined target command: \"child\"\. Try \"help target\"\." "help target child"
c906108c 628# test help target procfs
523ac3f9 629gdb_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)"
c906108c 630# test help target core
523ac3f9 631gdb_test "help target core" "Use a core file as a target\. Specify the filename of the core file\.|(Undefined target command: \"core\"\. Try \"help target\"\.)" "help target core"
c906108c 632# test help target exec
523ac3f9 633gdb_test "help target exec" "Use an executable file as a target\.\[\r\n\]+Specify the filename of the executable file\." "help target exec"
c906108c 634# test help target remote
523ac3f9 635gdb_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"
c906108c
SS
636# test help target
637# the child process target may be "target child" or "target procfs"
a38cd180
VP
638test_prefix_command_help "target" {
639 "Connect to a target machine or process\.\[\r\n\]+"
640 "The first argument is the type or protocol of the target machine\.\[\r\n\]+"
641 "Remaining arguments are interpreted by the target protocol\. For more\[\r\n\]+"
642 "information on the arguments for a particular protocol, type\[\r\n\]+"
643 "`help target ' followed by the protocol name\.\[\r\n\]+"
644}
c906108c 645# test help tbreak
523ac3f9 646gdb_test "help tbreak" "Set a temporary breakpoint.*" "help tbreak"
c906108c 647# test help tty
1323e929 648gdb_test "help tty" "Set terminal for future runs of program being debugged\.\[\r\n\]+Usage: set inferior-tty /dev/pts/1" "help tty"
c906108c 649# test help until "u" abbreviation
0fbc361c 650gdb_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"
c906108c 651# test help until
0fbc361c 652gdb_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"
c906108c 653# test help undisplay
523ac3f9 654gdb_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"
c906108c 655# test help unset environment
523ac3f9 656gdb_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"
c906108c 657# test help unset
a38cd180
VP
658test_prefix_command_help "unset" {
659 "Complement to certain \"set\" commands\.\[\r\n\]+"
660}
c906108c 661# test help up
523ac3f9 662gdb_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"
c906108c 663# test help up-silently
523ac3f9 664gdb_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"
c906108c 665# test help user-defined
a38cd180
VP
666test_class_help "user-defined" {
667 "User-defined commands\.\[\r\n\]+"
668 "The commands in this class are those defined by the user\.\[\r\n\]+"
669 "Use the \"define\" command to define a command\.\[\r\n\]+"
670}
c906108c 671# test help watch
06a64a0b 672gdb_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"
c906108c 673# test help whatis
523ac3f9 674gdb_test "help whatis" "Print data type of expression EXP\." "help whatis"
c906108c 675# test help where
523ac3f9 676gdb_test "help where" "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 where"
c906108c 677# test help x
523ac3f9 678gdb_test "help x" "Examine memory: x/FMT ADDRESS\.\[\r\n\]+ADDRESS is an expression for the memory address to examine\.\[\r\n\]+FMT is a repeat count followed by a format letter and a size letter\..*\[\r\n\]+Defaults for format and size letters are those previously used\.\[\r\n\]+Default count is 1\. Default address is following last thing printed\[\r\n\]+with this command or \"print\"\." "help x"
c906108c 679# test help info bogus-gdb-command
523ac3f9 680gdb_test "help info bogus-gdb-command" "Undefined info command: \"bogus-gdb-command\"\. Try \"help info\"\." "help info bogus-gdb-command"
c906108c 681# test help gotcha
523ac3f9 682gdb_test "help gotcha" "Undefined command: \"gotcha\"\. Try \"help\"\." "help gotcha"
6837a0a2 683# test apropos regex
5b41e5f0 684gdb_test "apropos \\\(print\[\^ bsiedf\\\".-\]\\\)" "handle -- Specify how to handle a signal"
6837a0a2
DB
685# test apropos >1 word string
686gdb_test "apropos handle a signal" "handle -- Specify how to handle a signal"
687# test apropos apropos
688gdb_test "apropos apropos" "apropos -- Search for commands matching a REGEXP"
This page took 1.123797 seconds and 4 git commands to generate.