Fix regression in default.exp caused by _caller_is, etc.
[deliverable/binutils-gdb.git] / gdb / testsuite / gdb.base / default.exp
index 5a73fcc160a99c85e2fa182980edf3fffc6cf5b8..ab74bdbadbefb0264190a1d9d2a94ab08c7aad82 100644 (file)
@@ -1,5 +1,4 @@
-#   Copyright 1988, 1990-1992, 1994-2003, 2005-2012 Free Software
-#   Foundation, Inc.
+#   Copyright 1988-2014 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -84,7 +83,7 @@ gdb_test "call" "The history is empty..*" "call"
 gdb_test "catch" "Catch requires an event name..*" "catch"
 
 #test cd
-gdb_test "cd" "Working directory \[^\r\n\]*\\."
+gdb_test "cd" "Working directory \[^\r\n\]*\(\r\n \\(canonically \[^\r\n\]*\\)\)?\\."
 
 #test clear
 gdb_test "clear" "No source file specified..*" "clear"
@@ -495,12 +494,13 @@ gdb_test "section" "Must specify section name and its virtual address.*" "sectio
 gdb_test "set annotate" "Argument required .integer to set it to.*" "set annotate"
 #test set args
 gdb_test_no_output "set args" "set args"
-#test set check "c" abbreviation
-gdb_test "set c" "\"set check\" must be followed by the name of a check subcommand.(\[^\r\n\]*\[\r\n\])+List of set check subcommands:(\[^\r\n\]*\[\r\n\])+set check range -- Set range checking(\[^\r\n\]*\[\r\n\])+set check type -- Set type checking(\[^\r\n\]*\[\r\n\])+Type \"help set check\" followed by set check subcommand name for full documentation.(\[^\r\n\]*\[\r\n\])+Command name abbreviations are allowed if unambiguous." "set check \"c\" abbreviation"
-#test set check "ch" abbreviation
-gdb_test "set ch" "\"set check\" must be followed by the name of a check subcommand.(\[^\r\n\]*\[\r\n\])+List of set check subcommands:(\[^\r\n\]*\[\r\n\])+set check range -- Set range checking(\[^\r\n\]*\[\r\n\])+set check type -- Set type checking(\[^\r\n\]*\[\r\n\])+Type \"help set check\" followed by set check subcommand name for full documentation.(\[^\r\n\]*\[\r\n\])+Command name abbreviations are allowed if unambiguous." "set check \"ch\" abbreviation"
-#test set check
-gdb_test "set check" "\"set check\" must be followed by the name of a check subcommand.(\[^\r\n\]*\[\r\n\])+List of set check subcommands:(\[^\r\n\]*\[\r\n\])+set check range -- Set range checking(\[^\r\n\]*\[\r\n\])+set check type -- Set type checking(\[^\r\n\]*\[\r\n\])+Type \"help set check\" followed by set check subcommand name for full documentation.(\[^\r\n\]*\[\r\n\])+Command name abbreviations are allowed if unambiguous." "set check"
+
+# Test set check abbreviations
+foreach x {"c" "ch" "check"} {
+    gdb_test "set $x" "\"set check\" must be followed by the name of a check subcommand.(\[^\r\n\]*\[\r\n\])+List of set check subcommands:(\[^\r\n\]*\[\r\n\])+set check range -- Set range checking(\[^\r\n\]*\[\r\n\])+set check type -- Set strict type checking(\[^\r\n\]*\[\r\n\])+Type \"help set check\" followed by set check subcommand name for full documentation.(\[^\r\n\]*\[\r\n\])+Command name abbreviations are allowed if unambiguous." \
+       "set check \"$x\" abbreviation"
+}
+
 #test set check range
 gdb_test "set check range" ".*" "set check range"
 #test set check type
@@ -521,6 +521,9 @@ gdb_test "set height" "Argument required .integer to set it to.*" "set height"
 gdb_test_no_output "set history expansion" "set history expansion"
 #test set history filename
 gdb_test "set history filename" "Argument required .filename to set it to.*" "set history filename"
+# Make sure the history ends up in the right place.
+gdb_test_no_output "set history filename [standard_output_file .gdb_history]" \
+    "set the history filename"
 #test set history save
 gdb_test_no_output "set history save" "set history save"
 #test set history size
@@ -577,16 +580,17 @@ gdb_test "shell echo Hi dad!" "Hi dad!" "shell echo Hi dad!"
 gdb_test "show annotate" "Annotation_level is 0."       "show annotate"
 #test show args
 gdb_test "show args" "Argument list to give program being debugged when it is started is \"\"." "show args"
-#test show check "c" abbreviation
-gdb_test "show c" "range:  *Range checking is \"auto; currently off\".(\[^\r\n\]*\[\r\n\])+type:  *Type checking is \"auto; currently off\".*" "show check \"c\" abbreviation"
-#test show check "ch" abbreviation
-gdb_test "show ch" "range: *Range checking is \"auto; currently off\".(\[^\r\n\]*\[\r\n\])+type:  *Type checking is \"auto; currently off\"." "show check \"ch\" abbreviation"
-#test show check
-gdb_test "show check" "range:  *Range checking is \"auto; currently off\".(\[^\r\n\]*\[\r\n\])+type:  *Type checking is \"auto; currently off\"." "show check"
+
+# test show check abbreviations
+foreach x {"c" "ch" "check"} {
+    gdb_test "show $x" "range:  *Range checking is \"auto; currently off\".(\[^\r\n\]*\[\r\n\])+type:  *Strict type checking is on\..*" \
+       "show check \"$x\" abbreviation"
+}
+
 #test show check range
 gdb_test "show check range" "Range checking is \"auto; currently off\"." "show check range"
 #test show check type
-gdb_test "show check type" "Type checking is \"auto; currently off\"." "show check type"
+gdb_test "show check type" "Strict type checking is on\." "show check type"
 #test show commands
 gdb_test "show commands" ".*" "show commands"
 #test show complaints
@@ -603,6 +607,7 @@ set show_conv_list \
        {$_sdata = void} \
        {$_siginfo = void} \
        {$_thread = 0} \
+       {$_exception = <error: No frame selected>} \
        {$_probe_argc = <error: No frame selected>} \
        {$_probe_arg0 = <error: No frame selected>} \
        {$_probe_arg1 = <error: No frame selected>} \
@@ -616,6 +621,7 @@ set show_conv_list \
        {$_probe_arg9 = <error: No frame selected>} \
        {$_probe_arg10 = <error: No frame selected>} \
        {$_probe_arg11 = <error: No frame selected>} \
+       {$_isvoid = <internal function _isvoid>} \
     }
 if ![skip_python_tests] {
     append show_conv_list \
@@ -624,6 +630,10 @@ if ![skip_python_tests] {
            {$_regex = <internal function _regex>} \
            {$_streq = <internal function _streq>} \
            {$_strlen = <internal function _strlen>} \
+           {$_caller_is = <internal function _caller_is>} \
+           {$_caller_matches = <internal function _caller_matches>} \
+           {$_any_caller_is = <internal function _any_caller_is>} \
+           {$_any_caller_matches = <internal function _any_caller_matches>} \
        }
 }
 gdb_test_list_exact "show convenience" "show convenience" \
@@ -662,7 +672,7 @@ gdb_test "show paths" "Executable and object file path:.*" "show paths"
 #test show print address
 gdb_test "show print address" "Printing of addresses is on." "show print address"
 #test show print array
-gdb_test "show print array" "Prettyprinting of arrays is on." "show print array"
+gdb_test "show print array" "Pretty formatting of arrays is on." "show print array"
 #test show print asm-demangle
 gdb_test "show print asm-demangle" "Demangling of C\[+\]+/ObjC names in disassembly listings is on." "show print asm-demangle"
 #test show print demangle
@@ -672,7 +682,7 @@ gdb_test "show print elements" "Limit on string chars or array elements to print
 #test show print object
 gdb_test "show print object" "Printing of object's derived type based on vtable info is on." "show print object"
 #test show print pretty
-gdb_test "show print pretty" "Prettyprinting of structures is on." "show print pretty"
+gdb_test "show print pretty" "Pretty formatting of structures is on." "show print pretty"
 #test show print sevenbit-strings
 gdb_test "show print sevenbit-strings" "Printing of 8-bit characters in strings as .nnn is on." "show print sevenbit-strings"
 #test show print union
@@ -723,6 +733,8 @@ gdb_test_multiple "show" "show" {
        }
     }
 }
+#history saving should stay disabled
+gdb_test_no_output "set history save off" "set history save off"
 #test stepi "si" abbreviation
 gdb_test  "si" "The program is not being run." "stepi \"si\" abbreviation"
 #test stepi
@@ -738,11 +750,8 @@ gdb_test "step" "The program is not being run." "step #2"
 #test symbol-file
 gdb_test "symbol-file" ".*" "symbol-file"
 
-#test target child
-gdb_test "target child" "Use the \"run\" command to start a Unix child process.*|Undefined target command: \"child\".  *Try \"help target\".*" "target child"
-
-#test target procfs
-gdb_test "target procfs" "Use the \"run\" command to start a Unix child process.*|Undefined target command: \"procfs\".  *Try \"help target\".*" "target procfs"
+#test target native
+gdb_test "target native" "Use the \"run\" command to start a process.*|Undefined target command: \"native\".  *Try \"help target\".*" "target native"
 
 #test target core
 send_gdb "target core\n"
This page took 0.027318 seconds and 4 git commands to generate.