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