Commit | Line | Data |
---|---|---|
07112465 JK |
1 | # Copyright (C) 1988, 1990, 1991, 1992 Free Software Foundation, Inc. |
2 | ||
3 | # This program is free software; you can redistribute it and/or modify | |
4 | # it under the terms of the GNU General Public License as published by | |
5 | # the Free Software Foundation; either version 2 of the License, or | |
6 | # (at your option) any later version. | |
7 | # | |
8 | # This program is distributed in the hope that it will be useful, | |
9 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | |
10 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
11 | # GNU General Public License for more details. | |
12 | # | |
13 | # You should have received a copy of the GNU General Public License | |
14 | # along with this program; if not, write to the Free Software | |
15 | # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ | |
16 | ||
17 | # Please email any bugs, comments, and/or additions to this file to: | |
18 | # bug-gdb@prep.ai.mit.edu | |
19 | ||
20 | # This file was written by Rob Savoye. (rob@cygnus.com) | |
21 | ||
22 | # | |
23 | # test gdb help commands | |
24 | # | |
25 | ||
26 | set prms_id 0 | |
27 | set bug_id 0 | |
28 | ||
29 | # force the height of the debugger to be pretty large so no pagers getused | |
30 | send "set height 400\n" | |
31 | expect -re "$prompt $" | |
32 | ||
33 | # use a larger expect input buffer for long help outputs. | |
34 | match_max 6000 | |
35 | ||
36 | # test help add-symbol-file | |
37 | send "help add-symbol-file\n" | |
38 | expect { | |
39 | -re "Usage: add-symbol-file FILE ADDR.* | |
40 | Load the symbols from FILE, assuming FILE has been dynamically loaded..* | |
41 | ADDR is the starting address of the file\'s text..*$prompt $" \ | |
42 | { pass "help add-symbol-file" } | |
43 | -re ".*$prompt $" { fail "help add-symbol-file" } | |
44 | timeout { fail "(timeout) help add-symbol-file" } | |
45 | } | |
46 | ||
47 | ||
48 | # test help aliases | |
49 | send "help aliases\n" | |
50 | expect { | |
51 | -re "Aliases of other commands..* | |
52 | List of commands\:.* | |
53 | Type \"help\" followed by command name for full documentation..* | |
54 | Command name abbreviations are allowed if unambiguous..*$prompt $"\ | |
55 | { pass "help aliases" } | |
56 | -re "$prompt $" { fail "help aliases" } | |
57 | timeout { fail "(timeout) help aliases" } | |
58 | } | |
59 | ||
60 | ||
61 | send "help attach\n" | |
62 | expect { | |
63 | -re "Attach to a process or file outside of GDB..* | |
64 | This command attaches to another target, of the same type as your last.* | |
65 | `target' command .`info files' will show your target stack.* | |
66 | The command may take as argument a process id or a device file..* | |
67 | For a process id, you must have permission to send the process a signal,.* | |
68 | and it must have the same effective uid as the debugger..* | |
69 | When using \"attach\", you should use the \"file\" command to specify.* | |
70 | the program running in the process, and to load its symbol table..*$prompt $"\ | |
71 | { pass "help attach" } | |
72 | -re "$prompt $" { fail "help attach" } | |
73 | timeout { fail "(timeout) help attach" } | |
74 | } | |
75 | ||
76 | # -re "$prompt $" { fail "help attach" } | |
77 | ||
78 | # test help breakpoint "b" abbreviation | |
79 | send "help b\n" | |
80 | expect { | |
81 | -re "Set breakpoint at specified line or function..* | |
82 | Argument may be line number, function name, or \"\[*\]\" and an address..* | |
83 | If line number is specified, break at start of code for that line..* | |
84 | If function is specified, break at start of code for that function..* | |
85 | If an address is specified, break at that exact address..* | |
86 | With no arg, uses current execution address of selected stack frame..* | |
87 | This is useful for breaking on return to a stack frame..* | |
88 | Multiple breakpoints at one place are permitted, and useful if conditional..* | |
89 | Do \"help breakpoints\" for info on other commands dealing with breakpoints..*$prompt $"\ | |
90 | { pass "help breakpoint \"b\" abbreviation" } | |
91 | -re "$prompt $" { fail "help breakpoint \"b\" abbreviation" } | |
92 | timeout { fail "(timeout) help breakpoint \"b\" abbreviation" } | |
93 | } | |
94 | ||
95 | ||
96 | # test help breakpoint "br" abbreviation | |
97 | send "help br\n" | |
98 | expect { | |
99 | -re "Set breakpoint at specified line or function..* | |
100 | Argument may be line number, function name, or \"\[*\]\" and an address..* | |
101 | If line number is specified, break at start of code for that line..* | |
102 | If function is specified, break at start of code for that function..* | |
103 | If an address is specified, break at that exact address..* | |
104 | With no arg, uses current execution address of selected stack frame..* | |
105 | This is useful for breaking on return to a stack frame..* | |
106 | Multiple breakpoints at one place are permitted, and useful if conditional..* | |
107 | Do \"help breakpoints\" for info on other commands dealing with breakpoints..*$prompt $"\ | |
108 | { pass "help breakpoint \"br\" abbreviation" } | |
109 | -re "$prompt $" { fail "help breakpoint \"br\" abbreviation" } | |
110 | timeout { fail "(timeout) help breakpoint \"br\" abbreviation" } | |
111 | } | |
112 | ||
113 | ||
114 | # test help breakpoint "bre" abbreviation | |
115 | send "help bre\n" | |
116 | expect { | |
117 | -re "Set breakpoint at specified line or function..* | |
118 | Argument may be line number, function name, or \"\[*\]\" and an address..* | |
119 | If line number is specified, break at start of code for that line..* | |
120 | If function is specified, break at start of code for that function..* | |
121 | If an address is specified, break at that exact address..* | |
122 | With no arg, uses current execution address of selected stack frame..* | |
123 | This is useful for breaking on return to a stack frame..* | |
124 | Multiple breakpoints at one place are permitted, and useful if conditional..* | |
125 | Do \"help breakpoints\" for info on other commands dealing with breakpoints..*$prompt $"\ | |
126 | { pass "help breakpoint \"bre\" abbreviation" } | |
127 | -re "$prompt $" { fail "help breakpoint \"bre\" abbreviation" } | |
128 | timeout { fail "(timeout) help breakpoint \"bre\" abbreviation" } | |
129 | } | |
130 | ||
131 | ||
132 | # test help breakpoint "brea" abbreviation | |
133 | send "help brea\n" | |
134 | expect { | |
135 | -re "Set breakpoint at specified line or function..* | |
136 | Argument may be line number, function name, or \"\[*\]\" and an address..* | |
137 | If line number is specified, break at start of code for that line..* | |
138 | If function is specified, break at start of code for that function..* | |
139 | If an address is specified, break at that exact address..* | |
140 | With no arg, uses current execution address of selected stack frame..* | |
141 | This is useful for breaking on return to a stack frame..* | |
142 | Multiple breakpoints at one place are permitted, and useful if conditional..* | |
143 | Do \"help breakpoints\" for info on other commands dealing with breakpoints..*$prompt $"\ | |
144 | { pass "help breakpoint \"brea\" abbreviation" } | |
145 | -re "$prompt $" { fail "help breakpoint \"brea\" abbreviation" } | |
146 | timeout { fail "(timeout) help breakpoint \"brea\" abbreviation" } | |
147 | } | |
148 | ||
149 | ||
150 | # test help breakpoint "break" abbreviation | |
151 | send "help break\n" | |
152 | expect { | |
153 | -re "Set breakpoint at specified line or function..* | |
154 | Argument may be line number, function name, or \"\[*\]\" and an address..* | |
155 | If line number is specified, break at start of code for that line..* | |
156 | If function is specified, break at start of code for that function..* | |
157 | If an address is specified, break at that exact address..* | |
158 | With no arg, uses current execution address of selected stack frame..* | |
159 | This is useful for breaking on return to a stack frame..* | |
160 | Multiple breakpoints at one place are permitted, and useful if conditional..* | |
161 | Do \"help breakpoints\" for info on other commands dealing with breakpoints..*$prompt $"\ | |
162 | { pass "help breakpoint \"break\" abbreviation" } | |
163 | -re "$prompt $" { fail "help breakpoint \"break\" abbreviation" } | |
164 | timeout { fail "(timeout) help breakpoint \"break\" abbreviation" } | |
165 | } | |
166 | ||
167 | ||
168 | # test help breakpoints | |
169 | send "help breakpoints\n" | |
170 | expect { | |
171 | -re "Making program stop at certain points..* | |
172 | List of commands\:.* | |
173 | watch -- Set a watchpoint for an expression.* | |
174 | catch -- Set breakpoints to catch exceptions that are raised.* | |
175 | break -- Set breakpoint at specified line or function.* | |
176 | clear -- Clear breakpoint at specified line or function.* | |
177 | delete -- Delete some breakpoints or auto-display expressions.* | |
178 | disable -- Disable some breakpoints.* | |
179 | enable -- Enable some breakpoints.* | |
180 | tbreak -- Set a temporary breakpoint.* | |
181 | condition -- Specify breakpoint number N to break only if COND is true.* | |
182 | commands -- Set commands to be executed when a breakpoint is hit.* | |
183 | ignore -- Set ignore-count of breakpoint number N to COUNT.* | |
184 | Type \"help\" followed by command name for full documentation..* | |
185 | Command name abbreviations are allowed if unambiguous..*$prompt $"\ | |
186 | { pass "help breakpoints" } | |
187 | -re "$prompt $" { fail "help breakpoints" } | |
188 | timeout { fail "(timeout) help breakpoints" } | |
189 | } | |
190 | ||
191 | ||
192 | # test help backtrace "bt" abbreviation | |
193 | send "help bt\n" | |
194 | expect { | |
195 | -re "Print backtrace of all stack frames, or innermost COUNT frames..* | |
196 | With a negative argument, print outermost -COUNT frames..*$prompt $"\ | |
197 | { pass "help backtrace \"bt\" abbreviation" } | |
198 | -re "$prompt $" { fail "help backtrace \"bt\" abbreviation" } | |
199 | timeout { fail "(timeout) help backtrace \"bt\" abbreviation" } | |
200 | } | |
201 | ||
202 | ||
203 | # test help backtrace | |
204 | send "help backtrace\n" | |
205 | expect { | |
206 | -re "Print backtrace of all stack frames, or innermost COUNT frames..* | |
207 | With a negative argument, print outermost -COUNT frames..*$prompt $"\ | |
208 | { pass "help backtrace" } | |
209 | -re "$prompt $" { fail "help backtrace" } | |
210 | timeout { fail "(timeout) help backtrace" } | |
211 | } | |
212 | ||
213 | ||
214 | # test help continue "c" abbreviation | |
215 | send "help c\n" | |
216 | expect { | |
217 | -re "Continue program being debugged.*$prompt $"\ | |
218 | { pass "help continue \"c\" abbreviation" } | |
219 | -re "$prompt $" { fail "help continue \"c\" abbreviation" } | |
220 | timeout { fail "(timeout) help continue \"c\" abbreviation" } | |
221 | } | |
222 | ||
223 | ||
224 | # test help continue | |
225 | send "help continue\n" | |
226 | expect { | |
227 | -re "Continue program being debugged.*$prompt $"\ | |
228 | { pass "help continue" } | |
229 | -re "$prompt $" { fail "help continue" } | |
230 | timeout { fail "(timeout) help continue" } | |
231 | } | |
232 | ||
233 | ||
234 | # test help call | |
235 | send "help call\n" | |
236 | expect { | |
237 | -re "Call a function.*$prompt $"\ | |
238 | { pass "help call" } | |
239 | -re "$prompt $" { fail "help call" } | |
240 | timeout { fail "(timeout) help call" } | |
241 | } | |
242 | ||
243 | ||
244 | # test help catch | |
245 | send "help catch\n" | |
246 | expect { | |
247 | -re "Set breakpoints to catch exceptions that are raised..* | |
248 | Argument may be a single exception to catch, multiple exceptions.* | |
249 | to catch, or the default exception \"default\". If no arguments.* | |
250 | are given, breakpoints are set at all exception handlers catch clauses.* | |
251 | within the current scope..* | |
252 | A condition specified for the catch applies to all breakpoints set.* | |
253 | with this command.* | |
254 | Do \"help breakpoints\" for info on other commands dealing with breakpoints..*$prompt $"\ | |
255 | { pass "help catch" } | |
256 | -re "$prompt $" { fail "help catch" } | |
257 | timeout { fail "(timeout) help catch" } | |
258 | } | |
259 | ||
260 | ||
261 | # test help cd | |
262 | send "help cd\n" | |
263 | expect { | |
264 | -re "Set working directory to DIR for debugger and program being debugged..* | |
265 | The change does not take effect for the program being debugged.* | |
266 | until the next time it is started..*$prompt $"\ | |
267 | { pass "help cd" } | |
268 | -re "$prompt $" { fail "help cd" } | |
269 | timeout { fail "(timeout) help cd" } | |
270 | } | |
271 | ||
272 | ||
273 | # test help clear | |
274 | send "help clear\n" | |
275 | expect { | |
276 | -re "Clear breakpoint at specified line or function.* | |
277 | Argument may be line number, function name, or .* and an address.* | |
278 | If line number is specified, all breakpoints in that line are cleared.* | |
279 | If function is specified, breakpoints at beginning of function are cleared.* | |
280 | If an address is specified, breakpoints at that address are cleared.* | |
281 | With no argument, clears all breakpoints in the line that the selected frame.* | |
282 | is executing in..* | |
283 | See also the \"delete\" command which clears breakpoints by number..*$prompt $"\ | |
284 | { pass "help clear" } | |
285 | -re "$prompt $" { fail "help clear" } | |
286 | timeout { fail "(timeout) help clear" } | |
287 | } | |
288 | ||
289 | ||
290 | # test help commands | |
291 | send "help commands\n" | |
292 | expect { | |
293 | -re "Set commands to be executed when a breakpoint is hit..* | |
294 | Give breakpoint number as argument after \"commands\"..* | |
295 | With no argument, the targeted breakpoint is the last one set..* | |
296 | The commands themselves follow starting on the next line..* | |
297 | Type a line containing \"end\" to indicate the end of them..* | |
298 | Give \"silent\" as the first line to make the breakpoint silent;.* | |
299 | then no output is printed when it is hit, except what the commands print..*$prompt $"\ | |
300 | { pass "help commands" } | |
301 | -re "$prompt $" { fail "help commands" } | |
302 | timeout { fail "(timeout) help commands" } | |
303 | } | |
304 | ||
305 | ||
306 | # test help condition | |
307 | send "help condition\n" | |
308 | expect { | |
309 | -re "Specify breakpoint number N to break only if COND is true..* | |
310 | Usage is `condition N COND', where N is an integer and COND is an.* | |
311 | expression to be evaluated whenever breakpoint N is reached. .*$prompt $"\ | |
312 | { pass "help condition" } | |
313 | -re "$prompt $" { fail "help condition" } | |
314 | timeout { fail "(timeout) help condition" } | |
315 | } | |
316 | ||
317 | ||
318 | # test help core-file | |
319 | send "help core-file\n" | |
320 | expect { | |
321 | -re "Use FILE as core dump for examining memory and registers..* | |
322 | No arg means have no core file. This command has been superseded by the.* | |
323 | `target core' and `detach' commands..*$prompt $"\ | |
324 | { pass "help core-file" } | |
325 | -re "$prompt $" { fail "help core-file" } | |
326 | timeout { fail "(timeout) help core-file" } | |
327 | } | |
328 | ||
329 | ||
330 | # test help delete "d" abbreviation | |
331 | send "help d\n" | |
332 | expect { | |
333 | -re "Delete some breakpoints or auto-display expressions..* | |
334 | Arguments are breakpoint numbers with spaces in between..* | |
335 | To delete all breakpoints, give no argument..* | |
336 | Also a prefix command for deletion of other GDB objects..* | |
337 | The \"unset\" command is also an alias for \"delete\"..* | |
338 | List of delete subcommands:.* | |
339 | delete display -- Cancel some expressions to be displayed when program stops.* | |
340 | delete breakpoints -- Delete some breakpoints or auto-display expressions.* | |
341 | Type \"help delete\" followed by delete subcommand name for full documentation..* | |
342 | Command name abbreviations are allowed if unambiguous..*$prompt $"\ | |
343 | { pass "help delete \"d\" abbreviation" } | |
344 | -re "$prompt $" { fail "help delete \"d\" abbreviation" } | |
345 | timeout { fail "(timeout) help delete \"d\" abbreviation" } | |
346 | } | |
347 | ||
348 | ||
349 | # test help delete | |
350 | send "help delete\n" | |
351 | expect { | |
352 | -re "Delete some breakpoints or auto-display expressions..* | |
353 | Arguments are breakpoint numbers with spaces in between..* | |
354 | To delete all breakpoints, give no argument..* | |
355 | Also a prefix command for deletion of other GDB objects..* | |
356 | The \"unset\" command is also an alias for \"delete\"..* | |
357 | List of delete subcommands:.* | |
358 | delete display -- Cancel some expressions to be displayed when program stops.* | |
359 | delete breakpoints -- Delete some breakpoints or auto-display expressions.* | |
360 | Type \"help delete\" followed by delete subcommand name for full documentation..* | |
361 | Command name abbreviations are allowed if unambiguous..*$prompt $"\ | |
362 | { pass "help delete" } | |
363 | -re "$prompt $" { fail "help delete" } | |
364 | timeout { fail "(timeout) help delete" } | |
365 | } | |
366 | ||
367 | ||
368 | # test help data | |
369 | send "help data\n" | |
370 | expect { | |
371 | -re ".* | |
372 | Examining data..* | |
373 | List of commands:.* | |
374 | Type \"help\" followed by command name for full documentation..* | |
375 | Command name abbreviations are allowed if unambiguous..*$prompt $"\ | |
376 | { pass "help data" } | |
377 | -re "$prompt $" { fail "help data" } | |
378 | timeout { fail "(timeout) help data" } | |
379 | } | |
380 | ||
381 | ||
382 | # test help define | |
383 | send "help define\n" | |
384 | expect { | |
385 | -re "Define a new command name. Command name is argument..* | |
386 | Definition appears on following lines, one command per line..* | |
387 | End with a line of just \"end\"..* | |
388 | Use the \"document\" command to give documentation for the new command..* | |
389 | Commands defined in this way do not take arguments..*$prompt $"\ | |
390 | { pass "help define" } | |
391 | -re "$prompt $" { fail "help define" } | |
392 | timeout { fail "(timeout) help define" } | |
393 | } | |
394 | ||
395 | ||
396 | # test help delete breakpoints | |
397 | send "help delete breakpoints\n" | |
398 | expect { | |
399 | -re "Delete some breakpoints or auto-display expressions..* | |
400 | Arguments are breakpoint numbers with spaces in between..* | |
401 | To delete all breakpoints, give no argument..* | |
402 | This command may be abbreviated \"delete\"..*$prompt $"\ | |
403 | { pass "help delete breakpoints" } | |
404 | -re "$prompt $" { fail "help delete breakpoints" } | |
405 | timeout { fail "(timeout) help delete breakpoints" } | |
406 | } | |
407 | ||
408 | ||
409 | # test help delete display | |
410 | send "help delete display\n" | |
411 | expect { | |
412 | -re "Cancel some expressions to be displayed when program stops..* | |
413 | Arguments are the code numbers of the expressions to stop displaying..* | |
414 | No argument means cancel all automatic-display expressions..* | |
415 | Do \"info display\" to see current list of code numbers..*$prompt $"\ | |
416 | { pass "help delete display" } | |
417 | -re "$prompt $" { fail "help delete display" } | |
418 | timeout { fail "(timeout) help delete display" } | |
419 | } | |
420 | ||
421 | ||
422 | # test help detach | |
423 | send "help detach\n" | |
424 | expect { | |
425 | -re "Detach a process or file previously attached..* | |
426 | If a process, it is no longer traced, and it continues its execution. If you.* | |
427 | were debugging a file, the file is closed and gdb no longer accesses it..*$prompt $"\ | |
428 | { pass "help detach" } | |
429 | -re "$prompt $" { fail "help detach" } | |
430 | timeout { fail "(timeout) help detach" } | |
431 | } | |
432 | ||
433 | ||
434 | # test help directory | |
435 | send "help directory\n" | |
436 | expect { | |
437 | -re "Add directory DIR to beginning of search path for source files..* | |
438 | Forget cached info on source file locations and line positions..* | |
439 | DIR can also be .cwd for the current working directory, or .cdir for the.* | |
440 | directory in which the source file was compiled into object code..* | |
441 | With no argument, reset the search path to .cdir:.cwd, the default..*$prompt $"\ | |
442 | { pass "help directory" } | |
443 | -re "$prompt $" { fail "help directory" } | |
444 | timeout { fail "(timeout) help directory" } | |
445 | } | |
446 | ||
447 | ||
448 | # test help disable "dis" abbreviation | |
449 | send "help dis\n" | |
450 | expect { | |
451 | -re "Disable some breakpoints..* | |
452 | Arguments are breakpoint numbers with spaces in between..* | |
453 | To disable all breakpoints, give no argument..* | |
454 | A disabled breakpoint is not forgotten, but has no effect until reenabled..* | |
455 | List of disable subcommands:.* | |
456 | disable display -- Disable some expressions to be displayed when program stops.* | |
457 | disable breakpoints -- Disable some breakpoints.* | |
458 | Type \"help disable\" followed by disable subcommand name for full documentation..* | |
459 | Command name abbreviations are allowed if unambiguous..*$prompt $"\ | |
460 | { pass "help disable \"dis\" abbreviation" } | |
461 | -re "$prompt $" { fail "help disable \"dis\" abbreviation" } | |
462 | timeout { fail "(timeout) help disable \"dis\" abbreviation" } | |
463 | } | |
464 | ||
465 | ||
466 | # test help disable "disa" abbreviation | |
467 | send "help disa\n" | |
468 | expect { | |
469 | -re "Disable some breakpoints..* | |
470 | Arguments are breakpoint numbers with spaces in between..* | |
471 | To disable all breakpoints, give no argument..* | |
472 | A disabled breakpoint is not forgotten, but has no effect until reenabled..* | |
473 | List of disable subcommands:.* | |
474 | disable display -- Disable some expressions to be displayed when program stops.* | |
475 | disable breakpoints -- Disable some breakpoints.* | |
476 | Type \"help disable\" followed by disable subcommand name for full documentation..* | |
477 | Command name abbreviations are allowed if unambiguous..*$prompt $"\ | |
478 | { pass "help disable \"disa\" abbreviation" } | |
479 | -re "$prompt $" { fail "help disable \"disa\" abbreviation" } | |
480 | timeout { fail "(timeout) help disable \"disa\" abbreviation" } | |
481 | } | |
482 | ||
483 | ||
484 | # test help disable | |
485 | send "help disable\n" | |
486 | expect { | |
487 | -re "Disable some breakpoints..* | |
488 | Arguments are breakpoint numbers with spaces in between..* | |
489 | To disable all breakpoints, give no argument..* | |
490 | A disabled breakpoint is not forgotten, but has no effect until reenabled..* | |
491 | List of disable subcommands:.* | |
492 | disable display -- Disable some expressions to be displayed when program stops.* | |
493 | disable breakpoints -- Disable some breakpoints.* | |
494 | Type \"help disable\" followed by disable subcommand name for full documentation..* | |
495 | Command name abbreviations are allowed if unambiguous..*$prompt $"\ | |
496 | { pass "help disable" } | |
497 | -re "$prompt $" { fail "help disable" } | |
498 | timeout { fail "(timeout) help disable" } | |
499 | } | |
500 | ||
501 | ||
502 | # test help disable breakpoints | |
503 | send "help disable breakpoints\n" | |
504 | expect { | |
505 | -re "Disable some breakpoints..* | |
506 | Arguments are breakpoint numbers with spaces in between..* | |
507 | To disable all breakpoints, give no argument..* | |
508 | A disabled breakpoint is not forgotten, but has no effect until reenabled..* | |
509 | This command may be abbreviated \"disable\"..*$prompt $"\ | |
510 | { pass "help disable breakpoints" } | |
511 | -re "$prompt $" { fail "help disable breakpoints" } | |
512 | timeout { fail "(timeout) help disable breakpoints" } | |
513 | } | |
514 | ||
515 | ||
516 | # test help disable display | |
517 | send "help disable display\n" | |
518 | expect { | |
519 | -re "Disable some expressions to be displayed when program stops..* | |
520 | Arguments are the code numbers of the expressions to stop displaying..* | |
521 | No argument means disable all automatic-display expressions..* | |
522 | Do \"info display\" to see current list of code numbers..*$prompt $"\ | |
523 | { pass "help disable display" } | |
524 | -re "$prompt $" { fail "help disable display" } | |
525 | timeout { fail "(timeout) help disable display" } | |
526 | } | |
527 | ||
528 | ||
529 | # test help disassemble | |
530 | send "help disassemble\n" | |
531 | expect { | |
532 | -re "Disassemble a specified section of memory..* | |
533 | Default is the function surrounding the pc of the selected frame..* | |
534 | With a single argument, the function surrounding that address is dumped..* | |
535 | Two arguments are taken as a range of memory to dump..*$prompt $"\ | |
536 | { pass "help disassemble" } | |
537 | -re "$prompt $" { fail "help disassemble" } | |
538 | timeout { fail "(timeout) help disassemble" } | |
539 | } | |
540 | ||
541 | ||
542 | # test help display | |
543 | send "help display\n" | |
544 | expect { | |
545 | -re "Print value of expression EXP each time the program stops..* | |
546 | /FMT may be used before EXP as in the \"print\" command..* | |
547 | /FMT \"i\" or \"s\" or including a size-letter is allowed,.* | |
548 | as in the \"x\" command, and then EXP is used to get the address to examine.* | |
549 | and examining is done as in the \"x\" command..* | |
550 | With no argument, display all currently requested auto-display expressions..* | |
551 | Use \"undisplay\" to cancel display requests previously made..*$prompt $"\ | |
552 | { pass "help display" } | |
553 | -re "$prompt $" { fail "help display" } | |
554 | timeout { fail "(timeout) help display" } | |
555 | } | |
556 | ||
557 | ||
558 | # test help do | |
559 | send "help do\n" | |
560 | expect { | |
561 | -re "Select and print stack frame called by this one..* | |
562 | An argument says how many frames down to go..*$prompt $"\ | |
563 | { pass "help do" } | |
564 | -re "$prompt $" { fail "help do" } | |
565 | timeout { fail "(timeout) help do" } | |
566 | } | |
567 | ||
568 | ||
569 | # test help document | |
570 | send "help document\n" | |
571 | expect { | |
572 | -re "Document a user-defined command..* | |
573 | Give command name as argument. Give documentation on following lines..* | |
574 | End with a line of just \"end\"..*$prompt $"\ | |
575 | { pass "help document" } | |
576 | -re "$prompt $" { fail "help document" } | |
577 | timeout { fail "(timeout) help document" } | |
578 | } | |
579 | ||
580 | ||
581 | ||
582 | # test help down | |
583 | send "help down\n" | |
584 | expect { | |
585 | -re "Select and print stack frame called by this one..* | |
586 | An argument says how many frames down to go..*$prompt $"\ | |
587 | { pass "help down" } | |
588 | -re "$prompt $" { fail "help down" } | |
589 | timeout { fail "(timeout) help down" } | |
590 | } | |
591 | ||
592 | ||
593 | # test help down-silently | |
594 | send "help down-silently\n" | |
595 | expect { | |
596 | -re "Same as the `down' command, but does not print anything..* | |
597 | This is useful in command scripts..*$prompt $"\ | |
598 | { pass "help down-silently" } | |
599 | -re "$prompt $" { fail "help down-silently" } | |
600 | timeout { fail "(timeout) help down-silently" } | |
601 | } | |
602 | ||
603 | ||
604 | # this command was removed from GDB 4.5.8 | |
605 | # test help dump-me | |
606 | #send "help dump-me\n" | |
607 | #expect { | |
608 | # -re "Get fatal error; make debugger dump its core..*$prompt $"\ | |
609 | # { pass "help dump-me" } | |
610 | # -re "$prompt $" { fail "help dump-me" } | |
611 | # timeout { fail "(timeout) help dump-me" } | |
612 | # } | |
613 | ||
614 | # test help echo | |
615 | send "help echo\n" | |
616 | expect { | |
617 | -re "Print a constant string. Give string as argument..* | |
618 | C escape sequences may be used in the argument..* | |
619 | No newline is added at the end of the argument;.* | |
620 | use \".n\" if you want a newline to be printed..* | |
621 | Since leading and trailing whitespace are ignored in command arguments,.* | |
622 | if you want to print some you must use \".\" before leading whitespace.* | |
623 | to be printed or after trailing whitespace..*$prompt $"\ | |
624 | { pass "help echo" } | |
625 | -re "$prompt $" { fail "help echo" } | |
626 | timeout { fail "(timeout) help echo" } | |
627 | } | |
628 | ||
629 | ||
630 | # test help enable breakpoints delete | |
631 | send "help enable breakpoints delete\n" | |
632 | expect { | |
633 | -re "Enable breakpoints and delete when hit. Give breakpoint numbers..* | |
634 | If a breakpoint is hit while enabled in this fashion, it is deleted..*$prompt $"\ | |
635 | { pass "help enable breakpoints delete" } | |
636 | -re "$prompt $" { fail "help enable breakpoints delete" } | |
637 | timeout { fail "(timeout) help enable breakpoints delete" } | |
638 | } | |
639 | ||
640 | ||
641 | # test help enable breakpoints once | |
642 | send "help enable breakpoints once\n" | |
643 | expect { | |
644 | -re "Enable breakpoints for one hit..*$prompt $"\ | |
645 | { pass "help enable breakpoints once" } | |
646 | -re "$prompt $" { fail "help enable breakpoints once" } | |
647 | timeout { fail "(timeout) help enable breakpoints once" } | |
648 | } | |
649 | ||
650 | ||
651 | # test help enable breakpoints | |
652 | send "help enable breakpoints\n" | |
653 | expect { | |
654 | -re "Enable some breakpoints..* | |
655 | Give breakpoint numbers .separated by spaces. as arguments..* | |
656 | This is used to cancel the effect of the \"disable\" command..* | |
657 | May be abbreviated to simply \"enable\"..*.* | |
658 | List of enable breakpoints subcommands:.* | |
659 | enable breakpoints delete -- Enable breakpoints and delete when hit.* | |
660 | enable breakpoints once -- Enable breakpoints for one hit.* | |
661 | Type \"help enable breakpoints\" followed by enable breakpoints subcommand name for full documentation..* | |
662 | Command name abbreviations are allowed if unambiguous..*$prompt $"\ | |
663 | { pass "help enable breakpoints" } | |
664 | -re "$prompt $" { fail "help enable breakpoints" } | |
665 | timeout { fail "(timeout) help enable breakpoints" } | |
666 | } | |
667 | ||
668 | ||
669 | # test help enable delete | |
670 | send "help enable delete\n" | |
671 | expect { | |
672 | -re "Enable breakpoints and delete when hit. Give breakpoint numbers..* | |
673 | If a breakpoint is hit while enabled in this fashion, it is deleted..*$prompt $"\ | |
674 | { pass "help enable delete" } | |
675 | -re "$prompt $" { fail "help enable delete" } | |
676 | timeout { fail "(timeout) help enable delete" } | |
677 | } | |
678 | ||
679 | ||
680 | # test help enable display | |
681 | send "help enable display\n" | |
682 | expect { | |
683 | -re "Enable some expressions to be displayed when program stops..* | |
684 | Arguments are the code numbers of the expressions to resume displaying..* | |
685 | No argument means enable all automatic-display expressions..* | |
686 | Do \"info display\" to see current list of code numbers..*$prompt $"\ | |
687 | { pass "help enable display" } | |
688 | -re "$prompt $" { fail "help enable display" } | |
689 | timeout { fail "(timeout) help enable display" } | |
690 | } | |
691 | ||
692 | ||
693 | # test help enable once | |
694 | send "help enable once\n" | |
695 | expect { | |
696 | -re "Enable breakpoints for one hit.*$prompt $"\ | |
697 | { pass "help enable once" } | |
698 | -re "$prompt $" { fail "help enable once" } | |
699 | timeout { fail "(timeout) help enable once" } | |
700 | } | |
701 | ||
702 | ||
703 | # test help enable | |
704 | send "help enable\n" | |
705 | expect { | |
706 | -re "Enable some breakpoints..* | |
707 | Give breakpoint numbers .separated by spaces. as arguments..* | |
708 | With no subcommand, breakpoints are enabled until you command otherwise..* | |
709 | This is used to cancel the effect of the \"disable\" command..* | |
710 | With a subcommand you can enable temporarily..* | |
711 | List of enable subcommands:.* | |
712 | enable display -- Enable some expressions to be displayed when program stops.* | |
713 | enable once -- Enable breakpoints for one hit.* | |
714 | enable delete -- Enable breakpoints and delete when hit.* | |
715 | Type \"help enable\" followed by enable subcommand name for full documentation..* | |
716 | Command name abbreviations are allowed if unambiguous..*$prompt $"\ | |
717 | { pass "help enable" } | |
718 | -re "$prompt $" { fail "help enable" } | |
719 | timeout { fail "(timeout) help enable" } | |
720 | } | |
721 | ||
722 | ||
723 | # test help exec-file | |
724 | send "help exec-file\n" | |
725 | expect { | |
726 | -re "Use FILE as program for getting contents of pure memory..* | |
727 | If FILE cannot be found as specified, your execution directory path.* | |
728 | is searched for a command of that name..* | |
729 | No arg means have no executable file..*$prompt $"\ | |
730 | { pass "help exec-file" } | |
731 | -re "$prompt $" { fail "help exec-file" } | |
732 | timeout { fail "(timeout) help exec-file" } | |
733 | } | |
734 | ||
735 | ||
736 | # test help frame "f" abbreviation | |
737 | send "help f\n" | |
738 | expect { | |
739 | -re "Select and print a stack frame..* | |
740 | With no argument, print the selected stack frame. .See also \"info frame\".* | |
741 | An argument specifies the frame to select..* | |
742 | It can be a stack frame number or the address of the frame..* | |
743 | With argument, nothing is printed if input is coming from.* | |
744 | a command file or a user-defined command..*$prompt $"\ | |
745 | { pass "help frame \"f\" abbreviation" } | |
746 | -re "$prompt $" { fail "help frame \"f\" abbreviation" } | |
747 | timeout { fail "(timeout) help frame \"f\" abbreviation" } | |
748 | } | |
749 | ||
750 | ||
751 | # test help frame | |
752 | send "help frame\n" | |
753 | expect { | |
754 | -re "Select and print a stack frame..* | |
755 | With no argument, print the selected stack frame. .See also \"info frame\"...* | |
756 | An argument specifies the frame to select..* | |
757 | It can be a stack frame number or the address of the frame..* | |
758 | With argument, nothing is printed if input is coming from.* | |
759 | a command file or a user-defined command..*$prompt $"\ | |
760 | { pass "help frame" } | |
761 | -re "$prompt $" { fail "help frame" } | |
762 | timeout { fail "(timeout) help frame" } | |
763 | } | |
764 | ||
765 | ||
766 | # test help fg | |
767 | send "help fg\n" | |
768 | expect { | |
769 | -re "Continue program being debugged.*$prompt $"\ | |
770 | { pass "help fg" } | |
771 | -re "$prompt $" { fail "help fg" } | |
772 | timeout { fail "(timeout) help fg" } | |
773 | } | |
774 | ||
775 | ||
776 | # test help file | |
777 | send "help file\n" | |
778 | expect { | |
779 | -re "Use FILE as program to be debugged..* | |
780 | It is read for its symbols, for getting the contents of pure memory,.* | |
781 | and it is the program executed when you use the `run' command..* | |
782 | If FILE cannot be found as specified, your execution directory path.* | |
783 | ..PATH. is searched for a command of that name..* | |
784 | No arg means to have no executable file and no symbols..*$prompt $"\ | |
785 | { pass "help file" } | |
786 | -re "$prompt $" { fail "help file" } | |
787 | timeout { fail "(timeout) help file" } | |
788 | } | |
789 | ||
790 | ||
791 | # test help files | |
792 | send "help files\n" | |
793 | expect { | |
794 | -re "Specifying.*$prompt $" { pass "help files" } | |
795 | -re "$prompt $" { fail "help files" } | |
796 | timeout { fail "(timeout) help files" } | |
797 | } | |
798 | ||
799 | ||
800 | # test help finish | |
801 | send "help finish\n" | |
802 | expect { | |
803 | -re "Execute until selected stack frame returns..* | |
804 | Upon return, the value returned is printed and put in the value history..*$prompt $"\ | |
805 | { pass "help finish" } | |
806 | -re "$prompt $" { fail "help finish" } | |
807 | timeout { fail "(timeout) help finish" } | |
808 | } | |
809 | ||
810 | ||
811 | # test help forward-search | |
812 | send "help forward-search\n" | |
813 | expect { | |
814 | -re "Search for regular expression .see regex.3.. from last line listed..*$prompt $"\ | |
815 | { pass "help forward-search" } | |
816 | -re "$prompt $" { fail "help forward-search" } | |
817 | timeout { fail "(timeout) help forward-search" } | |
818 | } | |
819 | ||
820 | ||
821 | # test help help "h" abbreviation | |
822 | send "help h\n" | |
823 | expect { | |
824 | -re "Print list of commands..*$prompt $"\ | |
825 | { pass "help help \"h\" abbreviation" } | |
826 | -re "$prompt $" { fail "help help \"h\" abbreviation" } | |
827 | timeout { fail "(timeout) help help \"h\" abbreviation" } | |
828 | } | |
829 | ||
830 | ||
831 | # test help help | |
832 | send "help help\n" | |
833 | expect { | |
834 | -re "Print list of commands..*$prompt $"\ | |
835 | { pass "help help" } | |
836 | -re "$prompt $" { fail "help help" } | |
837 | timeout { fail "(timeout) help help" } | |
838 | } | |
839 | ||
840 | ||
841 | # test help handle | |
842 | send "help handle\n" | |
843 | expect { | |
844 | -re "Specify how to handle a signal..*$prompt $"\ | |
845 | { pass "help handle" } | |
846 | -re "$prompt $" { fail "help handle" } | |
847 | timeout { fail "(timeout) help handle" } | |
848 | } | |
849 | ||
850 | ||
851 | # test help info "i" abbreviation | |
852 | send "help i\n" | |
853 | expect { | |
854 | -re "Generic command for showing things about the program being debugged..* | |
855 | List of info subcommands:.* | |
856 | Type \"help info\" followed by info subcommand name for full documentation..* | |
857 | Command name abbreviations are allowed if unambiguous..*$prompt $"\ | |
858 | { pass "help info \"i\" abbreviation" } | |
859 | -re "$prompt $" { fail "help info \"i\" abbreviation" } | |
860 | timeout { fail "(timeout) help info \"i\" abbreviation" } | |
861 | } | |
862 | ||
863 | ||
864 | # test help info | |
865 | send "help info\n" | |
866 | expect { | |
867 | -re "Generic command for showing things about the program being debugged..* | |
868 | List of info subcommands:.* | |
869 | Type \"help info\" followed by info subcommand name for full documentation..* | |
870 | Command name abbreviations are allowed if unambiguous..*$prompt $"\ | |
871 | { pass "help info" } | |
872 | -re "$prompt $" { fail "help info" } | |
873 | timeout { fail "(timeout) help info" } | |
874 | } | |
875 | ||
876 | ||
877 | # test help ignore | |
878 | send "help ignore\n" | |
879 | expect { | |
880 | -re "Set ignore-count of breakpoint number N to COUNT..* | |
881 | Usage is `ignore N COUNT'..*$prompt $"\ | |
882 | { pass "help ignore" } | |
883 | -re "$prompt $" { fail "help ignore" } | |
884 | timeout { fail "(timeout) help ignore" } | |
885 | } | |
886 | ||
887 | ||
888 | # test help info address | |
889 | send "help info address\n" | |
890 | expect { | |
891 | -re "Describe where variable VAR is stored..*$prompt $"\ | |
892 | { pass "help info address" } | |
893 | -re "$prompt $" { fail "help info address" } | |
894 | timeout { fail "(timeout) help info address" } | |
895 | } | |
896 | ||
897 | ||
898 | # test help info all-registers | |
899 | send "help info all-registers\n" | |
900 | expect { | |
901 | -re "List of all registers and their contents, for selected stack frame..* | |
902 | Register name as argument means describe only that register..*$prompt $"\ | |
903 | { pass "help info all-registers" } | |
904 | -re "$prompt $" { fail "help info all-registers" } | |
905 | timeout { fail "(timeout) help info all-registers" } | |
906 | } | |
907 | ||
908 | ||
909 | # test help info args | |
910 | send "help info args\n" | |
911 | expect { | |
912 | -re "Argument variables of current stack frame..*$prompt $"\ | |
913 | { pass "help info args" } | |
914 | -re "$prompt $" { fail "help info args" } | |
915 | timeout { fail "(timeout) help info args" } | |
916 | } | |
917 | ||
918 | ||
919 | # test help info breakpoints | |
920 | send "help info breakpoints\n" | |
921 | expect { | |
922 | -re "Status of user-settable breakpoints, or breakpoint number NUMBER..* | |
923 | breakpoint set..*$prompt $"\ | |
924 | { pass "help info breakpoints" } | |
925 | -re "$prompt $" { fail "help info breakpoints" } | |
926 | timeout { fail "(timeout) help info breakpoints" } | |
927 | } | |
928 | ||
929 | ||
930 | # test help info catch | |
931 | send "help info catch\n" | |
932 | expect { | |
933 | -re "Exceptions that can be caught in the current stack frame..*$prompt $"\ | |
934 | { pass "help info catch" } | |
935 | -re "$prompt $" { fail "help info catch" } | |
936 | timeout { fail "(timeout) help info catch" } | |
937 | } | |
938 | ||
939 | ||
940 | # test help info copying | |
941 | send "help info copying\n" | |
942 | expect { | |
943 | -re "Conditions for redistributing copies of GDB..*$prompt $"\ | |
944 | { pass "help info copying" } | |
945 | -re "$prompt $" { fail "help info copying" } | |
946 | timeout { fail "(timeout) help info copying" } | |
947 | } | |
948 | ||
949 | ||
950 | # test help info display | |
951 | send "help info display\n" | |
952 | expect { | |
953 | -re "Expressions to display when program stops, with code numbers..*$prompt $"\ | |
954 | { pass "help info display" } | |
955 | -re "$prompt $" { fail "help info display" } | |
956 | timeout { fail "(timeout) help info display" } | |
957 | } | |
958 | ||
959 | ||
960 | # test help info frame "f" abbreviation | |
961 | send "help info f\n" | |
962 | expect { | |
963 | -re "All about selected stack frame, or frame at ADDR..*$prompt $"\ | |
964 | { pass "help info frame \"f\" abbreviation" } | |
965 | -re "$prompt $" { fail "help info frame \"f\" abbreviation" } | |
966 | timeout { fail "(timeout) help info frame \"f\" abbreviation" } | |
967 | } | |
968 | ||
969 | ||
970 | # test help info frame | |
971 | send "help info frame\n" | |
972 | expect { | |
973 | -re "All about selected stack frame, or frame at ADDR..*$prompt $"\ | |
974 | { pass "help info frame" } | |
975 | -re "$prompt $" { fail "help info frame" } | |
976 | timeout { fail "(timeout) help info frame" } | |
977 | } | |
978 | ||
979 | ||
980 | # test help info files | |
981 | send "help info files\n" | |
982 | expect { | |
983 | -re "Names of targets and files being debugged..* | |
984 | Shows the entire stack of targets currently in use .including the exec-file,.* | |
985 | core-file, and process, if any., as well as the symbol file name..*$prompt $"\ | |
986 | { pass "help info files" } | |
987 | -re "$prompt $" { fail "help info files" } | |
988 | timeout { fail "(timeout) help info files" } | |
989 | } | |
990 | ||
991 | ||
992 | # test help info float | |
993 | send "help info float\n" | |
994 | expect { | |
995 | -re "Print the status of the floating point unit.*$prompt $"\ | |
996 | { pass "help info float" } | |
997 | -re "$prompt $" { fail "help info float" } | |
998 | timeout { fail "(timeout) help info float" } | |
999 | } | |
1000 | ||
1001 | ||
1002 | # test help info functions | |
1003 | send "help info functions\n" | |
1004 | expect { | |
1005 | -re "All function names, or those matching REGEXP..*$prompt $"\ | |
1006 | { pass "help info functions" } | |
1007 | -re "$prompt $" { fail "help info functions" } | |
1008 | timeout { fail "(timeout) help info functions" } | |
1009 | } | |
1010 | ||
1011 | ||
1012 | # test help info line | |
1013 | send "help info line\n" | |
1014 | expect { | |
1015 | -re "Core addresses of the code for a source line..* | |
1016 | Line can be specified as.* | |
1017 | LINENUM, to list around that line in current file,.* | |
1018 | FILE:LINENUM, to list around that line in that file,.* | |
1019 | FUNCTION, to list around beginning of that function,.* | |
1020 | FILE:FUNCTION, to distinguish among like-named static functions..* | |
1021 | Default is to describe the last source line that was listed..* | |
1022 | This sets the default address for \"x\" to the line's first instruction.* | |
1023 | so that \"x.i\" suffices to start examining the machine code..* | |
1024 | The address is also stored as the value of \"._\"..*$prompt $"\ | |
1025 | { pass "help info line" } | |
1026 | -re "$prompt $" { fail "help info line" } | |
1027 | timeout { fail "(timeout) help info line" } | |
1028 | } | |
1029 | ||
1030 | ||
1031 | # test help info locals | |
1032 | send "help info locals\n" | |
1033 | expect { | |
1034 | -re "Local variables of current stack frame..*$prompt $"\ | |
1035 | { pass "help info locals" } | |
1036 | -re "$prompt $" { fail "help info locals" } | |
1037 | timeout { fail "(timeout) help info locals" } | |
1038 | } | |
1039 | ||
1040 | ||
1041 | # test help info program | |
1042 | send "help info program\n" | |
1043 | expect { | |
1044 | -re "Execution status of the program..*$prompt $"\ | |
1045 | { pass "help info program" } | |
1046 | -re "$prompt $" { fail "help info program" } | |
1047 | timeout { fail "(timeout) help info program" } | |
1048 | } | |
1049 | ||
1050 | ||
1051 | # test help info registers | |
1052 | send "help info registers\n" | |
1053 | expect { | |
1054 | -re "List of integer registers and their contents, for selected stack frame..* | |
1055 | Register name as argument means describe only that register..*$prompt $"\ | |
1056 | { pass "help info registers" } | |
1057 | -re "$prompt $" { fail "help info registers" } | |
1058 | timeout { fail "(timeout) help info registers" } | |
1059 | } | |
1060 | ||
1061 | ||
1062 | # test help info stack "s" abbreviation | |
1063 | send "help info s\n" | |
1064 | expect { | |
1065 | -re "Backtrace of the stack, or innermost COUNT frames..*$prompt $"\ | |
1066 | { pass "help info stack \"s\" abbreviation" } | |
1067 | -re "$prompt $" { fail "help info stack \"s\" abbreviation" } | |
1068 | timeout { fail "(timeout) help info stack \"s\" abbreviation" } | |
1069 | } | |
1070 | ||
1071 | ||
1072 | # test help info stack | |
1073 | send "help info stack\n" | |
1074 | expect { | |
1075 | -re "Backtrace of the stack, or innermost COUNT frames..*$prompt $"\ | |
1076 | { pass "help info stack" } | |
1077 | -re "$prompt $" { fail "help info stack" } | |
1078 | timeout { fail "(timeout) help info stack" } | |
1079 | } | |
1080 | ||
1081 | ||
1082 | # test help info set | |
1083 | send "help info set\n" | |
1084 | expect { | |
1085 | -re "Show all GDB settings..*$prompt $"\ | |
1086 | { pass "help info set" } | |
1087 | -re "$prompt $" { fail "help info set" } | |
1088 | timeout { fail "(timeout) help info set" } | |
1089 | } | |
1090 | ||
1091 | ||
1092 | # test help info signals | |
1093 | send "help info signals\n" | |
1094 | expect { | |
1095 | -re "What debugger does when program gets various signals.*$prompt $"\ | |
1096 | { pass "help info signals" } | |
1097 | -re "$prompt $" { fail "help info signals" } | |
1098 | timeout { fail "(timeout) help info signals" } | |
1099 | } | |
1100 | ||
1101 | ||
1102 | # test help info source | |
1103 | send "help info source\n" | |
1104 | expect { | |
1105 | -re "Information about the current source file..*$prompt $"\ | |
1106 | { pass "help info source" } | |
1107 | -re "$prompt $" { fail "help info source" } | |
1108 | timeout { fail "(timeout) help aliases" } | |
1109 | } | |
1110 | ||
1111 | ||
1112 | # test help info sources | |
1113 | send "help info sources\n" | |
1114 | expect { | |
1115 | -re "Source files in the program..*$prompt $"\ | |
1116 | { pass "help info sources" } | |
1117 | -re "$prompt $" { fail "help info sources" } | |
1118 | timeout { fail "(timeout) help info sources" } | |
1119 | } | |
1120 | ||
1121 | ||
1122 | # test help info target | |
1123 | send "help info target\n" | |
1124 | expect { | |
1125 | -re "Names of targets and files being debugged..* | |
1126 | Shows the entire stack of targets currently in use .including the exec-file,.* | |
1127 | core-file, and process, if any., as well as the symbol file name..*$prompt $"\ | |
1128 | { pass "help info target" } | |
1129 | -re "$prompt $" { fail "help info target" } | |
1130 | timeout { fail "(timeout) help info target" } | |
1131 | } | |
1132 | ||
1133 | ||
1134 | # test help info terminal | |
1135 | send "help info terminal\n" | |
1136 | expect { | |
1137 | -re "Print inferior's saved terminal status..*$prompt $"\ | |
1138 | { pass "help info terminal" } | |
1139 | -re "$prompt $" { fail "help info terminal" } | |
1140 | timeout { fail "(timeout) help info terminal" } | |
1141 | } | |
1142 | ||
1143 | ||
1144 | # test help info types | |
1145 | send "help info types\n" | |
1146 | expect { | |
1147 | -re "All type names, or those matching REGEXP..*$prompt $"\ | |
1148 | { pass "help info types" } | |
1149 | -re "$prompt $" { fail "help info types" } | |
1150 | timeout { fail "(timeout) help info types" } | |
1151 | } | |
1152 | ||
1153 | ||
1154 | # test help info variables | |
1155 | send "help info variables\n" | |
1156 | expect { | |
1157 | -re "All global and static variable names, or those matching REGEXP..*$prompt $"\ | |
1158 | { pass "help info variables" } | |
1159 | -re "$prompt $" { fail "help info variables" } | |
1160 | timeout { fail "(timeout) help info variables" } | |
1161 | } | |
1162 | ||
1163 | ||
1164 | # test help info warranty | |
1165 | send "help info warranty\n" | |
1166 | expect { | |
1167 | -re "Various kinds of warranty you do not have..*$prompt $"\ | |
1168 | { pass "help info warranty" } | |
1169 | -re "$prompt $" { fail "help info warranty" } | |
1170 | timeout { fail "(timeout) help info warranty" } | |
1171 | } | |
1172 | ||
1173 | ||
1174 | # test help info watchpoints | |
1175 | send "help info watchpoints\n" | |
1176 | expect { | |
1177 | -re "Synonym for ``info breakpoints''..*$prompt $"\ | |
1178 | { pass "help info watchpoints" } | |
1179 | -re "$prompt $" { fail "help info watchpoints" } | |
1180 | timeout { fail "(timeout) help info watchpoints" } | |
1181 | } | |
1182 | ||
1183 | ||
1184 | # test help inspect | |
1185 | send "help inspect\n" | |
1186 | expect { | |
1187 | -re "Same as \"print\" command, except that if you are running in the epoch.* | |
1188 | environment, the value is printed in its own window..*$prompt $"\ | |
1189 | { pass "help inspect" } | |
1190 | -re "$prompt $" { fail "help inspect" } | |
1191 | timeout { fail "(timeout) help inspect" } | |
1192 | } | |
1193 | ||
1194 | ||
1195 | # test help jump | |
1196 | send "help jump\n" | |
1197 | expect { | |
1198 | -re "Continue program being debugged at specified line or address..* | |
1199 | Give as argument either LINENUM or \[*\]+ADDR, where ADDR is an expression.* | |
1200 | for an address to start at..*$prompt $"\ | |
1201 | { pass "help jump" } | |
1202 | -re "$prompt $" { fail "help jump" } | |
1203 | timeout { fail "(timeout) help jump" } | |
1204 | } | |
1205 | ||
1206 | ||
1207 | # test help kill | |
1208 | send "help kill\n" | |
1209 | expect { | |
1210 | -re "Kill execution of program being debugged..*$prompt $"\ | |
1211 | { pass "help kill" } | |
1212 | -re "$prompt $" { fail "help kill" } | |
1213 | timeout { fail "(timeout) help kill" } | |
1214 | } | |
1215 | ||
1216 | ||
1217 | # test help list "l" abbreviation | |
1218 | send "help l\n" | |
1219 | expect { | |
1220 | -re "List specified function or line..* | |
1221 | With no argument, lists ten more lines after or around previous listing..* | |
1222 | \"list -\" lists the ten lines before a previous ten-line listing..* | |
1223 | One argument specifies a line, and ten lines are listed around that line..* | |
1224 | Two arguments with comma between specify starting and ending lines to list..* | |
1225 | Lines can be specified in these ways:.* | |
1226 | LINENUM, to list around that line in current file,.* | |
1227 | FILE:LINENUM, to list around that line in that file,.* | |
1228 | FUNCTION, to list around beginning of that function,.* | |
1229 | FILE:FUNCTION, to distinguish among like-named static functions..* | |
1230 | \[*\]+ADDRESS, to list around the line containing that address..* | |
1231 | With two args if one is empty it stands for ten lines away from the other arg..*$prompt $"\ | |
1232 | { pass "help list \"l\" abbreviation" } | |
1233 | -re "$prompt $" { fail "help list \"l\" abbreviation" } | |
1234 | timeout { fail "(timeout) help list \"l\" abbreviation" } | |
1235 | } | |
1236 | ||
1237 | ||
1238 | # test help list | |
1239 | send "help list\n" | |
1240 | expect { | |
1241 | -re "List specified function or line..* | |
1242 | With no argument, lists ten more lines after or around previous listing..* | |
1243 | \"list -\" lists the ten lines before a previous ten-line listing..* | |
1244 | One argument specifies a line, and ten lines are listed around that line..* | |
1245 | Two arguments with comma between specify starting and ending lines to list..* | |
1246 | Lines can be specified in these ways:.* | |
1247 | LINENUM, to list around that line in current file,.* | |
1248 | FILE:LINENUM, to list around that line in that file,.* | |
1249 | FUNCTION, to list around beginning of that function,.* | |
1250 | FILE:FUNCTION, to distinguish among like-named static functions..* | |
1251 | \[*\]+ADDRESS, to list around the line containing that address..* | |
1252 | With two args if one is empty it stands for ten lines away from the other arg..*$prompt $"\ | |
1253 | { pass "help list" } | |
1254 | -re "$prompt $" { fail "help list" } | |
1255 | timeout { fail "(timeout) help list" } | |
1256 | } | |
1257 | ||
1258 | ||
1259 | # test help load | |
1260 | send "help load\n" | |
1261 | expect { | |
1262 | -re "Dynamically load FILE into the running program, and record its symbols.* | |
1263 | for access from GDB..*$prompt $"\ | |
1264 | { pass "help load" } | |
1265 | -re "$prompt $" { fail "help load" } | |
1266 | timeout { fail "(timeout) help load" } | |
1267 | } | |
1268 | ||
1269 | ||
1270 | # test help make | |
1271 | send "help make\n" | |
1272 | expect { | |
1273 | -re "Run the ``make'' program using the rest of the line as arguments..*$prompt $"\ | |
1274 | { pass "help make" } | |
1275 | -re "$prompt $" { fail "help make" } | |
1276 | timeout { fail "(timeout) help make" } | |
1277 | } | |
1278 | ||
1279 | ||
1280 | # test help next "n" abbreviation | |
1281 | send "help n\n" | |
1282 | expect { | |
1283 | -re "Step program, proceeding through subroutine calls..* | |
1284 | Like the \"step\" command as long as subroutine calls do not happen;.* | |
1285 | when they do, the call is treated as one instruction..* | |
1286 | Argument N means do this N times .or till program stops for another reason...*$prompt $"\ | |
1287 | { pass "help next \"n\" abbreviation" } | |
1288 | -re "$prompt $" { fail "help next \"n\" abbreviation" } | |
1289 | timeout { fail "(timeout) help next \"n\" abbreviation" } | |
1290 | } | |
1291 | ||
1292 | ||
1293 | # test help next | |
1294 | send "help next\n" | |
1295 | expect { | |
1296 | -re "Step program, proceeding through subroutine calls..* | |
1297 | Like the \"step\" command as long as subroutine calls do not happen;.* | |
1298 | when they do, the call is treated as one instruction..* | |
1299 | Argument N means do this N times .or till program stops for another reason...*$prompt $"\ | |
1300 | { pass "help next" } | |
1301 | -re "$prompt $" { fail "help next" } | |
1302 | timeout { fail "(timeout) help next" } | |
1303 | } | |
1304 | ||
1305 | ||
1306 | # test help nexti | |
1307 | send "help ni\n" | |
1308 | expect { | |
1309 | -re "Step one instruction, but proceed through subroutine calls..* | |
1310 | Argument N means do this N times .or till program stops for another reason...*$prompt $"\ | |
1311 | { pass "help nexti" } | |
1312 | -re "$prompt $" { fail "help nexti" } | |
1313 | timeout { fail "(timeout) help nexti" } | |
1314 | } | |
1315 | ||
1316 | ||
1317 | # all the commands that used to be here are now in "maintainance" instead | |
1318 | # test help obscure | |
1319 | send "help obscure\n" | |
1320 | expect { | |
1321 | -re "Obscure features..* | |
1322 | List of commands:.* | |
1323 | Type \"help\" followed by command name for full documentation..* | |
1324 | Command name abbreviations are allowed if unambiguous..*$prompt $"\ | |
1325 | { pass "help obscure" } | |
1326 | -re "$prompt $" { fail "help obscure" } | |
1327 | timeout { fail "(timeout) help obscure" } | |
1328 | } | |
1329 | ||
1330 | ||
1331 | # test help output | |
1332 | send "help output\n" | |
1333 | expect { | |
1334 | -re "Like \"print\" but don't put in value history and don't print newline..* | |
1335 | This is useful in user-defined commands..*$prompt $"\ | |
1336 | { pass "help output" } | |
1337 | -re "$prompt $" { fail "help output" } | |
1338 | timeout { fail "(timeout) help output" } | |
1339 | } | |
1340 | ||
1341 | ||
1342 | # test help print "p" abbreviation | |
1343 | send "help p\n" | |
1344 | expect { | |
1345 | -re "Print value of expression EXP..* | |
1346 | Variables accessible are those of the lexical environment of the selected.* | |
1347 | EXP may be preceded with /FMT, where FMT is a format letter.* | |
1348 | but no count or size letter .see \"x\" command...*$prompt $"\ | |
1349 | { pass "help print \"p\" abbreviation" } | |
1350 | -re "$prompt $" { fail "help print \"p\" abbreviation" } | |
1351 | timeout { fail "(timeout) help print \"p\" abbreviation" } | |
1352 | } | |
1353 | ||
1354 | ||
1355 | # test help print | |
1356 | send "help print\n" | |
1357 | expect { | |
1358 | -re "Print value of expression EXP..* | |
1359 | Variables accessible are those of the lexical environment of the selected.* | |
1360 | EXP may be preceded with /FMT, where FMT is a format letter.* | |
1361 | but no count or size letter .see \"x\" command...*$prompt $"\ | |
1362 | { pass "help print" } | |
1363 | -re "$prompt $" { fail "help print" } | |
1364 | timeout { fail "(timeout) help print" } | |
1365 | } | |
1366 | ||
1367 | ||
1368 | # test help path | |
1369 | send "help path\n" | |
1370 | expect { | |
1371 | -re "Add directory DIR.s. to beginning of search path for object files..* | |
1372 | .cwd in the path means the current working directory..* | |
1373 | This path is equivalent to the .PATH shell variable. It is a list of.* | |
1374 | directories, separated by colons. These directories are searched to find.* | |
1375 | fully linked executable files and separately compiled object files as needed..*$prompt $"\ | |
1376 | { pass "help path" } | |
1377 | -re "$prompt $" { fail "help path" } | |
1378 | timeout { fail "(timeout) help path" } | |
1379 | } | |
1380 | ||
1381 | ||
1382 | # test help printcmds | |
1383 | send "help printcmds\n" | |
1384 | expect { | |
1385 | -re "Undefined command: \"printcmds\". Try \"help\"..*$prompt $"\ | |
1386 | { pass "help printcmds" } | |
1387 | -re "$prompt $" { fail "help printcmds" } | |
1388 | timeout { fail "(timeout) help printcmds" } | |
1389 | } | |
1390 | ||
1391 | ||
1392 | # test help printf | |
1393 | send "help printf\n" | |
1394 | expect { | |
1395 | -re "printf \"printf format string\", arg1, arg2, arg3, ..., argn.* | |
1396 | This is useful for formatted output in user-defined commands..*$prompt $"\ | |
1397 | { pass "help printf" } | |
1398 | -re "$prompt $" { fail "help printf" } | |
1399 | timeout { fail "(timeout) help printf" } | |
1400 | } | |
1401 | ||
1402 | ||
1403 | # this command doesn't exist in GDB 4.5.8 | |
1404 | # test help printsyms | |
1405 | #send "help printsyms\n" | |
1406 | #expect { | |
1407 | # -re "Print dump of current symbol definitions to file OUTFILE..* | |
1408 | #If a SOURCE file is specified, dump only that file's symbols..*$prompt $"\ | |
1409 | # { pass "help printsyms" } | |
1410 | # -re "$prompt $" { fail "help printsyms" } | |
1411 | # timeout { fail "(timeout) help printsyms" } | |
1412 | # } | |
1413 | ||
1414 | # test help ptype | |
1415 | send "help ptype\n" | |
1416 | expect { | |
1417 | -re "Print definition of type.*$prompt $"\ | |
1418 | { pass "help ptype" } | |
1419 | -re "$prompt $" { fail "help ptype" } | |
1420 | timeout { fail "(timeout) help ptype" } | |
1421 | } | |
1422 | ||
1423 | ||
1424 | # test help pwd | |
1425 | send "help pwd\n" | |
1426 | expect { | |
1427 | -re "Print working directory. This is used for your program as well..*$prompt $"\ | |
1428 | { pass "help pwd" } | |
1429 | -re "$prompt $" { fail "help pwd" } | |
1430 | timeout { fail "(timeout) help pwd" } | |
1431 | } | |
1432 | ||
1433 | ||
1434 | # test help quit "q" abbreviation | |
1435 | send "help q\n" | |
1436 | expect { | |
1437 | -re "Exit gdb..*$prompt $"\ | |
1438 | { pass "help quit \"q\" abbreviation" } | |
1439 | -re "$prompt $" { fail "help quit \"q\" abbreviation" } | |
1440 | timeout { fail "(timeout) help quit \"q\" abbreviation" } | |
1441 | } | |
1442 | ||
1443 | ||
1444 | # test help quit | |
1445 | send "help quit\n" | |
1446 | expect { | |
1447 | -re "Exit gdb..*$prompt $"\ | |
1448 | { pass "help quit" } | |
1449 | -re "$prompt $" { fail "help quit" } | |
1450 | timeout { fail "(timeout) help quit" } | |
1451 | } | |
1452 | ||
1453 | ||
1454 | # test help run "r" abbreviation | |
1455 | send "help r\n" | |
1456 | expect { | |
1457 | -re "Start debugged program. You may specify arguments to give it..* | |
1458 | Args may include .*, or .*; they are expanded using \"sh\"..* | |
1459 | Input and output redirection with \".\", \".\", or \"..\" are also allowed..* | |
1460 | With no arguments, uses arguments last specified .with \"run\" or \"set args\"...* | |
1461 | To cancel previous arguments and run with no arguments,.* | |
1462 | use \"set args\" without arguments..*$prompt $"\ | |
1463 | { pass "help run \"r\" abbreviation" } | |
1464 | -re "$prompt $" { fail "help run \"r\" abbreviation" } | |
1465 | timeout { fail "(timeout) help run \"r\" abbreviation" } | |
1466 | } | |
1467 | ||
1468 | ||
1469 | # test help run | |
1470 | send "help run\n" | |
1471 | expect { | |
1472 | -re "Start debugged program. You may specify arguments to give it..* | |
1473 | Args may include .*, or .*; they are expanded using \"sh\"..* | |
1474 | Input and output redirection with \".\", \".\", or \"..\" are also allowed..* | |
1475 | With no arguments, uses arguments last specified .with \"run\" or \"set args\"...* | |
1476 | To cancel previous arguments and run with no arguments,.* | |
1477 | use \"set args\" without arguments..*$prompt $"\ | |
1478 | { pass "help run" } | |
1479 | -re "$prompt $" { fail "help run" } | |
1480 | timeout { fail "(timeout) help run" } | |
1481 | } | |
1482 | ||
1483 | ||
1484 | # test help rbreak | |
1485 | send "help rbreak\n" | |
1486 | expect { | |
1487 | -re "Set a breakpoint for all functions matching REGEXP..*$prompt $"\ | |
1488 | { pass "help rbreak" } | |
1489 | -re "$prompt $" { fail "help rbreak" } | |
1490 | timeout { fail "(timeout) help rbreak" } | |
1491 | } | |
1492 | ||
1493 | ||
1494 | # test help return | |
1495 | send "help return\n" | |
1496 | expect { | |
1497 | -re "Make selected stack frame return to its caller..* | |
1498 | Control remains in the debugger, but when you continue.* | |
1499 | execution will resume in the frame above the one now selected..* | |
1500 | If an argument is given, it is an expression for the value to return..*$prompt $"\ | |
1501 | { pass "help return" } | |
1502 | -re "$prompt $" { fail "help return" } | |
1503 | timeout { fail "(timeout) help return" } | |
1504 | } | |
1505 | ||
1506 | ||
1507 | # test help reverse-search | |
1508 | send "help reverse-search\n" | |
1509 | expect { | |
1510 | -re "Search backward for regular expression .see regex.3.. from last line listed..*$prompt $"\ | |
1511 | { pass "help reverse-search" } | |
1512 | -re "$prompt $" { fail "help reverse-search" } | |
1513 | timeout { fail "(timeout) help reverse-search" } | |
1514 | } | |
1515 | ||
1516 | ||
1517 | # test help running | |
1518 | send "help running\n" | |
1519 | expect { | |
1520 | -re "Running the program..* | |
1521 | List of commands:.* | |
1522 | Type \"help\" followed by command name for full documentation..* | |
1523 | Command name abbreviations are allowed if unambiguous..*$prompt $"\ | |
1524 | { pass "help running" } | |
1525 | -re "$prompt $" { fail "help running" } | |
1526 | timeout { fail "(timeout) help running" } | |
1527 | } | |
1528 | ||
1529 | ||
1530 | # test help step "s" abbreviation | |
1531 | send "help s\n" | |
1532 | expect { | |
1533 | -re "Step program until it reaches a different source line..* | |
1534 | Argument N means do this N times .or till program stops for another reason...*$prompt $"\ | |
1535 | { pass "help step \"s\" abbreviation" } | |
1536 | -re "$prompt $" { fail "help step \"s\" abbreviation" } | |
1537 | timeout { fail "(timeout) help step \"s\" abbreviation" } | |
1538 | } | |
1539 | ||
1540 | ||
1541 | # test help step | |
1542 | send "help step\n" | |
1543 | expect { | |
1544 | -re "Step program until it reaches a different source line..* | |
1545 | Argument N means do this N times .or till program stops for another reason...*$prompt $"\ | |
1546 | { pass "help step" } | |
1547 | -re "$prompt $" { fail "help step" } | |
1548 | timeout { fail "(timeout) help step" } | |
1549 | } | |
1550 | ||
1551 | ||
1552 | # test help search | |
1553 | send "help search\n" | |
1554 | expect { | |
1555 | -re "Search for regular expression .see regex.3.. from last line listed..*$prompt $"\ | |
1556 | { pass "help search" } | |
1557 | -re "$prompt $" { fail "help search" } | |
1558 | timeout { fail "(timeout) help search" } | |
1559 | } | |
1560 | ||
1561 | ||
1562 | # test help section | |
1563 | send "help section\n" | |
1564 | expect { | |
1565 | -re "Change the base address of section SECTION of the exec file to ADDR..* | |
1566 | This can be used if the exec file does not contain section addresses,.* | |
1567 | .such as in the a.out format., or when the addresses specified in the.* | |
1568 | file itself are wrong. Each section must be changed separately. The.* | |
1569 | ``info files'' command lists all the sections and their addresses..*$prompt $"\ | |
1570 | { pass "help section" } | |
1571 | -re "$prompt $" { fail "help section" } | |
1572 | timeout { fail "(timeout) help section" } | |
1573 | } | |
1574 | ||
1575 | ||
1576 | # test help set args | |
1577 | send "help set args\n" | |
1578 | expect { | |
1579 | -re "Set arguments to give program being debugged when it is started..* | |
1580 | Follow this command with any number of args, to be passed to the program..*$prompt $"\ | |
1581 | { pass "help set args" } | |
1582 | -re "$prompt $" { fail "help set args" } | |
1583 | timeout { fail "(timeout) help set args" } | |
1584 | } | |
1585 | ||
1586 | ||
1587 | # test help set check "c" abbreviation | |
1588 | send "help set c\n" | |
1589 | expect { | |
1590 | -re "Set the status of the type/range checker.* | |
1591 | List of set check subcommands:.* | |
1592 | set check range -- Set range checking.* | |
1593 | set check type -- Set type checking.* | |
1594 | Type \"help set check\" followed by set check subcommand name for full documentation..* | |
1595 | Command name abbreviations are allowed if unambiguous..*$prompt $"\ | |
1596 | { pass "help set check \"c\" abbreviation" } | |
1597 | -re "$prompt $" { fail "help set check \"c\" abbreviation" } | |
1598 | timeout { fail "(timeout) help set check \"c\" abbreviation" } | |
1599 | } | |
1600 | ||
1601 | ||
1602 | # test help set check "ch" abbreviation | |
1603 | send "help set ch\n" | |
1604 | expect { | |
1605 | -re "Set the status of the type/range checker.* | |
1606 | List of set check subcommands:.* | |
1607 | set check range -- Set range checking.* | |
1608 | set check type -- Set type checking.* | |
1609 | Type \"help set check\" followed by set check subcommand name for full documentation..* | |
1610 | Command name abbreviations are allowed if unambiguous..*$prompt $"\ | |
1611 | { pass "help set check \"ch\" abbreviation" } | |
1612 | -re "$prompt $" { fail "help set check \"ch\" abbreviation" } | |
1613 | timeout { fail "(timeout) help set check \"ch\" abbreviation" } | |
1614 | } | |
1615 | ||
1616 | ||
1617 | # test help set check | |
1618 | send "help set check\n" | |
1619 | expect { | |
1620 | -re "Set the status of the type/range checker.* | |
1621 | List of set check subcommands:.* | |
1622 | set check range -- Set range checking.* | |
1623 | set check type -- Set type checking.* | |
1624 | Type \"help set check\" followed by set check subcommand name for full documentation..* | |
1625 | Command name abbreviations are allowed if unambiguous..*$prompt $"\ | |
1626 | { pass "help set check" } | |
1627 | -re "$prompt $" { fail "help set check" } | |
1628 | timeout { fail "(timeout) help set check" } | |
1629 | } | |
1630 | ||
1631 | ||
1632 | # test help set check range | |
1633 | send "help set check range\n" | |
1634 | expect { | |
1635 | -re "Set range checking. .on/warn/off/auto..*$prompt $"\ | |
1636 | { pass "help set check range" } | |
1637 | -re "$prompt $" { fail "help set check range" } | |
1638 | timeout { fail "(timeout) help set check range" } | |
1639 | } | |
1640 | ||
1641 | ||
1642 | # test help set check type | |
1643 | send "help set check type\n" | |
1644 | expect { | |
1645 | -re "Set type checking. .on/warn/off/auto..*$prompt $"\ | |
1646 | { pass "help set check type" } | |
1647 | -re "$prompt $" { fail "help set check type" } | |
1648 | timeout { fail "(timeout) help set check type" } | |
1649 | } | |
1650 | ||
1651 | ||
1652 | # test help set complaints | |
1653 | send "help set complaints\n" | |
1654 | expect { | |
1655 | -re "Set max number of complaints about incorrect symbols..*$prompt $"\ | |
1656 | { pass "help set complaints" } | |
1657 | -re "$prompt $" { fail "help set complaints" } | |
1658 | timeout { fail "(timeout) help set complaints" } | |
1659 | } | |
1660 | ||
1661 | ||
1662 | # test help set confirm | |
1663 | send "help set confirm\n" | |
1664 | expect { | |
1665 | -re "Set whether to confirm potentially dangerous operations..*$prompt $"\ | |
1666 | { pass "help set confirm" } | |
1667 | -re "$prompt $" { fail "help set confirm" } | |
1668 | timeout { fail "(timeout) help set confirm" } | |
1669 | } | |
1670 | ||
1671 | ||
1672 | # test help set editing | |
1673 | send "help set editing\n" | |
1674 | expect { | |
1675 | -re "Set editing of command lines as they are typed..* | |
1676 | Use \"on\" to enable to enable the editing, and \"off\" to disable it..* | |
1677 | Without an argument, command line editing is enabled. To edit, use.* | |
1678 | EMACS-like or VI-like commands like control-P or ESC..*$prompt $"\ | |
1679 | { pass "help set editing" } | |
1680 | -re "$prompt $" { fail "help set editing" } | |
1681 | timeout { fail "(timeout) help set editing" } | |
1682 | } | |
1683 | ||
1684 | ||
1685 | # test help set environment | |
1686 | send "help set environment\n" | |
1687 | expect { | |
1688 | -re "Set environment variable value to give the program..* | |
1689 | Arguments are VAR VALUE where VAR is variable name and VALUE is value..* | |
1690 | VALUES of environment variables are uninterpreted strings..* | |
1691 | This does not affect the program until the next \"run\" command..*$prompt $"\ | |
1692 | { pass "help set environment" } | |
1693 | -re "$prompt $" { fail "help set environment" } | |
1694 | timeout { fail "(timeout) help set environment" } | |
1695 | } | |
1696 | ||
1697 | ||
1698 | # test help set height | |
1699 | send "help set height\n" | |
1700 | expect { | |
1701 | -re "Set number of lines gdb thinks are in a page..*$prompt $"\ | |
1702 | { pass "help set height" } | |
1703 | -re "$prompt $" { fail "help set height" } | |
1704 | timeout { fail "(timeout) help set height" } | |
1705 | } | |
1706 | ||
1707 | ||
1708 | # test help set history expansion | |
1709 | send "help set history expansion\n" | |
1710 | expect { | |
1711 | -re "Set history expansion on command input..* | |
1712 | Without an argument, history expansion is enabled..*$prompt $"\ | |
1713 | { pass "help set history expansion" } | |
1714 | -re "$prompt $" { fail "help set history expansion" } | |
1715 | timeout { fail "(timeout) help set history expansion" } | |
1716 | } | |
1717 | ||
1718 | ||
1719 | # test help set history filename | |
1720 | send "help set history filename\n" | |
1721 | expect { | |
1722 | -re "Set the filename in which to record the command history.* | |
1723 | .the list of previous commands of which a record is kept...*$prompt $"\ | |
1724 | { pass "help set history filename" } | |
1725 | -re "$prompt $" { fail "help set history filename" } | |
1726 | timeout { fail "(timeout) help set history filename" } | |
1727 | } | |
1728 | ||
1729 | ||
1730 | # test help set history save | |
1731 | send "help set history save\n" | |
1732 | expect { | |
1733 | -re "Set saving of the history record on exit..* | |
1734 | Use \"on\" to enable to enable the saving, and \"off\" to disable it..* | |
1735 | Without an argument, saving is enabled..*$prompt $"\ | |
1736 | { pass "help set history save" } | |
1737 | -re "$prompt $" { fail "help set history save" } | |
1738 | timeout { fail "(timeout) help set history save" } | |
1739 | } | |
1740 | ||
1741 | ||
1742 | # test help set history size | |
1743 | send "help set history size\n" | |
1744 | expect { | |
1745 | -re "Set the size of the command history, .* | |
1746 | ie. the number of previous commands to keep a record of..*$prompt $"\ | |
1747 | { pass "help set history size" } | |
1748 | -re "$prompt $" { fail "help set history size" } | |
1749 | timeout { fail "(timeout) help set history size" } | |
1750 | } | |
1751 | ||
1752 | ||
1753 | # test help set history | |
1754 | send "help set history\n" | |
1755 | expect { | |
1756 | -re "Generic command for setting command history parameters..* | |
1757 | List of set history subcommands:.* | |
1758 | set history filename -- Set the filename in which to record the command history.* | |
1759 | set history size -- Set the size of the command history.* | |
1760 | set history save -- Set saving of the history record on exit.* | |
1761 | set history expansion -- Set history expansion on command input.* | |
1762 | Type \"help set history\" followed by set history subcommand name for full documentation..* | |
1763 | Command name abbreviations are allowed if unambiguous..*$prompt $"\ | |
1764 | { pass "help set history" } | |
1765 | -re "$prompt $" { fail "help set history" } | |
1766 | timeout { fail "(timeout) help set history" } | |
1767 | } | |
1768 | ||
1769 | ||
1770 | # test help set language | |
1771 | send "help set language\n" | |
1772 | expect { | |
1773 | -re "Set the current source language..*$prompt $"\ | |
1774 | { pass "help set language" } | |
1775 | -re "$prompt $" { fail "help set language" } | |
1776 | timeout { fail "(timeout) help set language" } | |
1777 | } | |
1778 | ||
1779 | ||
1780 | # test help set listsize | |
1781 | send "help set listsize\n" | |
1782 | expect { | |
1783 | -re "Set number of source lines gdb will list by default..*$prompt $"\ | |
1784 | { pass "help set listsize" } | |
1785 | -re "$prompt $" { fail "help set listsize" } | |
1786 | timeout { fail "(timeout) help set listsize" } | |
1787 | } | |
1788 | ||
1789 | ||
1790 | # test help set print "p" abbreviation | |
1791 | # FIXME -- Ultrix hangs randomly on this very long output from gdb and | |
1792 | # continues with its output only if something is sent to gdb. | |
1793 | # This behaviour throws expect and gdb out of sync, so we better skip this | |
1794 | # test. | |
1795 | # Also, if the system is slow, it may time out because the output is large. | |
1796 | # Just skip the test rather than bothering with increasing the timeout. | |
1797 | if 0 then { | |
1798 | send "help set p\n" | |
1799 | expect { | |
1800 | -re ".* | |
1801 | Generic command for setting how things print..* | |
1802 | List of set print subcommands:.* | |
1803 | Type \"help set print\" followed by set print subcommand name for full documentation..* | |
1804 | Command name abbreviations are allowed if unambiguous..*$prompt $"\ | |
1805 | { pass "help set print \"p\" abbreviatio" } | |
1806 | -re "$prompt $" { fail "help set print \"p\" abbreviatio" } | |
1807 | timeout { fail "(timeout) help set print \"p\" abbreviatio" } | |
1808 | } | |
1809 | ||
1810 | # test help set print "pr" abbreviation | |
1811 | send "help set pr\n" | |
1812 | expect { | |
1813 | -re ".* | |
1814 | Generic command for setting how things print..* | |
1815 | List of set print subcommands:.* | |
1816 | Type \"help set print\" followed by set print subcommand name for full documentation..* | |
1817 | Command name abbreviations are allowed if unambiguous..*$prompt $"\ | |
1818 | { pass "help set print \"pr\" abbreviation" } | |
1819 | -re "$prompt $" { fail "help set print \"pr\" abbreviation" } | |
1820 | timeout { fail "(timeout) help set print \"pr\" abbreviation" } | |
1821 | } | |
1822 | ||
1823 | ||
1824 | # test help set print | |
1825 | send "help set print\n" | |
1826 | expect { | |
1827 | -re ".* | |
1828 | Generic command for setting how things print..* | |
1829 | List of set print subcommands:.* | |
1830 | Type \"help set print\" followed by set print subcommand name for full documentation..* | |
1831 | Command name abbreviations are allowed if unambiguous..*$prompt $"\ | |
1832 | { pass "help set print" } | |
1833 | -re "$prompt $" { fail "help set print" } | |
1834 | timeout { fail "(timeout) help set print" } | |
1835 | } | |
1836 | } | |
1837 | ||
1838 | # test help set print address | |
1839 | send "help set print address\n" | |
1840 | expect { | |
1841 | -re "Set printing of addresses..*$prompt $"\ | |
1842 | { pass "help set print address" } | |
1843 | -re "$prompt $" { fail "help set print address" } | |
1844 | timeout { fail "(timeout) help set print address" } | |
1845 | } | |
1846 | ||
1847 | ||
1848 | # test help set print array | |
1849 | send "help set print array\n" | |
1850 | expect { | |
1851 | -re "Set prettyprinting of arrays..*$prompt $"\ | |
1852 | { pass "help set print array" } | |
1853 | -re "$prompt $" { fail "help set print array" } | |
1854 | timeout { fail "(timeout) help set print array" } | |
1855 | } | |
1856 | ||
1857 | ||
1858 | # test help set print asm-demangle | |
1859 | send "help set print asm-demangle\n" | |
1860 | expect { | |
1861 | -re "Set demangling of C\[+\]+ names in disassembly listings..*$prompt $"\ | |
1862 | { pass "help set print asm-demangle" } | |
1863 | -re "$prompt $" { fail "help set print asm-demangle" } | |
1864 | timeout { fail "(timeout) help set print asm-demangle" } | |
1865 | } | |
1866 | ||
1867 | ||
1868 | # test help set print demangle | |
1869 | send "help set print demangle\n" | |
1870 | expect { | |
1871 | -re "Set demangling of encoded C\[+\]+ names when displaying symbols..*$prompt $"\ | |
1872 | { pass "help set print demangle" } | |
1873 | -re "$prompt $" { fail "help set print demangle" } | |
1874 | timeout { fail "(timeout) help set print demangle" } | |
1875 | } | |
1876 | ||
1877 | ||
1878 | # test help set print elements | |
1879 | send "help set print elements\n" | |
1880 | expect { | |
1881 | -re "Set limit on string chars or array elements to print..* | |
1882 | \"set print elements 0\" causes there to be no limit..*$prompt $"\ | |
1883 | { pass "help set print elements" } | |
1884 | -re "$prompt $" { fail "help set print elements" } | |
1885 | timeout { fail "(timeout) help set print elements" } | |
1886 | } | |
1887 | ||
1888 | ||
1889 | # test help set print object | |
1890 | send "help set print object\n" | |
1891 | expect { | |
1892 | -re "Set printing of object's derived type based on vtable info..*$prompt $"\ | |
1893 | { pass "help set print object" } | |
1894 | -re "$prompt $" { fail "help set print object" } | |
1895 | timeout { fail "(timeout) help set print object" } | |
1896 | } | |
1897 | ||
1898 | ||
1899 | # test help set print pretty | |
1900 | send "help set print pretty\n" | |
1901 | expect { | |
1902 | -re "Set prettyprinting of structures..*$prompt $"\ | |
1903 | { pass "help set print pretty" } | |
1904 | -re "$prompt $" { fail "help set print pretty" } | |
1905 | timeout { fail "(timeout) help set print pretty" } | |
1906 | } | |
1907 | ||
1908 | ||
1909 | # test help set print sevenbit-strings | |
1910 | send "help set print sevenbit-strings\n" | |
1911 | expect { | |
1912 | -re "Set printing of 8-bit characters in strings as .nnn..*$prompt $"\ | |
1913 | { pass "help set print sevenbit-strings" } | |
1914 | -re "$prompt $" { fail "help set print sevenbit-strings" } | |
1915 | timeout { fail "(timeout) help set print sevenbit-strings" } | |
1916 | } | |
1917 | ||
1918 | ||
1919 | # test help set print union | |
1920 | send "help set print union\n" | |
1921 | expect { | |
1922 | -re "Set printing of unions interior to structures..*$prompt $"\ | |
1923 | { pass "help set print union" } | |
1924 | -re "$prompt $" { fail "help set print union" } | |
1925 | timeout { fail "(timeout) help set print union" } | |
1926 | } | |
1927 | ||
1928 | ||
1929 | # test help set print vtbl | |
1930 | send "help set print vtbl\n" | |
1931 | expect { | |
1932 | -re "Set printing of C\[+\]+ virtual function tables..*$prompt $"\ | |
1933 | { pass "help set print vtbl" } | |
1934 | -re "$prompt $" { fail "help set print vtbl" } | |
1935 | timeout { fail "(timeout) help set print vtbl" } | |
1936 | } | |
1937 | ||
1938 | ||
1939 | # test help set prompt | |
1940 | send "help set prompt\n" | |
1941 | expect { | |
1942 | -re "Set gdb's prompt.*$prompt $"\ | |
1943 | { pass "help set prompt" } | |
1944 | -re "$prompt $" { fail "help set prompt" } | |
1945 | timeout { fail "(timeout) help set prompt" } | |
1946 | } | |
1947 | ||
1948 | ||
1949 | # test help set radix | |
1950 | send "help set radix\n" | |
1951 | expect { | |
1952 | -re "Set default input and output number radices.* | |
1953 | Use \'set input-radix\' or \'set output-radix\' to independently set each..* | |
1954 | Without an argument, sets both radices back to the default value of 10..* | |
1955 | .*$prompt $"\ | |
1956 | { pass "help set radix" } | |
1957 | -re "Set default input and output number radix..*$prompt $"\ | |
1958 | { fail "help set radix (obsolete radix support)" } | |
1959 | -re "$prompt $" { fail "help set radix" } | |
1960 | timeout { fail "(timeout) help set radix" } | |
1961 | } | |
1962 | ||
1963 | ||
1964 | # test help set symbol-reloading | |
1965 | send "help set symbol-reloading\n" | |
1966 | expect { | |
1967 | -re "Set dynamic symbol table reloading multiple times in one run..*$prompt $"\ | |
1968 | { pass "help set symbol-reloading" } | |
1969 | -re "$prompt $" { fail "help set symbol-reloading" } | |
1970 | timeout { fail "(timeout) help set symbol-reloading" } | |
1971 | } | |
1972 | ||
1973 | ||
1974 | # test help set variable | |
1975 | send "help set variable\n" | |
1976 | expect { | |
1977 | -re ".* | |
1978 | Evaluate expression EXP and assign result to variable VAR, using assignment.* | |
1979 | syntax appropriate for the current language .VAR = EXP or VAR := EXP for.* | |
1980 | example.. VAR may be a debugger \"convenience\" variable .names starting.* | |
1981 | with \\\$., a register .a few standard names starting with \\\$., or an actual.* | |
1982 | variable in the program being debugged. EXP is any valid expression.* | |
1983 | This may usually be abbreviated to simply \"set\"..*$prompt $"\ | |
1984 | { pass "help set variable" } | |
1985 | -re "$prompt $" { fail "help set variable" } | |
1986 | timeout { fail "(timeout) help set variable" } | |
1987 | } | |
1988 | ||
1989 | ||
1990 | # test help set verbose | |
1991 | send "help set verbose\n" | |
1992 | expect { | |
1993 | -re "Set verbosity..*$prompt $"\ | |
1994 | { pass "help set verbose" } | |
1995 | -re "Set verbose printing of informational messages.*$prompt $"\ | |
1996 | { pass "help set verbose. FIXME" } | |
1997 | -re "$prompt $" { fail "help set verbose" } | |
1998 | timeout { fail "(timeout) help set verbose" } | |
1999 | } | |
2000 | ||
2001 | ||
2002 | #test help set width | |
2003 | send "help set width\n" | |
2004 | expect { | |
2005 | -re "Set number of characters gdb thinks are in a line..*$prompt $"\ | |
2006 | { pass "help set width" } | |
2007 | -re "$prompt $" { fail "help set width" } | |
2008 | timeout { fail "(timeout) help set width" } | |
2009 | } | |
2010 | ||
2011 | ||
2012 | # test help set write | |
2013 | # This is only supported on targets which use exec.o. | |
2014 | if ![istarget "rs6000-*-*"] then { | |
2015 | send "help set write\n" | |
2016 | expect { | |
2017 | -re "Set writing into executable and core files..*$prompt $"\ | |
2018 | { pass "help set write" } | |
2019 | -re "$prompt $" { fail "help set write" } | |
2020 | timeout { fail "(timeout) help set write" } | |
2021 | } | |
2022 | } | |
2023 | ||
2024 | # test help set | |
2025 | # FIXME -- Ultrix hangs randomly on this very long output from gdb and | |
2026 | # continues with its output only if something is sent to gdb. | |
2027 | # This behaviour throws expect and gdb out of sync, so we better skip this | |
2028 | # test. | |
2029 | # Also, if the system is slow, it may time out because the output is large. | |
2030 | # Just skip the test rather than bothering with increasing the timeout. | |
2031 | if 0 then { | |
2032 | if ![istarget "*-*-ultrix*"] then { | |
2033 | send "help set\n" | |
2034 | expect { | |
2035 | -re ".* | |
2036 | Evaluate expression EXP and assign result to variable VAR, using assignment.* | |
2037 | syntax appropriate for the current language .VAR = EXP or VAR := EXP for.* | |
2038 | example.. VAR may be a debugger \"convenience\" variable .names starting.* | |
2039 | with \\\$., a register .a few standard names starting with \\\$., or an actual.* | |
2040 | variable in the program being debugged. EXP is any valid expression.* | |
2041 | set listsize -- Set number of source lines gdb will list by default.* | |
2042 | Type \"help set\" followed by set subcommand name for full documentation..* | |
2043 | Command name abbreviations are allowed if unambiguous..* | |
2044 | $prompt $"\ | |
2045 | { pass "help set" } | |
2046 | -re "$prompt $" { fail "help set" } | |
2047 | timeout { fail "(timeout) help set" } | |
2048 | } | |
2049 | } | |
2050 | } | |
2051 | ||
2052 | # test help shell | |
2053 | send "help shell\n" | |
2054 | expect { | |
2055 | -re "Execute the rest of the line as a shell command. .* | |
2056 | With no arguments, run an inferior shell..*$prompt $"\ | |
2057 | { pass "help shell" } | |
2058 | -re "$prompt $" { fail "help shell" } | |
2059 | timeout { fail "(timeout) help shell" } | |
2060 | } | |
2061 | ||
2062 | ||
2063 | # test help show args | |
2064 | send "help show args\n" | |
2065 | expect { | |
2066 | -re "Show arguments to give program being debugged when it is started..* | |
2067 | Follow this command with any number of args, to be passed to the program..*$prompt $"\ | |
2068 | { pass "help show args" } | |
2069 | -re "$prompt $" { fail "help show args" } | |
2070 | timeout { fail "(timeout) help show args" } | |
2071 | } | |
2072 | ||
2073 | ||
2074 | # test help show check "c" abbreviation | |
2075 | send "help show c\n" | |
2076 | expect { | |
2077 | -re "Show the status of the type/range checker.* | |
2078 | List of show check subcommands:.* | |
2079 | show check range -- Show range checking.* | |
2080 | show check type -- Show type checking.* | |
2081 | Type \"help show check\" followed by show check subcommand name for full documentation..* | |
2082 | Command name abbreviations are allowed if unambiguous..*$prompt $"\ | |
2083 | { pass "help show check \"c\" abbreviation" } | |
2084 | -re "$prompt $" { fail "help show check \"c\" abbreviation" } | |
2085 | timeout { fail "(timeout) help show check \"c\" abbreviation" } | |
2086 | } | |
2087 | ||
2088 | ||
2089 | # test help show check | |
2090 | send "help show check\n" | |
2091 | expect { | |
2092 | -re "Show the status of the type/range checker.* | |
2093 | List of show check subcommands:.* | |
2094 | show check range -- Show range checking.* | |
2095 | show check type -- Show type checking.* | |
2096 | Type \"help show check\" followed by show check subcommand name for full documentation..* | |
2097 | Command name abbreviations are allowed if unambiguous..*$prompt $"\ | |
2098 | { pass "help show check" } | |
2099 | -re "$prompt $" { fail "help show check" } | |
2100 | timeout { fail "(timeout) help show check" } | |
2101 | } | |
2102 | ||
2103 | ||
2104 | # test help show check range | |
2105 | send "help show check range\n" | |
2106 | expect { | |
2107 | -re "Show range checking. .on/warn/off/auto..*$prompt $"\ | |
2108 | { pass "help show check range" } | |
2109 | -re "$prompt $" { fail "help show check range" } | |
2110 | timeout { fail "(timeout) help show check range" } | |
2111 | } | |
2112 | ||
2113 | ||
2114 | # test help show check type | |
2115 | send "help show check type\n" | |
2116 | expect { | |
2117 | -re "Show type checking. .on/warn/off/auto..*$prompt $"\ | |
2118 | { pass "help show check type" } | |
2119 | -re "$prompt $" { fail "help show check type" } | |
2120 | timeout { fail "(timeout) help show check type" } | |
2121 | } | |
2122 | ||
2123 | ||
2124 | # test help show commands | |
2125 | send "help show commands\n" | |
2126 | expect { | |
2127 | -re "Show the the history of commands you typed..* | |
2128 | You can supply a command number to start with, or a `\[+\]' to start after.* | |
2129 | the previous command number shown..*$prompt $"\ | |
2130 | { pass "help show commands" } | |
2131 | -re "$prompt $" { fail "help show commands" } | |
2132 | timeout { fail "(timeout) help show commands" } | |
2133 | } | |
2134 | ||
2135 | ||
2136 | # test help show complaints | |
2137 | send "help show complaints\n" | |
2138 | expect { | |
2139 | -re "Show max number of complaints about incorrect symbols..*$prompt $"\ | |
2140 | { pass "help show complaints" } | |
2141 | -re "$prompt $" { fail "help show complaints" } | |
2142 | timeout { fail "(timeout) help show complaints" } | |
2143 | } | |
2144 | ||
2145 | ||
2146 | # test help show confirm | |
2147 | send "help show confirm\n" | |
2148 | expect { | |
2149 | -re "Show whether to confirm potentially dangerous operations..*$prompt $"\ | |
2150 | { pass "help show confirm" } | |
2151 | -re "$prompt $" { fail "help show confirm" } | |
2152 | timeout { fail "(timeout) help show confirm" } | |
2153 | } | |
2154 | ||
2155 | ||
2156 | # test help show convenience | |
2157 | send "help show convenience\n" | |
2158 | expect { | |
2159 | -re "Debugger convenience .\".foo\". variables..* | |
2160 | These variables are created when you assign them values;.* | |
2161 | thus, \"print .foo=1\" gives \".foo\" the value 1. Values may be any type..* | |
2162 | A few convenience variables are given values automatically:.* | |
2163 | \"._\"holds the last address examined with \"x\" or \"info lines\",.* | |
2164 | \".__\" holds the contents of the last address examined with \"x\"..*$prompt $"\ | |
2165 | { pass "help show convenience" } | |
2166 | -re "$prompt $" { fail "help show convenience" } | |
2167 | timeout { fail "(timeout) help show convenience" } | |
2168 | } | |
2169 | ||
2170 | ||
2171 | # test help show directories | |
2172 | send "help show directories\n" | |
2173 | expect { | |
2174 | -re "Current search path for finding source files..* | |
2175 | .cwd in the path means the current working directory..* | |
2176 | .cdir in the path means the compilation directory of the source file..*$prompt $"\ | |
2177 | { pass "help show directories" } | |
2178 | -re "$prompt $" { fail "help show directories" } | |
2179 | timeout { fail "(timeout) help show directories" } | |
2180 | } | |
2181 | ||
2182 | ||
2183 | # test help show editing | |
2184 | send "help show editing\n" | |
2185 | expect { | |
2186 | -re "Show editing of command lines as they are typed..* | |
2187 | Use \"on\" to enable to enable the editing, and \"off\" to disable it..* | |
2188 | Without an argument, command line editing is enabled. To edit, use.* | |
2189 | EMACS-like or VI-like commands like control-P or ESC..*$prompt $"\ | |
2190 | { pass "help show editing" } | |
2191 | -re "$prompt $" { fail "help show editing" } | |
2192 | timeout { fail "(timeout) help show editing" } | |
2193 | } | |
2194 | ||
2195 | ||
2196 | # test help show environment | |
2197 | send "help show environment\n" | |
2198 | expect { | |
2199 | -re "The environment to give the program, or one variable's value..* | |
2200 | With an argument VAR, prints the value of environment variable VAR to.* | |
2201 | give the program being debugged. With no arguments, prints the entire.* | |
2202 | environment to be given to the program..*$prompt $"\ | |
2203 | { pass "help show environment" } | |
2204 | -re "$prompt $" { fail "help show environment" } | |
2205 | timeout { fail "(timeout) help show environment" } | |
2206 | } | |
2207 | ||
2208 | ||
2209 | # test help show height | |
2210 | send "help show height\n" | |
2211 | expect { | |
2212 | -re "Show number of lines gdb thinks are in a page..*$prompt $"\ | |
2213 | { pass "help show height" } | |
2214 | -re "$prompt $" { fail "help show height" } | |
2215 | timeout { fail "(timeout) help show height" } | |
2216 | } | |
2217 | ||
2218 | ||
2219 | # test help show history expansion | |
2220 | send "help show history expansion\n" | |
2221 | expect { | |
2222 | -re "Show history expansion on command input..* | |
2223 | Without an argument, history expansion is enabled..*$prompt $"\ | |
2224 | { pass "help show history expansion" } | |
2225 | -re "$prompt $" { fail "help show history expansion" } | |
2226 | timeout { fail "(timeout) help show history expansion" } | |
2227 | } | |
2228 | ||
2229 | ||
2230 | # test help show history filename | |
2231 | send "help show history filename\n" | |
2232 | expect { | |
2233 | -re "Show the filename in which to record the command history.* | |
2234 | .the list of previous commands of which a record is kept...*$prompt $"\ | |
2235 | { pass "help show history filename" } | |
2236 | -re "$prompt $" { fail "help show history filename" } | |
2237 | timeout { fail "(timeout) help show history filename" } | |
2238 | } | |
2239 | ||
2240 | ||
2241 | # test help show history save | |
2242 | send "help show history save\n" | |
2243 | expect { | |
2244 | -re "Show saving of the history record on exit..* | |
2245 | Use \"on\" to enable to enable the saving, and \"off\" to disable it..* | |
2246 | Without an argument, saving is enabled..*$prompt $"\ | |
2247 | { pass "help show history save" } | |
2248 | -re "$prompt $" { fail "help show history save" } | |
2249 | timeout { fail "(timeout) help show history save" } | |
2250 | } | |
2251 | ||
2252 | ||
2253 | # test help show history size | |
2254 | send "help show history size\n" | |
2255 | expect { | |
2256 | -re "Show the size of the command history, .* | |
2257 | ie. the number of previous commands to keep a record of..*$prompt $"\ | |
2258 | { pass "help show history size" } | |
2259 | -re "$prompt $" { fail "help show history size" } | |
2260 | timeout { fail "(timeout) help show history size" } | |
2261 | } | |
2262 | ||
2263 | ||
2264 | # test help show history | |
2265 | send "help show history\n" | |
2266 | expect { | |
2267 | -re "Generic command for showing command history parameters..* | |
2268 | List of show history subcommands:.* | |
2269 | show history filename -- Show the filename in which to record the command history.* | |
2270 | show history size -- Show the size of the command history.* | |
2271 | show history save -- Show saving of the history record on exit.* | |
2272 | show history expansion -- Show history expansion on command input.* | |
2273 | Type \"help show history\" followed by show history subcommand name for full documentation..* | |
2274 | Command name abbreviations are allowed if unambiguous..*$prompt $"\ | |
2275 | { pass "help show history" } | |
2276 | -re "$prompt $" { fail "help show history" } | |
2277 | timeout { fail "(timeout) help show history" } | |
2278 | } | |
2279 | ||
2280 | ||
2281 | # test help show language | |
2282 | send "help show language\n" | |
2283 | expect { | |
2284 | -re "Show the current source language..*$prompt $"\ | |
2285 | { pass "help show language" } | |
2286 | -re "$prompt $" { fail "help show language" } | |
2287 | timeout { fail "(timeout) help show language" } | |
2288 | } | |
2289 | ||
2290 | ||
2291 | # test help show listsize | |
2292 | send "help show listsize\n" | |
2293 | expect { | |
2294 | -re "Show number of source lines gdb will list by default..*$prompt $"\ | |
2295 | { pass "help show listsize" } | |
2296 | -re "$prompt $" { fail "help show listsize" } | |
2297 | timeout { fail "(timeout) help show listsize" } | |
2298 | } | |
2299 | ||
2300 | ||
2301 | # test help show print "p" abbreviation | |
2302 | send "help show p\n" | |
2303 | expect { | |
2304 | -re "Generic command for showing print settings..* | |
2305 | List of show print subcommands:.* | |
2306 | Type \"help show print\" followed by show print subcommand name for full documentation..* | |
2307 | Command name abbreviations are allowed if unambiguous..*$prompt $"\ | |
2308 | { pass "help show print \"p\" abbreviation" } | |
2309 | -re "$prompt $" { fail "help show print \"p\" abbreviation" } | |
2310 | timeout { fail "(timeout) help show print \"p\" abbreviation" } | |
2311 | } | |
2312 | ||
2313 | ||
2314 | # test help show print "pr" abbreviation | |
2315 | send "help show pr\n" | |
2316 | expect { | |
2317 | -re "Generic command for showing print settings..* | |
2318 | List of show print subcommands:.* | |
2319 | Type \"help show print\" followed by show print subcommand name for full documentation..* | |
2320 | Command name abbreviations are allowed if unambiguous..*$prompt $"\ | |
2321 | { pass "help show print \"pr\" abbreviation" } | |
2322 | -re "$prompt $" { fail "help show print \"pr\" abbreviation" } | |
2323 | timeout { fail "(timeout) help show print \"pr\" abbreviation" } | |
2324 | } | |
2325 | ||
2326 | ||
2327 | # test help show print | |
2328 | send "help show print\n" | |
2329 | expect { | |
2330 | -re "Generic command for showing print settings..* | |
2331 | List of show print subcommands:.* | |
2332 | Type \"help show print\" followed by show print subcommand name for full documentation..* | |
2333 | Command name abbreviations are allowed if unambiguous..*$prompt $"\ | |
2334 | { pass "help show print" } | |
2335 | -re "$prompt $" { fail "help show print" } | |
2336 | timeout { fail "(timeout) help show print" } | |
2337 | } | |
2338 | ||
2339 | ||
2340 | # test help show paths | |
2341 | send "help show paths\n" | |
2342 | expect { | |
2343 | -re "Current search path for finding object files..* | |
2344 | .cwd in the path means the current working directory..* | |
2345 | This path is equivalent to the .PATH shell variable. It is a list of.* | |
2346 | directories, separated by colons. These directories are searched to find.* | |
2347 | fully linked executable files and separately compiled object files as needed..*$prompt $"\ | |
2348 | { pass "help show paths" } | |
2349 | -re "$prompt $" { fail "help show paths" } | |
2350 | timeout { fail "(timeout) help show paths" } | |
2351 | } | |
2352 | ||
2353 | ||
2354 | # test help show print address | |
2355 | send "help show print address\n" | |
2356 | expect { | |
2357 | -re "Show printing of addresses..*$prompt $"\ | |
2358 | { pass "help show print address" } | |
2359 | -re "$prompt $" { fail "help show print address" } | |
2360 | timeout { fail "(timeout) help show print address" } | |
2361 | } | |
2362 | ||
2363 | ||
2364 | # test help show print array | |
2365 | send "help show print array\n" | |
2366 | expect { | |
2367 | -re "Show prettyprinting of arrays..*$prompt $"\ | |
2368 | { pass "help show print array" } | |
2369 | -re "$prompt $" { fail "help show print array" } | |
2370 | timeout { fail "(timeout) help show print array" } | |
2371 | } | |
2372 | ||
2373 | ||
2374 | # test help show print asm-demangle | |
2375 | send "help show print asm-demangle\n" | |
2376 | expect { | |
2377 | -re "Show demangling of C\[+\]+ names in disassembly listings..*$prompt $"\ | |
2378 | { pass "help show print asm-demangle" } | |
2379 | -re "$prompt $" { fail "help show print asm-demangle" } | |
2380 | timeout { fail "(timeout) help show print asm-demangle" } | |
2381 | } | |
2382 | ||
2383 | ||
2384 | # test help show print demangle | |
2385 | send "help show print demangle\n" | |
2386 | expect { | |
2387 | -re "Show demangling of encoded C\[+\]+ names when displaying symbols..*$prompt $"\ | |
2388 | { pass "help show print demangle" } | |
2389 | -re "$prompt $" { fail "help show print demangle" } | |
2390 | timeout { fail "(timeout) help show print demangle" } | |
2391 | } | |
2392 | ||
2393 | ||
2394 | # test help show print elements | |
2395 | send "help show print elements\n" | |
2396 | expect { | |
2397 | -re "Show limit on string chars or array elements to print..* | |
2398 | \"set print elements 0\" causes there to be no limit..*$prompt $"\ | |
2399 | { pass "help show print elements" } | |
2400 | -re "$prompt $" { fail "help show print elements" } | |
2401 | timeout { fail "(timeout) help show print elements" } | |
2402 | } | |
2403 | ||
2404 | ||
2405 | # test help show print object | |
2406 | send "help show print object\n" | |
2407 | expect { | |
2408 | -re "Show printing of object's derived type based on vtable info..*$prompt $"\ | |
2409 | { pass "help show print object" } | |
2410 | -re "$prompt $" { fail "help show print object" } | |
2411 | timeout { fail "(timeout) help show print object" } | |
2412 | } | |
2413 | ||
2414 | ||
2415 | # test help show print pretty | |
2416 | send "help show print pretty\n" | |
2417 | expect { | |
2418 | -re "Show prettyprinting of structures..*$prompt $"\ | |
2419 | { pass "help show print pretty" } | |
2420 | -re "$prompt $" { fail "help show print pretty" } | |
2421 | timeout { fail "(timeout) help show print pretty" } | |
2422 | } | |
2423 | ||
2424 | ||
2425 | # test help show print sevenbit-strings | |
2426 | send "help show print sevenbit-strings\n" | |
2427 | expect { | |
2428 | -re "Show printing of 8-bit characters in strings as .nnn..*$prompt $"\ | |
2429 | { pass "help show print sevenbit-strings" } | |
2430 | -re "$prompt $" { fail "help show print sevenbit-strings" } | |
2431 | timeout { fail "(timeout) help show print sevenbit-strings" } | |
2432 | } | |
2433 | ||
2434 | ||
2435 | # test help show print union | |
2436 | send "help show print union\n" | |
2437 | expect { | |
2438 | -re "Show printing of unions interior to structures..*$prompt $"\ | |
2439 | { pass "help show print union" } | |
2440 | -re "$prompt $" { fail "help show print union" } | |
2441 | timeout { fail "(timeout) help show print union" } | |
2442 | } | |
2443 | ||
2444 | ||
2445 | # test help show print vtbl | |
2446 | send "help show print vtbl\n" | |
2447 | expect { | |
2448 | -re "Show printing of C\[+\]+ virtual function tables..*$prompt $"\ | |
2449 | { pass "help show print vtbl" } | |
2450 | -re "$prompt $" { fail "help show print vtbl" } | |
2451 | timeout { fail "(timeout) help show print vtbl" } | |
2452 | } | |
2453 | ||
2454 | ||
2455 | # test help show prompt | |
2456 | send "help show prompt\n" | |
2457 | expect { | |
2458 | -re "Show gdb's prompt.*$prompt $"\ | |
2459 | { pass "help show prompt" } | |
2460 | -re "$prompt $" { fail "help show prompt" } | |
2461 | timeout { fail "(timeout) help show prompt" } | |
2462 | } | |
2463 | ||
2464 | ||
2465 | # test help show radix | |
2466 | send "help show radix\n" | |
2467 | expect { | |
2468 | -re "Show the default input and output number radices.* | |
2469 | Use \'show input-radix\' or \'show output-radix\' to independently show each.* | |
2470 | $prompt $"\ | |
2471 | { pass "help show radix" } | |
2472 | -re "Show default input and output number radix..*$prompt $"\ | |
2473 | { fail "help show radix (obsolete radix support)" } | |
2474 | -re "$prompt $" { fail "help show radix" } | |
2475 | timeout { fail "(timeout) help show radix" } | |
2476 | } | |
2477 | ||
2478 | ||
2479 | # test help show symbol-reloading | |
2480 | send "help show symbol-reloading\n" | |
2481 | expect { | |
2482 | -re "Show dynamic symbol table reloading multiple times in one run..*$prompt $"\ | |
2483 | { pass "help show symbol-reloading" } | |
2484 | -re "$prompt $" { fail "help show symbol-reloading" } | |
2485 | timeout { fail "(timeout) help show symbol-reloading" } | |
2486 | } | |
2487 | ||
2488 | ||
2489 | # test help show user | |
2490 | send "help show user\n" | |
2491 | expect { | |
2492 | -re "Show definitions of user defined commands..* | |
2493 | Argument is the name of the user defined command..* | |
2494 | With no argument, show definitions of all user defined commands..*$prompt $"\ | |
2495 | { pass "help show user" } | |
2496 | -re "$prompt $" { fail "help show user" } | |
2497 | timeout { fail "(timeout) help show user" } | |
2498 | } | |
2499 | ||
2500 | ||
2501 | # test help show values | |
2502 | send "help show values\n" | |
2503 | expect { | |
2504 | -re "Elements of value history around item number IDX .or last ten...*$prompt $"\ | |
2505 | { pass "help show values" } | |
2506 | -re "$prompt $" { fail "help show values" } | |
2507 | timeout { fail "(timeout) help show values" } | |
2508 | } | |
2509 | ||
2510 | ||
2511 | # test help show verbose | |
2512 | send "help show verbose\n" | |
2513 | expect { | |
2514 | -re "Show verbosity..*$prompt $"\ | |
2515 | { pass "help show verbose" } | |
2516 | -re "Show verbose printing of informational messages..*$prompt $"\ | |
2517 | { pass "help show verbose. FIXME" } | |
2518 | -re "$prompt $" { fail "help show verbose" } | |
2519 | timeout { fail "(timeout) help show verbose" } | |
2520 | } | |
2521 | ||
2522 | ||
2523 | # test help show version | |
2524 | send "help show version\n" | |
2525 | expect { | |
2526 | -re "Show what version of GDB this is..*$prompt $"\ | |
2527 | { pass "help show version" } | |
2528 | -re "$prompt $" { fail "help show version" } | |
2529 | timeout { fail "(timeout) help show version" } | |
2530 | } | |
2531 | ||
2532 | ||
2533 | # test help show width | |
2534 | send "help show width\n" | |
2535 | expect { | |
2536 | -re "Show number of characters gdb thinks are in a line..*$prompt $"\ | |
2537 | { pass "help show width" } | |
2538 | -re "$prompt $" { fail "help show width" } | |
2539 | timeout { fail "(timeout) help show width" } | |
2540 | } | |
2541 | ||
2542 | ||
2543 | # test help show write | |
2544 | # This is only supported on targets which use exec.o. | |
2545 | if ![istarget "rs6000-*-*"] then { | |
2546 | send "help show write\n" | |
2547 | expect { | |
2548 | -re "Show writing into executable and core files..*$prompt $"\ | |
2549 | { pass "help show write" } | |
2550 | -re "$prompt $" { fail "help show write" } | |
2551 | timeout { fail "(timeout) help show write" } | |
2552 | } | |
2553 | } | |
2554 | ||
2555 | # test help show | |
2556 | send "help show\n" | |
2557 | expect { | |
2558 | -re "Generic command for showing things about the debugger..* | |
2559 | List of show subcommands:.* | |
2560 | show listsize -- Show number of source lines gdb will list by default.* | |
2561 | show directories -- Current search path for finding source files.* | |
2562 | Type \"help show\" followed by show subcommand name for full documentation..* | |
2563 | Command name abbreviations are allowed if unambiguous..*$prompt $"\ | |
2564 | { pass "help show" } | |
2565 | -re "$prompt $" { fail "help show" } | |
2566 | timeout { fail "(timeout) help show" } | |
2567 | } | |
2568 | ||
2569 | ||
2570 | ||
2571 | # test help step | |
2572 | send "help step\n" | |
2573 | expect { | |
2574 | -re "Step program until it reaches a different source line..* | |
2575 | Argument N means do this N times .or till program stops for another reason...*$prompt $"\ | |
2576 | { pass "help step" } | |
2577 | -re "$prompt $" { fail "help step" } | |
2578 | timeout { fail "(timeout) help step" } | |
2579 | } | |
2580 | ||
2581 | # test help stepi "si" abbreviation | |
2582 | send "help si\n" | |
2583 | expect { | |
2584 | -re "Step one instruction exactly..* | |
2585 | Argument N means do this N times .or till program stops for another reason...*$prompt $"\ | |
2586 | { pass "help stepi \"si\" abbreviation" } | |
2587 | -re "$prompt $" { fail "help stepi \"si\" abbreviation" } | |
2588 | timeout { fail "(timeout) help stepi \"si\" abbreviation" } | |
2589 | } | |
2590 | ||
2591 | ||
2592 | # test help stepi | |
2593 | send "help stepi\n" | |
2594 | expect { | |
2595 | -re "Step one instruction exactly..* | |
2596 | Argument N means do this N times .or till program stops for another reason...*$prompt $"\ | |
2597 | { pass "help stepi" } | |
2598 | -re "$prompt $" { fail "help stepi" } | |
2599 | timeout { fail "(timeout) help stepi" } | |
2600 | } | |
2601 | ||
2602 | ||
2603 | # test help signal | |
2604 | send "help signal\n" | |
2605 | expect { | |
2606 | -re "Continue program giving it signal.*$prompt $"\ | |
2607 | { pass "help signal" } | |
2608 | -re "$prompt $" { fail "help signal" } | |
2609 | timeout { fail "(timeout) help signal" } | |
2610 | } | |
2611 | ||
2612 | ||
2613 | # test help source | |
2614 | # vxgdb reads .vxgdbinit | |
2615 | send "help source\n" | |
2616 | expect { | |
2617 | -re "Read commands from a file named FILE..* | |
2618 | Note that the file \".(vx)?gdbinit\" is read automatically in this way.* | |
2619 | when gdb is started..*$prompt $"\ | |
2620 | { pass "help source" } | |
2621 | -re "$prompt $" { fail "help source" } | |
2622 | timeout { fail "(timeout) help source" } | |
2623 | } | |
2624 | ||
2625 | ||
2626 | # test help stack | |
2627 | send "help stack\n" | |
2628 | expect { | |
2629 | -re "Examining the stack..* | |
2630 | The stack is made up of stack frames. Gdb assigns numbers to stack frames.* | |
2631 | counting from zero for the innermost .currently executing. frame..* | |
2632 | At any time gdb identifies one frame as the \"selected\" frame..* | |
2633 | Variable lookups are done with respect to the selected frame..* | |
2634 | When the program being debugged stops, gdb selects the innermost frame..* | |
2635 | The commands below can be used to select other frames by number or address..* | |
2636 | List of commands:.* | |
2637 | bt -- Print backtrace of all stack frames.* | |
2638 | backtrace -- Print backtrace of all stack frames.* | |
2639 | select-frame -- Select a stack frame without printing anything.* | |
2640 | frame -- Select and print a stack frame.* | |
2641 | down -- Select and print stack frame called by this one.* | |
2642 | up -- Select and print stack frame that called this one.* | |
2643 | return -- Make selected stack frame return to its caller.* | |
2644 | Type \"help\" followed by command name for full documentation..* | |
2645 | Command name abbreviations are allowed if unambiguous..*$prompt $"\ | |
2646 | { pass "help stack" } | |
2647 | -re "$prompt $" { fail "help stack" } | |
2648 | timeout { fail "(timeout) help stack" } | |
2649 | } | |
2650 | ||
2651 | ||
2652 | # test help status | |
2653 | send "help status\n" | |
2654 | expect { | |
2655 | -re "Status inquiries..* | |
2656 | List of commands:.* | |
2657 | show -- Generic command for showing things about the debugger.* | |
2658 | info -- Generic command for showing things about the program being debugged.* | |
2659 | Type \"help\" followed by command name for full documentation..* | |
2660 | Command name abbreviations are allowed if unambiguous..*$prompt $"\ | |
2661 | { pass "help status" } | |
2662 | -re "$prompt $" { fail "help status" } | |
2663 | timeout { fail "(timeout) help status" } | |
2664 | } | |
2665 | ||
2666 | ||
2667 | # test help support | |
2668 | # FIXME -- Ultrix hangs randomly on this very long output from gdb and | |
2669 | # continues with its output only if something is sent to gdb. | |
2670 | # This behaviour throws expect and gdb out of sync, so we better skip this | |
2671 | # test. | |
2672 | # Also, if the system is slow, it may time out because the output is large. | |
2673 | # Just skip the test rather than bothering with increasing the timeout. | |
2674 | if 0 then { | |
2675 | send "help support\n" | |
2676 | expect { | |
2677 | -re "Support facilities..* | |
2678 | List of commands:.* | |
2679 | show confirm -- Show whether to confirm potentially dangerous operations.* | |
2680 | show history -- Generic command for showing command history parameters.* | |
2681 | down-silently -- Same as the `down' command.* | |
2682 | up-silently -- Same as the `up' command.* | |
2683 | Type \"help\" followed by command name for full documentation..* | |
2684 | Command name abbreviations are allowed if unambiguous..*$prompt $"\ | |
2685 | { pass "help support" } | |
2686 | -re "$prompt $" { fail "help support" } | |
2687 | timeout { fail "(timeout) help support" } | |
2688 | } | |
2689 | } | |
2690 | ||
2691 | # test help symbol-file | |
2692 | send "help symbol-file\n" | |
2693 | expect { | |
2694 | -re "Load symbol table from executable file FILE..* | |
2695 | The `file' command can also load symbol tables, as well as setting the file.* | |
2696 | to execute..*$prompt $"\ | |
2697 | { pass "help symbol-file" } | |
2698 | -re "$prompt $" { fail "help symbol-file" } | |
2699 | timeout { fail "(timeout) help symbol-file" } | |
2700 | } | |
2701 | ||
2702 | ||
2703 | # test help target child | |
2704 | send "help target child\n" | |
2705 | expect { | |
2706 | -re "Unix child process .started by the \"run\" command...*$prompt $"\ | |
2707 | { pass "help target child (non-procfs version)" } | |
2708 | -re "Undefined target command: \"child\". Try \"help target\"..*$prompt $"\ | |
2709 | { pass "help target child (procfs version)" } | |
2710 | -re "$prompt $" { fail "help target child" } | |
2711 | timeout { fail "(timeout) help target child" } | |
2712 | } | |
2713 | ||
2714 | ||
2715 | # test help target procfs | |
2716 | send "help target procfs\n" | |
2717 | expect { | |
2718 | -re "Unix /proc child process .started by the \"run\" command...*$prompt $"\ | |
2719 | { pass "help target procfs (procfs version)" } | |
2720 | -re "Undefined target command: \"procfs\". Try \"help target\"..*$prompt $"\ | |
2721 | { pass "help target procfs (non-procfs version)" } | |
2722 | -re "$prompt $" { fail "help target procfs" } | |
2723 | timeout { fail "(timeout) help target procfs" } | |
2724 | } | |
2725 | ||
2726 | ||
2727 | # test help target core | |
2728 | send "help target core\n" | |
2729 | expect { | |
2730 | -re "Use a core file as a target. Specify the filename of the core file..*$prompt $"\ | |
2731 | { pass "help target core" } | |
2732 | -re "Undefined target command: \"core\". Try \"help target\"..*$prompt $"\ | |
2733 | { pass "help target core" } | |
2734 | -re "$prompt $" { fail "help target core" } | |
2735 | timeout { fail "(timeout) help target core" } | |
2736 | } | |
2737 | ||
2738 | ||
2739 | # test help target exec | |
2740 | send "help target exec\n" | |
2741 | expect { | |
2742 | -re "Use an executable file as a target..* | |
2743 | Specify the filename of the executable file..*$prompt $"\ | |
2744 | { pass "help target exec" } | |
2745 | -re "$prompt $" { fail "help target exec" } | |
2746 | timeout { fail "(timeout) help target exec" } | |
2747 | } | |
2748 | ||
2749 | ||
2750 | # test help target remote | |
2751 | if ![istarget "*-*-udi*"] then { | |
2752 | send "help target remote\n" | |
2753 | expect { | |
2754 | -re "Use a remote computer via a serial line, using a gdb-specific protocol..* | |
2755 | Specify the serial device it is connected to .e.g. /dev/ttya...*$prompt $"\ | |
2756 | { pass "help target remote" } | |
2757 | -re "$prompt $" { fail "help target remote" } | |
2758 | timeout { fail "(timeout) help target remote" } | |
2759 | } | |
2760 | } | |
2761 | ||
2762 | # test help target | |
2763 | # the child process target may be "target child" or "target procfs" | |
2764 | send "help target\n" | |
2765 | expect { | |
2766 | -re "Connect to a target machine or process..* | |
2767 | The first argument is the type or protocol of the target machine..* | |
2768 | Remaining arguments are interpreted by the target protocol. For more.* | |
2769 | information on the arguments for a particular protocol, type.* | |
2770 | `help target ' followed by the protocol name..* | |
2771 | List of target subcommands:.* | |
2772 | target exec -- Use an executable file as a target.* | |
2773 | Type \"help target\" followed by target subcommand name for full documentation..* | |
2774 | Command name abbreviations are allowed if unambiguous..*$prompt $"\ | |
2775 | { pass "help target" } | |
2776 | -re "$prompt $" { fail "help target" } | |
2777 | timeout { fail "(timeout) help target" } | |
2778 | } | |
2779 | ||
2780 | ||
2781 | # test help tbreak | |
2782 | send "help tbreak\n" | |
2783 | expect { | |
2784 | -re "Set a temporary breakpoint.*$prompt $"\ | |
2785 | { pass "help tbreak" } | |
2786 | -re "$prompt $" { fail "help tbreak" } | |
2787 | timeout { fail "(timeout) help tbreak" } | |
2788 | } | |
2789 | ||
2790 | ||
2791 | # test help tty | |
2792 | send "help tty\n" | |
2793 | expect { | |
2794 | -re "Set terminal for future runs of program being debugged..*$prompt $"\ | |
2795 | { pass "help tty" } | |
2796 | -re "$prompt $" { fail "help tty" } | |
2797 | timeout { fail "(timeout) help tty" } | |
2798 | } | |
2799 | ||
2800 | ||
2801 | # test help until "u" abbreviation | |
2802 | send "help u\n" | |
2803 | expect { | |
2804 | -re "Execute until the program reaches a source line greater than the current.* | |
2805 | or a specified line or address or function .same args as break command...* | |
2806 | Execution will also stop upon exit from the current stack frame..*$prompt $"\ | |
2807 | { pass "help until \"u\" abbreviation" } | |
2808 | -re "$prompt $" { fail "help until \"u\" abbreviation" } | |
2809 | timeout { fail "(timeout) help until \"u\" abbreviation" } | |
2810 | } | |
2811 | ||
2812 | ||
2813 | # test help until | |
2814 | send "help until\n" | |
2815 | expect { | |
2816 | -re "Execute until the program reaches a source line greater than the current.* | |
2817 | or a specified line or address or function .same args as break command...* | |
2818 | Execution will also stop upon exit from the current stack frame..*$prompt $"\ | |
2819 | { pass "help until" } | |
2820 | -re "$prompt $" { fail "help until" } | |
2821 | timeout { fail "(timeout) help until" } | |
2822 | } | |
2823 | ||
2824 | ||
2825 | # test help undisplay | |
2826 | send "help undisplay\n" | |
2827 | expect { | |
2828 | -re "Cancel some expressions to be displayed when program stops..* | |
2829 | Arguments are the code numbers of the expressions to stop displaying..* | |
2830 | No argument means cancel all automatic-display expressions..* | |
2831 | \"delete display\" has the same effect as this command..* | |
2832 | Do \"info display\" to see current list of code numbers..*$prompt $"\ | |
2833 | { pass "help undisplay" } | |
2834 | -re "$prompt $" { fail "help undisplay" } | |
2835 | timeout { fail "(timeout) help undisplay" } | |
2836 | } | |
2837 | ||
2838 | ||
2839 | # test help unset environment | |
2840 | send "help unset environment\n" | |
2841 | expect { | |
2842 | -re "Cancel environment variable VAR for the program..* | |
2843 | This does not affect the program until the next \"run\" command..*$prompt $"\ | |
2844 | { pass "help unset environment" } | |
2845 | -re "$prompt $" { fail "help unset environment" } | |
2846 | timeout { fail "(timeout) help unset environment" } | |
2847 | } | |
2848 | ||
2849 | ||
2850 | # test help unset | |
2851 | send "help unset\n" | |
2852 | expect { | |
2853 | -re "Complement to certain \"set\" commands.* | |
2854 | List of unset subcommands:.* | |
2855 | unset environment -- Cancel environment variable VAR for the program.* | |
2856 | Type \"help unset\" followed by unset subcommand name for full documentation..* | |
2857 | Command name abbreviations are allowed if unambiguous..*$prompt $"\ | |
2858 | { pass "help unset" } | |
2859 | -re "$prompt $" { fail "help unset" } | |
2860 | timeout { fail "(timeout) help unset" } | |
2861 | } | |
2862 | ||
2863 | ||
2864 | # test help up | |
2865 | send "help up\n" | |
2866 | expect { | |
2867 | -re "Select and print stack frame that called this one..* | |
2868 | An argument says how many frames up to go..*$prompt $"\ | |
2869 | { pass "help up" } | |
2870 | -re "$prompt $" { fail "help up" } | |
2871 | timeout { fail "(timeout) help up" } | |
2872 | } | |
2873 | ||
2874 | ||
2875 | # test help up-silently | |
2876 | send "help up-silently\n" | |
2877 | expect { | |
2878 | -re "Same as the `up' command, but does not print anything..* | |
2879 | This is useful in command scripts..*$prompt $"\ | |
2880 | { pass "help up-silently" } | |
2881 | -re "$prompt $" { fail "help up-silently" } | |
2882 | timeout { fail "(timeout) help up-silently" } | |
2883 | } | |
2884 | ||
2885 | ||
2886 | # test help user-defined | |
2887 | send "help user-defined\n" | |
2888 | expect { | |
2889 | -re "User-defined commands..* | |
2890 | The commands in this class are those defined by the user..* | |
2891 | Use the \"define\" command to define a command..* | |
2892 | List of commands:.* | |
2893 | Type \"help\" followed by command name for full documentation..* | |
2894 | Command name abbreviations are allowed if unambiguous..*$prompt $"\ | |
2895 | { pass "help user-defined" } | |
2896 | -re "$prompt $" { fail "help user-defined" } | |
2897 | timeout { fail "(timeout) help user-defined" } | |
2898 | } | |
2899 | ||
2900 | ||
2901 | # test help watch | |
2902 | send "help watch\n" | |
2903 | expect { | |
2904 | -re "Set a watchpoint for an expression..* | |
2905 | A watchpoint stops execution of your program whenever the value of.* | |
2906 | an expression changes..*$prompt $"\ | |
2907 | { pass "help watch" } | |
2908 | -re "$prompt $" { fail "help watch" } | |
2909 | timeout { fail "(timeout) help watch" } | |
2910 | } | |
2911 | ||
2912 | ||
2913 | # test help whatis | |
2914 | send "help whatis\n" | |
2915 | expect { | |
2916 | -re "Print data type of expression EXP..*$prompt $"\ | |
2917 | { pass "help whatis" } | |
2918 | -re "$prompt $" { fail "help whatis" } | |
2919 | timeout { fail "(timeout) help whatis" } | |
2920 | } | |
2921 | ||
2922 | ||
2923 | # test help where | |
2924 | send "help where\n" | |
2925 | expect { | |
2926 | -re "Print backtrace of all stack frames, or innermost COUNT frames..* | |
2927 | With a negative argument, print outermost -COUNT frames..*$prompt $"\ | |
2928 | { pass "help where" } | |
2929 | -re "$prompt $" { fail "help where" } | |
2930 | timeout { fail "(timeout) help where" } | |
2931 | } | |
2932 | ||
2933 | ||
2934 | # test help x | |
2935 | send "help x\n" | |
2936 | expect { | |
2937 | -re "Examine memory: x/FMT ADDRESS..* | |
2938 | ADDRESS is an expression for the memory address to examine..* | |
2939 | FMT is a repeat count followed by a format letter and a size letter..* | |
2940 | Defaults for format and size letters are those previously used..* | |
2941 | Default count is 1. Default address is following last thing printed.* | |
2942 | with this command or \"print\"..*$prompt $"\ | |
2943 | { pass "help x" } | |
2944 | -re "$prompt $" { fail "help x" } | |
2945 | timeout { fail "(timeout) help x" } | |
2946 | } | |
2947 | ||
2948 | ||
2949 | # test help info bogus-gdb-command | |
2950 | send "help info bogus-gdb-command\n" | |
2951 | expect { | |
2952 | -re "Undefined info command: \"bogus-gdb-command\". Try \"help info\"..*$prompt $"\ | |
2953 | { pass "help info bogus-gdb-command" } | |
2954 | -re "$prompt $" { fail "help info bogus-gdb-command" } | |
2955 | timeout { fail "(timeout) help info bogus-gdb-command" } | |
2956 | } | |
2957 | ||
2958 | ||
2959 | # test help gotcha | |
2960 | send "help gotcha\n" | |
2961 | expect { | |
2962 | -re "Undefined command: \"gotcha\". Try \"help\"..*$prompt $"\ | |
2963 | { pass "help gotcha" } | |
2964 | -re "$prompt $" { fail "help gotcha" } | |
2965 | timeout { fail "(timeout) help gotcha" } | |
2966 | } | |
2967 |