aboutsummaryrefslogtreecommitdiff
path: root/gdb/testsuite
diff options
context:
space:
mode:
authorPedro Alves <palves@redhat.com>2009-08-13 14:58:27 +0000
committerPedro Alves <palves@redhat.com>2009-08-13 14:58:27 +0000
commitb84aa90aa5b2c265030ca85a70a4547f8f893690 (patch)
tree0c3dc61f8a3e6cbba1bef1f8ea963909ac7a03cc /gdb/testsuite
parent5efd5804f7ba64dc4c42d8c3db2d4ab2eeebac75 (diff)
downloadgdb-b84aa90aa5b2c265030ca85a70a4547f8f893690.zip
gdb-b84aa90aa5b2c265030ca85a70a4547f8f893690.tar.gz
gdb-b84aa90aa5b2c265030ca85a70a4547f8f893690.tar.bz2
2009-08-13 Pedro Alves <pedro@codesourcery.com>
PR gdb/8869: * language.c (language, type, range, case_sensitive): Make const. (show_language_command): Don't call deprecated_show_value_hack. Special case "auto". (set_language_command): An unrecognized language is now an internal error instead of a user error. Don't call set_lang_str. (show_type_command): Don't call deprecated_show_value_hack. Special case "auto". Use warning. (set_type_command): An unrecognized type is now an internal error instead of a user error. Output type check mismatch with language here. Don't call set_type_str. (show_range_command): Don't call deprecated_show_value_hack. Special case "auto". Use warning. (set_range_command): An unrecognized range check is now an internal error instead of a warning. Output range check mismatch with language here. Don't call set_range_str. (show_case_command): Don't call deprecated_show_value_hack. Special case "auto". Use warning. (set_case_command): Don't call set_case_str. An unrecognized case check is now an internal error instead of a warning. Output range check mismatch with language here. Don't call set_case_str. (set_type_range_case): Don't call set_type_str, set_range_str or set_case_str here. (set_lang_str, set_type_str, set_range_str, set_case_str): Delete. (add_language): Install or reinstall the "set language" command here, and make it an enum command. Build the enumeration and the help string from the current list of known languages. (_initialize_language): Don't install "set language" here. Make "set check type", "set check range" and "set case-sensitive" enum commands. Register the "auto" "local" and "unknown" languages in that order. 2009-08-13 Pedro Alves <pedro@codesourcery.com> * gdb.base/default.exp: Adjust "set language test": it's now an enum command. Larger help string moved to "help set language". * gdb.base/help.exp: Adjust "help set language" expected output, now lists all known languages.
Diffstat (limited to 'gdb/testsuite')
-rw-r--r--gdb/testsuite/ChangeLog7
-rw-r--r--gdb/testsuite/gdb.base/default.exp2
-rw-r--r--gdb/testsuite/gdb.base/help.exp3
3 files changed, 10 insertions, 2 deletions
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog
index f5809c7..0807d82 100644
--- a/gdb/testsuite/ChangeLog
+++ b/gdb/testsuite/ChangeLog
@@ -1,3 +1,10 @@
+2009-08-13 Pedro Alves <pedro@codesourcery.com>
+
+ * gdb.base/default.exp: Adjust "set language test": it's now an
+ enum command. Larger help string moved to "help set language".
+ * gdb.base/help.exp: Adjust "help set language" expected output,
+ now lists all known languages.
+
2009-08-11 Nathan Froyd <froydnj@codesourcery.com>
* gdb.arch/altivec-abi.exp (altivec_abi_tests): Turn on printing of
diff --git a/gdb/testsuite/gdb.base/default.exp b/gdb/testsuite/gdb.base/default.exp
index d47d263..a223982 100644
--- a/gdb/testsuite/gdb.base/default.exp
+++ b/gdb/testsuite/gdb.base/default.exp
@@ -530,7 +530,7 @@ gdb_test "set history size" "Argument required .integer to set it to.*" "set his
#test set history
gdb_test "set history" "\"set history\" must be followed by the name of a history subcommand.(\[^\r\n\]*\[\r\n\])+List of set history subcommands:(\[^\r\n\]*\[\r\n\])+set history expansion -- Set history expansion on command input(\[^\r\n\]*\[\r\n\])+set history filename -- Set the filename in which to record the command history(\[^\r\n\]*\[\r\n\])+set history save -- Set saving of the history record on exit(\[^\r\n\]*\[\r\n\])+set history size -- Set the size of the command history(\[^\r\n\]*\[\r\n\])+Type \"help set history\" followed by set history subcommand name for full documentation.(\[^\r\n\]*\[\r\n\])+Command name abbreviations are allowed if unambiguous." "set history"
#test set language
-gdb_test "set language" "The currently understood settings are:(\[^\r\n\]*\[\r\n\])+local or auto *Automatic setting based on source file(\[^\r\n\]*\[\r\n\])+c *Use the C language(\[^\r\n\]*\[\r\n\])+c\[+\]+ *Use the C\[+\]+ language(\[^\r\n\]*\[\r\n\])+modula-2 *Use the Modula-2 language.*" "set language"
+gdb_test "set language" "Requires an argument. Valid arguments are auto, local, unknown, ada, c, c.., asm, minimal, fortran, objective-c, java, modula-2, pascal, scheme." "set language"
#test set listsize
gdb_test "set listsize" "Argument required .integer to set it to.*" "set listsize"
#test set print "p" abbreviation
diff --git a/gdb/testsuite/gdb.base/help.exp b/gdb/testsuite/gdb.base/help.exp
index 5fc680b..d76cc36 100644
--- a/gdb/testsuite/gdb.base/help.exp
+++ b/gdb/testsuite/gdb.base/help.exp
@@ -418,7 +418,8 @@ test_prefix_command_help {"set history"} {
"Generic command for setting command history parameters\.\[\r\n\]+"
}
# test help set language
-gdb_test "help set language" "Set the current source language\." "help set language"
+gdb_test "help set language" "Set the current source language\.\[\r\n\]+The currently understood settings are:(\[^\r\n\]*\[\r\n\])+local or auto *Automatic setting based on source file(\[^\r\n\]*\[\r\n\])+c *Use the C language(\[^\r\n\]*\[\r\n\])+c\[+\]+ *Use the C\[+\]+ language(\[^\r\n\]*\[\r\n\])+modula-2 *Use the Modula-2 language.*" "help set language"
+
# test help set listsize
gdb_test "help set listsize" "Set number of source lines gdb will list by default\." "help set listsize"
# test help set print "p" abbreviation