From: Michael Snyder Date: Sat, 23 Mar 2002 00:03:01 +0000 (+0000) Subject: 2002-03-22 Michael Snyder X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=d43e73eedd2ee3f5113cca1ed236a351444becac;p=binutils-gdb.git 2002-03-22 Michael Snyder * gdb.base/default.exp: Add test for gcore. * gdb.base/help.exp: Add test for gcore. --- diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog index 90b95e9b9b5..2c684c6e224 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2002-03-22 Michael Snyder + + * gdb.base/default.exp: Add test for gcore. + * gdb.base/help.exp: Add test for gcore. + 2002-03-06 Fred Fish * gdb.base/funcargs.c: Remove extraneous ';' character. diff --git a/gdb/testsuite/gdb.base/default.exp b/gdb/testsuite/gdb.base/default.exp index 17d70273c40..5d6b6658685 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 a09f8da69ad..49f6ed8f7c5 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.'.*$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.'.*$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