2002-03-22 Michael Snyder <msnyder@redhat.com>
[deliverable/binutils-gdb.git] / gdb / testsuite / gdb.base / help.exp
index 54bfdb10c68a4d46467f49c52032977739d3f3e5..49f6ed8f7c5b8cde17854daf931b840af4f44264 100644 (file)
@@ -1,4 +1,5 @@
-#   Copyright (C) 1988, 1990, 1991, 1992, 1997, 1998
+#   Copyright 1988, 1990, 1991, 1992, 1994, 1995, 1996, 1997, 1998, 1999,
+#   2000
 #   Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
@@ -34,7 +35,7 @@ gdb_test "set height 400" "" "test set height"
 
 # use a larger expect input buffer for long help outputs.
 # test help add-symbol-file
-gdb_test "help add-symbol-file" "Usage: add-symbol-file FILE ADDR.*\[\r\n\]+Load the symbols from FILE, assuming FILE has been dynamically loaded..*\[\r\n\]+ADDR is the starting address of the file\'s text."  "help add-symbol-file"
+gdb_test "help add-symbol-file" "Usage: add-symbol-file FILE ADDR .-s <SECT> <SECT_ADDR> -s <SECT> <SECT_ADDR> ....*\[\r\n\]+Load the symbols from FILE, assuming FILE has been dynamically loaded..*\[\r\n\]+ADDR is the starting address of the file's text..*\[\r\n\]+The optional arguments are section-name section-address pairs and.*\[\r\n\]+should be specified if the data and bss segments are not contiguous.*\[\r\n\]+with the text. SECT is a section name to be loaded at SECT_ADDR." "help add-symbol-file"
 # test help aliases
 gdb_test "help aliases" "Aliases of other commands..*\[\r\n\]+List of commands\:.*\[\r\n\]+Type \"help\" followed by command name for full documentation..*\[\r\n\]+Command name abbreviations are allowed if unambiguous." "help aliases"
 gdb_test "help attach" "Attach to a process or file outside of GDB..*\[\r\n\]+This command attaches to another target, of the same type as your last.*\[\r\n\]+\"target\" command .\"info files\" will show your target stack.*\[\r\n\]+The command may take as argument a process id or a device file..*\[\r\n\]+For a process id, you must have permission to send the process a signal,.*\[\r\n\]+and it must have the same effective uid as the debugger..*\[\r\n\]+When using \"attach\" with a process id, the debugger finds the.*\[\r\n\]+program running in the process, looking first in the current working.*\[\r\n\]+directory, or .if not found there. using the source file search path.*\[\r\n\]+\\(see the \"directory\" command\\).  You can also use the \"file\" command.*\[\r\n\]+to specify the program, and to load its symbol table." "help attach"
@@ -148,6 +149,27 @@ gdb_test "help files" "Specifying.*" "help files"
 gdb_test "help finish" "Execute until selected stack frame returns..*\[\r\n\]+Upon return, the value returned is printed and put in the value history." "help finish"
 # test help forward-search
 gdb_test "help forward-search" "Search for regular expression .see regex.3.. from last line listed..*"  "help forward-search"
+# test help gcore
+send_gdb "help gcore\n"
+gdb_expect {
+    -re "Undefined command: \"gcore\".  Try \"help\".*$gdb_prompt $" {
+       pass "help gcore"
+    }
+    -re "Save a core file with the current state of the debugged process.\[\r\n\]+Argument is optional filename.  Default filename is 'core.<process_id>'.*$gdb_prompt $" {
+       pass "help gcore"
+    }
+    default { fail "help gcore" }
+}
+send_gdb "help generate-core-file\n"
+gdb_expect {
+    -re "Undefined command: \"generate-core-file\".  Try \"help\".*$gdb_prompt $" {
+       pass "help gcore"
+    }
+    -re "Save a core file with the current state of the debugged process.\[\r\n\]+Argument is optional filename.  Default filename is 'core.<process_id>'.*$gdb_prompt $" {
+       pass "help gcore"
+    }
+    default { fail "help gcore" }
+}
 # test help help "h" abbreviation 
 gdb_test "help h" "Print list of commands."  "help help \"h\" abbreviation"
 # test help help
@@ -504,7 +526,7 @@ gdb_test "help target core" ".*Use a core file as a target.*Specify the filename
 # test help target exec
 gdb_test "help target exec" "Use an executable file as a target..*\[\r\n\]+Specify the filename of the executable file." "help target exec"
 # test help target remote
-gdb_test "help target remote" "Use a remote computer via a serial line, using a gdb-specific protocol..*\[\r\n\]+Specify the serial device it is connected to .e.g. /dev/ttya..*" "help target remote"
+gdb_test "help target remote" "Use a remote computer via a serial line, using a gdb-specific protocol..*\[\r\n\]+Specify the serial device it is connected to.*\[\r\n\]+.e.g. .*" "help target remote"
 # test help target
 # the child process target may be "target child" or "target procfs"
 gdb_test "help target" "Connect to a target machine or process..*\[\r\n\]+The first argument is the type or protocol of the target machine..*\[\r\n\]+Remaining arguments are interpreted by the target protocol.  For more.*\[\r\n\]+information on the arguments for a particular protocol, type.*\[\r\n\]+`help target ' followed by the protocol name..*\[\r\n\]+List of target subcommands:.*\[\r\n\]+target exec -- Use an executable file as a target.*\[\r\n\]+Type \"help target\" followed by target subcommand name for full documentation..*\[\r\n\]+Command name abbreviations are allowed if unambiguous." "help target"
@@ -540,3 +562,9 @@ gdb_test "help x" "Examine memory: x/FMT ADDRESS..*\[\r\n\]+ADDRESS is an expres
 gdb_test "help info bogus-gdb-command" "Undefined info command: \"bogus-gdb-command\".  Try \"help info\"."  "help info bogus-gdb-command"
 # test help gotcha
 gdb_test "help gotcha" "Undefined command: \"gotcha\".  Try \"help\"."  "help gotcha"
+# test apropos regex
+gdb_test "apropos \\\(print\[\^ bsiedf\\\".-\]\\\)" "handle -- Specify how to handle a signal"
+# test apropos >1 word string
+gdb_test "apropos handle a signal" "handle -- Specify how to handle a signal"
+# test apropos apropos
+gdb_test "apropos apropos" "apropos -- Search for commands matching a REGEXP"
This page took 0.024357 seconds and 4 git commands to generate.