aboutsummaryrefslogtreecommitdiff
path: root/gdb
diff options
context:
space:
mode:
authorMichael Snyder <msnyder@vmware.com>2002-03-23 00:03:01 +0000
committerMichael Snyder <msnyder@vmware.com>2002-03-23 00:03:01 +0000
commitd43e73eedd2ee3f5113cca1ed236a351444becac (patch)
tree7acccd340931a6d60254909eaea5242efda7f69f /gdb
parentd8a9ce69b0abb6a20815c9f849d01e0b034d1f53 (diff)
downloadgdb-d43e73eedd2ee3f5113cca1ed236a351444becac.zip
gdb-d43e73eedd2ee3f5113cca1ed236a351444becac.tar.gz
gdb-d43e73eedd2ee3f5113cca1ed236a351444becac.tar.bz2
2002-03-22 Michael Snyder <msnyder@redhat.com>
* gdb.base/default.exp: Add test for gcore. * gdb.base/help.exp: Add test for gcore.
Diffstat (limited to 'gdb')
-rw-r--r--gdb/testsuite/ChangeLog5
-rw-r--r--gdb/testsuite/gdb.base/default.exp21
-rw-r--r--gdb/testsuite/gdb.base/help.exp21
3 files changed, 47 insertions, 0 deletions
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog
index 90b95e9..2c684c6 100644
--- a/gdb/testsuite/ChangeLog
+++ b/gdb/testsuite/ChangeLog
@@ -1,3 +1,8 @@
+2002-03-22 Michael Snyder <msnyder@redhat.com>
+
+ * gdb.base/default.exp: Add test for gcore.
+ * gdb.base/help.exp: Add test for gcore.
+
2002-03-06 Fred Fish <fnf@redhat.com>
* gdb.base/funcargs.c: Remove extraneous ';' character.
diff --git a/gdb/testsuite/gdb.base/default.exp b/gdb/testsuite/gdb.base/default.exp
index 17d7027..5d6b665 100644
--- a/gdb/testsuite/gdb.base/default.exp
+++ b/gdb/testsuite/gdb.base/default.exp
@@ -259,6 +259,27 @@ gdb_test "finish" "The program is not running." "finish"
# The message here comes from the regexp library, not gdb, and so can
# vary on different systems.
gdb_test "forward-search" "No previous regular expression.*|There is no previous regular expression.*" "forward-search"
+#test gcore
+send_gdb "gcore\n"
+gdb_expect {
+ -re "You can\'t do that without a process to debug.*$gdb_prompt $" {
+ pass "gcore"
+ }
+ -re "Undefined command: .*$gdb_prompt $" {
+ pass "gcore"
+ }
+ default { fail "gcore" }
+}
+send_gdb "generate-core-file\n"
+gdb_expect {
+ -re "You can\'t do that without a process to debug.*$gdb_prompt $" {
+ pass "generate-core-file"
+ }
+ -re "Undefined command: .*$gdb_prompt $" {
+ pass "generate-core-file"
+ }
+ default { fail "generate-core-file" }
+}
#test help "h" abbreviation
gdb_test "h" "List of classes of commands:(\[^\r\n\]*\[\r\n\])+aliases -- Aliases of other commands(\[^\r\n\]*\[\r\n\])+breakpoints -- Making program stop at certain points(\[^\r\n\]*\[\r\n\])+data -- Examining data(\[^\r\n\]*\[\r\n\])+files -- Specifying and examining files(\[^\r\n\]*\[\r\n\])+obscure -- Obscure features(\[^\r\n\]*\[\r\n\])+running -- Running the program(\[^\r\n\]*\[\r\n\])+stack -- Examining the stack(\[^\r\n\]*\[\r\n\])+status -- Status inquiries(\[^\r\n\]*\[\r\n\])+support -- Support facilities(\[^\r\n\]*\[\r\n\])+user-defined -- User-defined commands(\[^\r\n\]*\[\r\n\])+Type \"help\" followed by a class name for a list of commands in that class.(\[^\r\n\]*\[\r\n\])+Type \"help\" followed by command name for full documentation.(\[^\r\n\]*\[\r\n\])+Command name abbreviations are allowed if unambiguous." "help \"h\" abbreviation"
#test help
diff --git a/gdb/testsuite/gdb.base/help.exp b/gdb/testsuite/gdb.base/help.exp
index a09f8da..49f6ed8 100644
--- a/gdb/testsuite/gdb.base/help.exp
+++ b/gdb/testsuite/gdb.base/help.exp
@@ -149,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