* gdb.base/help.exp: Replace most of docstrings for "info signals"
[deliverable/binutils-gdb.git] / gdb / testsuite / gdb.base / help.exp
CommitLineData
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
26set prms_id 0
27set bug_id 0
28
29# force the height of the debugger to be pretty large so no pagers getused
30send "set height 400\n"
31expect -re "$prompt $"
32
33# use a larger expect input buffer for long help outputs.
34match_max 6000
35
36# test help add-symbol-file
37send "help add-symbol-file\n"
38expect {
39 -re "Usage: add-symbol-file FILE ADDR.*
40Load the symbols from FILE, assuming FILE has been dynamically loaded..*
41ADDR 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
49send "help aliases\n"
50expect {
51 -re "Aliases of other commands..*
52List of commands\:.*
53Type \"help\" followed by command name for full documentation..*
54Command 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
61send "help attach\n"
62expect {
63 -re "Attach to a process or file outside of GDB..*
64This command attaches to another target, of the same type as your last.*
65`target' command .`info files' will show your target stack.*
66The command may take as argument a process id or a device file..*
67For a process id, you must have permission to send the process a signal,.*
68and it must have the same effective uid as the debugger..*
69When using \"attach\", you should use the \"file\" command to specify.*
70the 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
79send "help b\n"
80expect {
81 -re "Set breakpoint at specified line or function..*
82Argument may be line number, function name, or \"\[*\]\" and an address..*
83If line number is specified, break at start of code for that line..*
84If function is specified, break at start of code for that function..*
85If an address is specified, break at that exact address..*
86With no arg, uses current execution address of selected stack frame..*
87This is useful for breaking on return to a stack frame..*
88Multiple breakpoints at one place are permitted, and useful if conditional..*
89Do \"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
97send "help br\n"
98expect {
99 -re "Set breakpoint at specified line or function..*
100Argument may be line number, function name, or \"\[*\]\" and an address..*
101If line number is specified, break at start of code for that line..*
102If function is specified, break at start of code for that function..*
103If an address is specified, break at that exact address..*
104With no arg, uses current execution address of selected stack frame..*
105This is useful for breaking on return to a stack frame..*
106Multiple breakpoints at one place are permitted, and useful if conditional..*
107Do \"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
115send "help bre\n"
116expect {
117 -re "Set breakpoint at specified line or function..*
118Argument may be line number, function name, or \"\[*\]\" and an address..*
119If line number is specified, break at start of code for that line..*
120If function is specified, break at start of code for that function..*
121If an address is specified, break at that exact address..*
122With no arg, uses current execution address of selected stack frame..*
123This is useful for breaking on return to a stack frame..*
124Multiple breakpoints at one place are permitted, and useful if conditional..*
125Do \"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
133send "help brea\n"
134expect {
135 -re "Set breakpoint at specified line or function..*
136Argument may be line number, function name, or \"\[*\]\" and an address..*
137If line number is specified, break at start of code for that line..*
138If function is specified, break at start of code for that function..*
139If an address is specified, break at that exact address..*
140With no arg, uses current execution address of selected stack frame..*
141This is useful for breaking on return to a stack frame..*
142Multiple breakpoints at one place are permitted, and useful if conditional..*
143Do \"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
151send "help break\n"
152expect {
153 -re "Set breakpoint at specified line or function..*
154Argument may be line number, function name, or \"\[*\]\" and an address..*
155If line number is specified, break at start of code for that line..*
156If function is specified, break at start of code for that function..*
157If an address is specified, break at that exact address..*
158With no arg, uses current execution address of selected stack frame..*
159This is useful for breaking on return to a stack frame..*
160Multiple breakpoints at one place are permitted, and useful if conditional..*
161Do \"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
169send "help breakpoints\n"
170expect {
171 -re "Making program stop at certain points..*
172List of commands\:.*
173watch -- Set a watchpoint for an expression.*
174catch -- Set breakpoints to catch exceptions that are raised.*
175break -- Set breakpoint at specified line or function.*
176clear -- Clear breakpoint at specified line or function.*
177delete -- Delete some breakpoints or auto-display expressions.*
178disable -- Disable some breakpoints.*
179enable -- Enable some breakpoints.*
180tbreak -- Set a temporary breakpoint.*
181condition -- Specify breakpoint number N to break only if COND is true.*
182commands -- Set commands to be executed when a breakpoint is hit.*
183ignore -- Set ignore-count of breakpoint number N to COUNT.*
184Type \"help\" followed by command name for full documentation..*
185Command 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
193send "help bt\n"
194expect {
195 -re "Print backtrace of all stack frames, or innermost COUNT frames..*
196With 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
204send "help backtrace\n"
205expect {
206 -re "Print backtrace of all stack frames, or innermost COUNT frames..*
207With 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
215send "help c\n"
216expect {
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
225send "help continue\n"
226expect {
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
235send "help call\n"
236expect {
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
245send "help catch\n"
246expect {
247 -re "Set breakpoints to catch exceptions that are raised..*
248Argument may be a single exception to catch, multiple exceptions.*
249to catch, or the default exception \"default\". If no arguments.*
250are given, breakpoints are set at all exception handlers catch clauses.*
251within the current scope..*
252A condition specified for the catch applies to all breakpoints set.*
253with this command.*
254Do \"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
262send "help cd\n"
263expect {
264 -re "Set working directory to DIR for debugger and program being debugged..*
265The change does not take effect for the program being debugged.*
266until 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
274send "help clear\n"
275expect {
276 -re "Clear breakpoint at specified line or function.*
277Argument may be line number, function name, or .* and an address.*
278If line number is specified, all breakpoints in that line are cleared.*
279If function is specified, breakpoints at beginning of function are cleared.*
280If an address is specified, breakpoints at that address are cleared.*
281With no argument, clears all breakpoints in the line that the selected frame.*
282is executing in..*
283See 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
291send "help commands\n"
292expect {
293 -re "Set commands to be executed when a breakpoint is hit..*
294Give breakpoint number as argument after \"commands\"..*
295With no argument, the targeted breakpoint is the last one set..*
296The commands themselves follow starting on the next line..*
297Type a line containing \"end\" to indicate the end of them..*
298Give \"silent\" as the first line to make the breakpoint silent;.*
299then 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
307send "help condition\n"
308expect {
309 -re "Specify breakpoint number N to break only if COND is true..*
310Usage is `condition N COND', where N is an integer and COND is an.*
311expression 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
319send "help core-file\n"
320expect {
321 -re "Use FILE as core dump for examining memory and registers..*
322No 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
331send "help d\n"
332expect {
333 -re "Delete some breakpoints or auto-display expressions..*
334Arguments are breakpoint numbers with spaces in between..*
335To delete all breakpoints, give no argument..*
336Also a prefix command for deletion of other GDB objects..*
337The \"unset\" command is also an alias for \"delete\"..*
338List of delete subcommands:.*
339delete display -- Cancel some expressions to be displayed when program stops.*
340delete breakpoints -- Delete some breakpoints or auto-display expressions.*
341Type \"help delete\" followed by delete subcommand name for full documentation..*
342Command 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
350send "help delete\n"
351expect {
352 -re "Delete some breakpoints or auto-display expressions..*
353Arguments are breakpoint numbers with spaces in between..*
354To delete all breakpoints, give no argument..*
355Also a prefix command for deletion of other GDB objects..*
356The \"unset\" command is also an alias for \"delete\"..*
357List of delete subcommands:.*
358delete display -- Cancel some expressions to be displayed when program stops.*
359delete breakpoints -- Delete some breakpoints or auto-display expressions.*
360Type \"help delete\" followed by delete subcommand name for full documentation..*
361Command 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
369send "help data\n"
370expect {
371 -re ".*
372Examining data..*
373List of commands:.*
374Type \"help\" followed by command name for full documentation..*
375Command 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
383send "help define\n"
384expect {
385 -re "Define a new command name. Command name is argument..*
386Definition appears on following lines, one command per line..*
387End with a line of just \"end\"..*
388Use the \"document\" command to give documentation for the new command..*
389Commands 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
397send "help delete breakpoints\n"
398expect {
399 -re "Delete some breakpoints or auto-display expressions..*
400Arguments are breakpoint numbers with spaces in between..*
401To delete all breakpoints, give no argument..*
402This 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
410send "help delete display\n"
411expect {
412 -re "Cancel some expressions to be displayed when program stops..*
413Arguments are the code numbers of the expressions to stop displaying..*
414No argument means cancel all automatic-display expressions..*
415Do \"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
423send "help detach\n"
424expect {
425 -re "Detach a process or file previously attached..*
426If a process, it is no longer traced, and it continues its execution. If you.*
427were 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
435send "help directory\n"
436expect {
437 -re "Add directory DIR to beginning of search path for source files..*
438Forget cached info on source file locations and line positions..*
439DIR can also be .cwd for the current working directory, or .cdir for the.*
440directory in which the source file was compiled into object code..*
441With 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
449send "help dis\n"
450expect {
451 -re "Disable some breakpoints..*
452Arguments are breakpoint numbers with spaces in between..*
453To disable all breakpoints, give no argument..*
454A disabled breakpoint is not forgotten, but has no effect until reenabled..*
455List of disable subcommands:.*
456disable display -- Disable some expressions to be displayed when program stops.*
457disable breakpoints -- Disable some breakpoints.*
458Type \"help disable\" followed by disable subcommand name for full documentation..*
459Command 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
467send "help disa\n"
468expect {
469 -re "Disable some breakpoints..*
470Arguments are breakpoint numbers with spaces in between..*
471To disable all breakpoints, give no argument..*
472A disabled breakpoint is not forgotten, but has no effect until reenabled..*
473List of disable subcommands:.*
474disable display -- Disable some expressions to be displayed when program stops.*
475disable breakpoints -- Disable some breakpoints.*
476Type \"help disable\" followed by disable subcommand name for full documentation..*
477Command 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
485send "help disable\n"
486expect {
487 -re "Disable some breakpoints..*
488Arguments are breakpoint numbers with spaces in between..*
489To disable all breakpoints, give no argument..*
490A disabled breakpoint is not forgotten, but has no effect until reenabled..*
491List of disable subcommands:.*
492disable display -- Disable some expressions to be displayed when program stops.*
493disable breakpoints -- Disable some breakpoints.*
494Type \"help disable\" followed by disable subcommand name for full documentation..*
495Command 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
503send "help disable breakpoints\n"
504expect {
505 -re "Disable some breakpoints..*
506Arguments are breakpoint numbers with spaces in between..*
507To disable all breakpoints, give no argument..*
508A disabled breakpoint is not forgotten, but has no effect until reenabled..*
509This 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
517send "help disable display\n"
518expect {
519 -re "Disable some expressions to be displayed when program stops..*
520Arguments are the code numbers of the expressions to stop displaying..*
521No argument means disable all automatic-display expressions..*
522Do \"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
530send "help disassemble\n"
531expect {
532 -re "Disassemble a specified section of memory..*
533Default is the function surrounding the pc of the selected frame..*
534With a single argument, the function surrounding that address is dumped..*
535Two 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
543send "help display\n"
544expect {
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,.*
548as in the \"x\" command, and then EXP is used to get the address to examine.*
549and examining is done as in the \"x\" command..*
550With no argument, display all currently requested auto-display expressions..*
551Use \"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
559send "help do\n"
560expect {
561 -re "Select and print stack frame called by this one..*
562An 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
570send "help document\n"
571expect {
572 -re "Document a user-defined command..*
573Give command name as argument. Give documentation on following lines..*
574End 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
583send "help down\n"
584expect {
585 -re "Select and print stack frame called by this one..*
586An 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
594send "help down-silently\n"
595expect {
596 -re "Same as the `down' command, but does not print anything..*
597This 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
615send "help echo\n"
616expect {
617 -re "Print a constant string. Give string as argument..*
618C escape sequences may be used in the argument..*
619No newline is added at the end of the argument;.*
620use \".n\" if you want a newline to be printed..*
621Since leading and trailing whitespace are ignored in command arguments,.*
622if you want to print some you must use \".\" before leading whitespace.*
623to 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
631send "help enable breakpoints delete\n"
632expect {
633 -re "Enable breakpoints and delete when hit. Give breakpoint numbers..*
634If 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
642send "help enable breakpoints once\n"
643expect {
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
652send "help enable breakpoints\n"
653expect {
654 -re "Enable some breakpoints..*
655Give breakpoint numbers .separated by spaces. as arguments..*
656This is used to cancel the effect of the \"disable\" command..*
657May be abbreviated to simply \"enable\"..*.*
658List of enable breakpoints subcommands:.*
659enable breakpoints delete -- Enable breakpoints and delete when hit.*
660enable breakpoints once -- Enable breakpoints for one hit.*
661Type \"help enable breakpoints\" followed by enable breakpoints subcommand name for full documentation..*
662Command 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
670send "help enable delete\n"
671expect {
672 -re "Enable breakpoints and delete when hit. Give breakpoint numbers..*
673If 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
681send "help enable display\n"
682expect {
683 -re "Enable some expressions to be displayed when program stops..*
684Arguments are the code numbers of the expressions to resume displaying..*
685No argument means enable all automatic-display expressions..*
686Do \"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
694send "help enable once\n"
695expect {
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
704send "help enable\n"
705expect {
706 -re "Enable some breakpoints..*
707Give breakpoint numbers .separated by spaces. as arguments..*
708With no subcommand, breakpoints are enabled until you command otherwise..*
709This is used to cancel the effect of the \"disable\" command..*
710With a subcommand you can enable temporarily..*
711List of enable subcommands:.*
712enable display -- Enable some expressions to be displayed when program stops.*
713enable once -- Enable breakpoints for one hit.*
714enable delete -- Enable breakpoints and delete when hit.*
715Type \"help enable\" followed by enable subcommand name for full documentation..*
716Command 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
724send "help exec-file\n"
725expect {
726 -re "Use FILE as program for getting contents of pure memory..*
727If FILE cannot be found as specified, your execution directory path.*
728is searched for a command of that name..*
729No 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
737send "help f\n"
738expect {
739 -re "Select and print a stack frame..*
740With no argument, print the selected stack frame. .See also \"info frame\".*
741An argument specifies the frame to select..*
742It can be a stack frame number or the address of the frame..*
743With argument, nothing is printed if input is coming from.*
744a 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
752send "help frame\n"
753expect {
754 -re "Select and print a stack frame..*
755With no argument, print the selected stack frame. .See also \"info frame\"...*
756An argument specifies the frame to select..*
757It can be a stack frame number or the address of the frame..*
758With argument, nothing is printed if input is coming from.*
759a 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
767send "help fg\n"
768expect {
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
777send "help file\n"
778expect {
779 -re "Use FILE as program to be debugged..*
780It is read for its symbols, for getting the contents of pure memory,.*
781and it is the program executed when you use the `run' command..*
782If FILE cannot be found as specified, your execution directory path.*
783..PATH. is searched for a command of that name..*
784No 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
792send "help files\n"
793expect {
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
801send "help finish\n"
802expect {
803 -re "Execute until selected stack frame returns..*
804Upon 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
812send "help forward-search\n"
813expect {
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
822send "help h\n"
823expect {
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
832send "help help\n"
833expect {
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
842send "help handle\n"
843expect {
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
852send "help i\n"
853expect {
854 -re "Generic command for showing things about the program being debugged..*
855List of info subcommands:.*
856Type \"help info\" followed by info subcommand name for full documentation..*
857Command 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
865send "help info\n"
866expect {
867 -re "Generic command for showing things about the program being debugged..*
868List of info subcommands:.*
869Type \"help info\" followed by info subcommand name for full documentation..*
870Command 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
878send "help ignore\n"
879expect {
880 -re "Set ignore-count of breakpoint number N to COUNT..*
881Usage 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
889send "help info address\n"
890expect {
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
899send "help info all-registers\n"
900expect {
901 -re "List of all registers and their contents, for selected stack frame..*
902Register 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
910send "help info args\n"
911expect {
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
920send "help info breakpoints\n"
921expect {
922 -re "Status of user-settable breakpoints, or breakpoint number NUMBER..*
923breakpoint 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
931send "help info catch\n"
932expect {
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
941send "help info copying\n"
942expect {
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
951send "help info display\n"
952expect {
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
961send "help info f\n"
962expect {
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
971send "help info frame\n"
972expect {
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
981send "help info files\n"
982expect {
983 -re "Names of targets and files being debugged..*
984Shows the entire stack of targets currently in use .including the exec-file,.*
985core-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
993send "help info float\n"
994expect {
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
1003send "help info functions\n"
1004expect {
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
1013send "help info line\n"
1014expect {
1015 -re "Core addresses of the code for a source line..*
1016Line 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..*
1021Default is to describe the last source line that was listed..*
1022This sets the default address for \"x\" to the line's first instruction.*
1023so that \"x.i\" suffices to start examining the machine code..*
1024The 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
1032send "help info locals\n"
1033expect {
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
1042send "help info program\n"
1043expect {
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
1052send "help info registers\n"
1053expect {
1054 -re "List of integer registers and their contents, for selected stack frame..*
1055Register 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
1063send "help info s\n"
1064expect {
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
1073send "help info stack\n"
1074expect {
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
1083send "help info set\n"
1084expect {
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
1093send "help info signals\n"
1094expect {
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
1103send "help info source\n"
1104expect {
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
1113send "help info sources\n"
1114expect {
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
1123send "help info target\n"
1124expect {
1125 -re "Names of targets and files being debugged..*
1126Shows the entire stack of targets currently in use .including the exec-file,.*
1127core-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
1135send "help info terminal\n"
1136expect {
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
1145send "help info types\n"
1146expect {
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
1155send "help info variables\n"
1156expect {
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
1165send "help info warranty\n"
1166expect {
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
1175send "help info watchpoints\n"
1176expect {
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
1185send "help inspect\n"
1186expect {
1187 -re "Same as \"print\" command, except that if you are running in the epoch.*
1188environment, 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
1196send "help jump\n"
1197expect {
1198 -re "Continue program being debugged at specified line or address..*
1199Give as argument either LINENUM or \[*\]+ADDR, where ADDR is an expression.*
1200for 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
1208send "help kill\n"
1209expect {
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
1218send "help l\n"
1219expect {
1220 -re "List specified function or line..*
1221With no argument, lists ten more lines after or around previous listing..*
1222\"list -\" lists the ten lines before a previous ten-line listing..*
1223One argument specifies a line, and ten lines are listed around that line..*
1224Two arguments with comma between specify starting and ending lines to list..*
1225Lines 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..*
1231With 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
1239send "help list\n"
1240expect {
1241 -re "List specified function or line..*
1242With no argument, lists ten more lines after or around previous listing..*
1243\"list -\" lists the ten lines before a previous ten-line listing..*
1244One argument specifies a line, and ten lines are listed around that line..*
1245Two arguments with comma between specify starting and ending lines to list..*
1246Lines 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..*
1252With 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
1260send "help load\n"
1261expect {
1262 -re "Dynamically load FILE into the running program, and record its symbols.*
1263for 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
1271send "help make\n"
1272expect {
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
1281send "help n\n"
1282expect {
1283 -re "Step program, proceeding through subroutine calls..*
1284Like the \"step\" command as long as subroutine calls do not happen;.*
1285when they do, the call is treated as one instruction..*
1286Argument 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
1294send "help next\n"
1295expect {
1296 -re "Step program, proceeding through subroutine calls..*
1297Like the \"step\" command as long as subroutine calls do not happen;.*
1298when they do, the call is treated as one instruction..*
1299Argument 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
1307send "help ni\n"
1308expect {
1309 -re "Step one instruction, but proceed through subroutine calls..*
1310Argument 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
1319send "help obscure\n"
1320expect {
1321 -re "Obscure features..*
1322List of commands:.*
1323Type \"help\" followed by command name for full documentation..*
1324Command 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
1332send "help output\n"
1333expect {
1334 -re "Like \"print\" but don't put in value history and don't print newline..*
1335This 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
1343send "help p\n"
1344expect {
1345 -re "Print value of expression EXP..*
1346Variables accessible are those of the lexical environment of the selected.*
1347EXP may be preceded with /FMT, where FMT is a format letter.*
1348but 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
1356send "help print\n"
1357expect {
1358 -re "Print value of expression EXP..*
1359Variables accessible are those of the lexical environment of the selected.*
1360EXP may be preceded with /FMT, where FMT is a format letter.*
1361but 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
1369send "help path\n"
1370expect {
1371 -re "Add directory DIR.s. to beginning of search path for object files..*
1372.cwd in the path means the current working directory..*
1373This path is equivalent to the .PATH shell variable. It is a list of.*
1374directories, separated by colons. These directories are searched to find.*
1375fully 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
1383send "help printcmds\n"
1384expect {
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
1393send "help printf\n"
1394expect {
1395 -re "printf \"printf format string\", arg1, arg2, arg3, ..., argn.*
1396This 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
1415send "help ptype\n"
1416expect {
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
1425send "help pwd\n"
1426expect {
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
1435send "help q\n"
1436expect {
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
1445send "help quit\n"
1446expect {
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
1455send "help r\n"
1456expect {
1457 -re "Start debugged program. You may specify arguments to give it..*
1458Args may include .*, or .*; they are expanded using \"sh\"..*
1459Input and output redirection with \".\", \".\", or \"..\" are also allowed..*
1460With no arguments, uses arguments last specified .with \"run\" or \"set args\"...*
1461To cancel previous arguments and run with no arguments,.*
1462use \"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
1470send "help run\n"
1471expect {
1472 -re "Start debugged program. You may specify arguments to give it..*
1473Args may include .*, or .*; they are expanded using \"sh\"..*
1474Input and output redirection with \".\", \".\", or \"..\" are also allowed..*
1475With no arguments, uses arguments last specified .with \"run\" or \"set args\"...*
1476To cancel previous arguments and run with no arguments,.*
1477use \"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
1485send "help rbreak\n"
1486expect {
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
1495send "help return\n"
1496expect {
1497 -re "Make selected stack frame return to its caller..*
1498Control remains in the debugger, but when you continue.*
1499execution will resume in the frame above the one now selected..*
1500If 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
1508send "help reverse-search\n"
1509expect {
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
1518send "help running\n"
1519expect {
1520 -re "Running the program..*
1521List of commands:.*
1522Type \"help\" followed by command name for full documentation..*
1523Command 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
1531send "help s\n"
1532expect {
1533 -re "Step program until it reaches a different source line..*
1534Argument 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
1542send "help step\n"
1543expect {
1544 -re "Step program until it reaches a different source line..*
1545Argument 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
1553send "help search\n"
1554expect {
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
1563send "help section\n"
1564expect {
1565 -re "Change the base address of section SECTION of the exec file to ADDR..*
1566This 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.*
1568file 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
1577send "help set args\n"
1578expect {
1579 -re "Set arguments to give program being debugged when it is started..*
1580Follow 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
1588send "help set c\n"
1589expect {
1590 -re "Set the status of the type/range checker.*
1591List of set check subcommands:.*
1592set check range -- Set range checking.*
1593set check type -- Set type checking.*
1594Type \"help set check\" followed by set check subcommand name for full documentation..*
1595Command 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
1603send "help set ch\n"
1604expect {
1605 -re "Set the status of the type/range checker.*
1606List of set check subcommands:.*
1607set check range -- Set range checking.*
1608set check type -- Set type checking.*
1609Type \"help set check\" followed by set check subcommand name for full documentation..*
1610Command 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
1618send "help set check\n"
1619expect {
1620 -re "Set the status of the type/range checker.*
1621List of set check subcommands:.*
1622set check range -- Set range checking.*
1623set check type -- Set type checking.*
1624Type \"help set check\" followed by set check subcommand name for full documentation..*
1625Command 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
1633send "help set check range\n"
1634expect {
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
1643send "help set check type\n"
1644expect {
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
1653send "help set complaints\n"
1654expect {
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
1663send "help set confirm\n"
1664expect {
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
1673send "help set editing\n"
1674expect {
1675 -re "Set editing of command lines as they are typed..*
1676Use \"on\" to enable to enable the editing, and \"off\" to disable it..*
1677Without an argument, command line editing is enabled. To edit, use.*
1678EMACS-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
1686send "help set environment\n"
1687expect {
1688 -re "Set environment variable value to give the program..*
1689Arguments are VAR VALUE where VAR is variable name and VALUE is value..*
1690VALUES of environment variables are uninterpreted strings..*
1691This 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
1699send "help set height\n"
1700expect {
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
1709send "help set history expansion\n"
1710expect {
1711 -re "Set history expansion on command input..*
1712Without 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
1720send "help set history filename\n"
1721expect {
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
1731send "help set history save\n"
1732expect {
1733 -re "Set saving of the history record on exit..*
1734Use \"on\" to enable to enable the saving, and \"off\" to disable it..*
1735Without 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
1743send "help set history size\n"
1744expect {
1745 -re "Set the size of the command history, .*
1746ie. 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
1754send "help set history\n"
1755expect {
1756 -re "Generic command for setting command history parameters..*
1757List of set history subcommands:.*
1758set history filename -- Set the filename in which to record the command history.*
1759set history size -- Set the size of the command history.*
1760set history save -- Set saving of the history record on exit.*
1761set history expansion -- Set history expansion on command input.*
1762Type \"help set history\" followed by set history subcommand name for full documentation..*
1763Command 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
1771send "help set language\n"
1772expect {
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
1781send "help set listsize\n"
1782expect {
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.
1797if 0 then {
1798send "help set p\n"
1799expect {
1800 -re ".*
1801Generic command for setting how things print..*
1802List of set print subcommands:.*
1803Type \"help set print\" followed by set print subcommand name for full documentation..*
1804Command 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
1811send "help set pr\n"
1812expect {
1813 -re ".*
1814Generic command for setting how things print..*
1815List of set print subcommands:.*
1816Type \"help set print\" followed by set print subcommand name for full documentation..*
1817Command 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
1825send "help set print\n"
1826expect {
1827 -re ".*
1828Generic command for setting how things print..*
1829List of set print subcommands:.*
1830Type \"help set print\" followed by set print subcommand name for full documentation..*
1831Command 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
1839send "help set print address\n"
1840expect {
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
1849send "help set print array\n"
1850expect {
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
1859send "help set print asm-demangle\n"
1860expect {
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
1869send "help set print demangle\n"
1870expect {
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
1879send "help set print elements\n"
1880expect {
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
1890send "help set print object\n"
1891expect {
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
1900send "help set print pretty\n"
1901expect {
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
1910send "help set print sevenbit-strings\n"
1911expect {
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
1920send "help set print union\n"
1921expect {
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
1930send "help set print vtbl\n"
1931expect {
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
1940send "help set prompt\n"
1941expect {
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
1950send "help set radix\n"
1951expect {
1952 -re "Set default input and output number radices.*
1953Use \'set input-radix\' or \'set output-radix\' to independently set each..*
1954Without 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
1965send "help set symbol-reloading\n"
1966expect {
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
1975send "help set variable\n"
1976expect {
1977 -re ".*
1978Evaluate expression EXP and assign result to variable VAR, using assignment.*
1979syntax appropriate for the current language .VAR = EXP or VAR := EXP for.*
1980example.. VAR may be a debugger \"convenience\" variable .names starting.*
1981with \\\$., a register .a few standard names starting with \\\$., or an actual.*
1982variable in the program being debugged. EXP is any valid expression.*
1983This 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
1991send "help set verbose\n"
1992expect {
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
2003send "help set width\n"
2004expect {
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.
2014if ![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.
2031if 0 then {
2032if ![istarget "*-*-ultrix*"] then {
2033 send "help set\n"
2034 expect {
2035 -re ".*
2036Evaluate expression EXP and assign result to variable VAR, using assignment.*
2037syntax appropriate for the current language .VAR = EXP or VAR := EXP for.*
2038example.. VAR may be a debugger \"convenience\" variable .names starting.*
2039with \\\$., a register .a few standard names starting with \\\$., or an actual.*
2040variable in the program being debugged. EXP is any valid expression.*
2041set listsize -- Set number of source lines gdb will list by default.*
2042Type \"help set\" followed by set subcommand name for full documentation..*
2043Command 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
2053send "help shell\n"
2054expect {
2055 -re "Execute the rest of the line as a shell command. .*
2056With 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
2064send "help show args\n"
2065expect {
2066 -re "Show arguments to give program being debugged when it is started..*
2067Follow 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
2075send "help show c\n"
2076expect {
2077 -re "Show the status of the type/range checker.*
2078List of show check subcommands:.*
2079show check range -- Show range checking.*
2080show check type -- Show type checking.*
2081Type \"help show check\" followed by show check subcommand name for full documentation..*
2082Command 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
2090send "help show check\n"
2091expect {
2092 -re "Show the status of the type/range checker.*
2093List of show check subcommands:.*
2094show check range -- Show range checking.*
2095show check type -- Show type checking.*
2096Type \"help show check\" followed by show check subcommand name for full documentation..*
2097Command 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
2105send "help show check range\n"
2106expect {
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
2115send "help show check type\n"
2116expect {
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
2125send "help show commands\n"
2126expect {
2127 -re "Show the the history of commands you typed..*
2128You can supply a command number to start with, or a `\[+\]' to start after.*
2129the 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
2137send "help show complaints\n"
2138expect {
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
2147send "help show confirm\n"
2148expect {
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
2157send "help show convenience\n"
2158expect {
2159 -re "Debugger convenience .\".foo\". variables..*
2160These variables are created when you assign them values;.*
2161thus, \"print .foo=1\" gives \".foo\" the value 1. Values may be any type..*
2162A 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
2172send "help show directories\n"
2173expect {
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
2184send "help show editing\n"
2185expect {
2186 -re "Show editing of command lines as they are typed..*
2187Use \"on\" to enable to enable the editing, and \"off\" to disable it..*
2188Without an argument, command line editing is enabled. To edit, use.*
2189EMACS-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
2197send "help show environment\n"
2198expect {
2199 -re "The environment to give the program, or one variable's value..*
2200With an argument VAR, prints the value of environment variable VAR to.*
2201give the program being debugged. With no arguments, prints the entire.*
2202environment 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
2210send "help show height\n"
2211expect {
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
2220send "help show history expansion\n"
2221expect {
2222 -re "Show history expansion on command input..*
2223Without 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
2231send "help show history filename\n"
2232expect {
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
2242send "help show history save\n"
2243expect {
2244 -re "Show saving of the history record on exit..*
2245Use \"on\" to enable to enable the saving, and \"off\" to disable it..*
2246Without 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
2254send "help show history size\n"
2255expect {
2256 -re "Show the size of the command history, .*
2257ie. 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
2265send "help show history\n"
2266expect {
2267 -re "Generic command for showing command history parameters..*
2268List of show history subcommands:.*
2269show history filename -- Show the filename in which to record the command history.*
2270show history size -- Show the size of the command history.*
2271show history save -- Show saving of the history record on exit.*
2272show history expansion -- Show history expansion on command input.*
2273Type \"help show history\" followed by show history subcommand name for full documentation..*
2274Command 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
2282send "help show language\n"
2283expect {
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
2292send "help show listsize\n"
2293expect {
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
2302send "help show p\n"
2303expect {
2304 -re "Generic command for showing print settings..*
2305List of show print subcommands:.*
2306Type \"help show print\" followed by show print subcommand name for full documentation..*
2307Command 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
2315send "help show pr\n"
2316expect {
2317 -re "Generic command for showing print settings..*
2318List of show print subcommands:.*
2319Type \"help show print\" followed by show print subcommand name for full documentation..*
2320Command 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
2328send "help show print\n"
2329expect {
2330 -re "Generic command for showing print settings..*
2331List of show print subcommands:.*
2332Type \"help show print\" followed by show print subcommand name for full documentation..*
2333Command 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
2341send "help show paths\n"
2342expect {
2343 -re "Current search path for finding object files..*
2344.cwd in the path means the current working directory..*
2345This path is equivalent to the .PATH shell variable. It is a list of.*
2346directories, separated by colons. These directories are searched to find.*
2347fully 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
2355send "help show print address\n"
2356expect {
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
2365send "help show print array\n"
2366expect {
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
2375send "help show print asm-demangle\n"
2376expect {
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
2385send "help show print demangle\n"
2386expect {
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
2395send "help show print elements\n"
2396expect {
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
2406send "help show print object\n"
2407expect {
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
2416send "help show print pretty\n"
2417expect {
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
2426send "help show print sevenbit-strings\n"
2427expect {
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
2436send "help show print union\n"
2437expect {
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
2446send "help show print vtbl\n"
2447expect {
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
2456send "help show prompt\n"
2457expect {
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
2466send "help show radix\n"
2467expect {
2468 -re "Show the default input and output number radices.*
2469Use \'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
2480send "help show symbol-reloading\n"
2481expect {
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
2490send "help show user\n"
2491expect {
2492 -re "Show definitions of user defined commands..*
2493Argument is the name of the user defined command..*
2494With 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
2502send "help show values\n"
2503expect {
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
2512send "help show verbose\n"
2513expect {
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
2524send "help show version\n"
2525expect {
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
2534send "help show width\n"
2535expect {
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.
2545if ![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
2556send "help show\n"
2557expect {
2558 -re "Generic command for showing things about the debugger..*
2559List of show subcommands:.*
2560show listsize -- Show number of source lines gdb will list by default.*
2561show directories -- Current search path for finding source files.*
2562Type \"help show\" followed by show subcommand name for full documentation..*
2563Command 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
2572send "help step\n"
2573expect {
2574 -re "Step program until it reaches a different source line..*
2575Argument 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
2582send "help si\n"
2583expect {
2584 -re "Step one instruction exactly..*
2585Argument 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
2593send "help stepi\n"
2594expect {
2595 -re "Step one instruction exactly..*
2596Argument 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
2604send "help signal\n"
2605expect {
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
2615send "help source\n"
2616expect {
2617 -re "Read commands from a file named FILE..*
2618Note that the file \".(vx)?gdbinit\" is read automatically in this way.*
2619when 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
2627send "help stack\n"
2628expect {
2629 -re "Examining the stack..*
2630The stack is made up of stack frames. Gdb assigns numbers to stack frames.*
2631counting from zero for the innermost .currently executing. frame..*
2632At any time gdb identifies one frame as the \"selected\" frame..*
2633Variable lookups are done with respect to the selected frame..*
2634When the program being debugged stops, gdb selects the innermost frame..*
2635The commands below can be used to select other frames by number or address..*
2636List of commands:.*
2637bt -- Print backtrace of all stack frames.*
2638backtrace -- Print backtrace of all stack frames.*
2639select-frame -- Select a stack frame without printing anything.*
2640frame -- Select and print a stack frame.*
2641down -- Select and print stack frame called by this one.*
2642up -- Select and print stack frame that called this one.*
2643return -- Make selected stack frame return to its caller.*
2644Type \"help\" followed by command name for full documentation..*
2645Command 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
2653send "help status\n"
2654expect {
2655 -re "Status inquiries..*
2656List of commands:.*
2657show -- Generic command for showing things about the debugger.*
2658info -- Generic command for showing things about the program being debugged.*
2659Type \"help\" followed by command name for full documentation..*
2660Command 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.
2674if 0 then {
2675send "help support\n"
2676expect {
2677 -re "Support facilities..*
2678List of commands:.*
2679show confirm -- Show whether to confirm potentially dangerous operations.*
2680show history -- Generic command for showing command history parameters.*
2681down-silently -- Same as the `down' command.*
2682up-silently -- Same as the `up' command.*
2683Type \"help\" followed by command name for full documentation..*
2684Command 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
2692send "help symbol-file\n"
2693expect {
2694 -re "Load symbol table from executable file FILE..*
2695The `file' command can also load symbol tables, as well as setting the file.*
2696to 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
2704send "help target child\n"
2705expect {
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
2716send "help target procfs\n"
2717expect {
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
2728send "help target core\n"
2729expect {
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
2740send "help target exec\n"
2741expect {
2742 -re "Use an executable file as a target..*
2743Specify 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
2751if ![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..*
2755Specify 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"
2764send "help target\n"
2765expect {
2766 -re "Connect to a target machine or process..*
2767The first argument is the type or protocol of the target machine..*
2768Remaining arguments are interpreted by the target protocol. For more.*
2769information on the arguments for a particular protocol, type.*
2770`help target ' followed by the protocol name..*
2771List of target subcommands:.*
2772target exec -- Use an executable file as a target.*
2773Type \"help target\" followed by target subcommand name for full documentation..*
2774Command 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
2782send "help tbreak\n"
2783expect {
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
2792send "help tty\n"
2793expect {
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
2802send "help u\n"
2803expect {
2804 -re "Execute until the program reaches a source line greater than the current.*
2805or a specified line or address or function .same args as break command...*
2806Execution 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
2814send "help until\n"
2815expect {
2816 -re "Execute until the program reaches a source line greater than the current.*
2817or a specified line or address or function .same args as break command...*
2818Execution 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
2826send "help undisplay\n"
2827expect {
2828 -re "Cancel some expressions to be displayed when program stops..*
2829Arguments are the code numbers of the expressions to stop displaying..*
2830No argument means cancel all automatic-display expressions..*
2831\"delete display\" has the same effect as this command..*
2832Do \"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
2840send "help unset environment\n"
2841expect {
2842 -re "Cancel environment variable VAR for the program..*
2843This 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
2851send "help unset\n"
2852expect {
2853 -re "Complement to certain \"set\" commands.*
2854List of unset subcommands:.*
2855unset environment -- Cancel environment variable VAR for the program.*
2856Type \"help unset\" followed by unset subcommand name for full documentation..*
2857Command 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
2865send "help up\n"
2866expect {
2867 -re "Select and print stack frame that called this one..*
2868An 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
2876send "help up-silently\n"
2877expect {
2878 -re "Same as the `up' command, but does not print anything..*
2879This 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
2887send "help user-defined\n"
2888expect {
2889 -re "User-defined commands..*
2890The commands in this class are those defined by the user..*
2891Use the \"define\" command to define a command..*
2892List of commands:.*
2893Type \"help\" followed by command name for full documentation..*
2894Command 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
2902send "help watch\n"
2903expect {
2904 -re "Set a watchpoint for an expression..*
2905A watchpoint stops execution of your program whenever the value of.*
2906an 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
2914send "help whatis\n"
2915expect {
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
2924send "help where\n"
2925expect {
2926 -re "Print backtrace of all stack frames, or innermost COUNT frames..*
2927With 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
2935send "help x\n"
2936expect {
2937 -re "Examine memory: x/FMT ADDRESS..*
2938ADDRESS is an expression for the memory address to examine..*
2939FMT is a repeat count followed by a format letter and a size letter..*
2940Defaults for format and size letters are those previously used..*
2941Default count is 1. Default address is following last thing printed.*
2942with 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
2950send "help info bogus-gdb-command\n"
2951expect {
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
2960send "help gotcha\n"
2961expect {
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
This page took 0.131545 seconds and 4 git commands to generate.