Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(68)

Unified Diff: gdb/testsuite/gdb.base/default.exp

Issue 124383005: GDB 7.6.50 (Closed) Base URL: http://git.chromium.org/native_client/nacl-gdb.git@upstream
Patch Set: Created 6 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « gdb/testsuite/gdb.base/debug-expr.exp ('k') | gdb/testsuite/gdb.base/define.exp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gdb/testsuite/gdb.base/default.exp
diff --git a/gdb/testsuite/gdb.base/default.exp b/gdb/testsuite/gdb.base/default.exp
index 73fbe98fb4940d7d96ccba58e48610a86dc068bc..627aebad49fddf44d4cfe1ba16954ce153eb9aba 100644
--- a/gdb/testsuite/gdb.base/default.exp
+++ b/gdb/testsuite/gdb.base/default.exp
@@ -1,5 +1,4 @@
-# Copyright 1988, 1990-1992, 1994-2003, 2005-2012 Free Software
-# Foundation, Inc.
+# Copyright 1988-2013 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" "Argument required .new working directory.*" "cd"
+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
@@ -595,15 +599,15 @@ gdb_test "show complaints" "Max number of complaints about incorrect symbols is
gdb_test "show confirm" "Whether to confirm potentially dangerous operations is o\[a-z\]*." "show confirm"
#test show convenience
-# This is tricker as there are multiple internal convenience vars and we
-# can't assume any particular order.
-gdb_test_list_exact "show convenience" "show convenience" \
- "\[^\r\n\]+\[\r\n\]+" \
- "\[^\r\n\]+" \
+# This is trickier as there are multiple internal convenience vars and
+# functions and we can't assume any particular order.
+# And we have to handle the extra convenience funs provided by Python.
+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>} \
@@ -617,7 +621,21 @@ gdb_test_list_exact "show convenience" "show convenience" \
{$_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 \
+ {
+ {$_memeq = <internal function _memeq>} \
+ {$_regex = <internal function _regex>} \
+ {$_streq = <internal function _streq>} \
+ {$_strlen = <internal function _strlen>} \
+ }
+}
+gdb_test_list_exact "show convenience" "show convenience" \
+ "\[^\r\n\]+\[\r\n\]+" \
+ "\[^\r\n\]+" \
+ $show_conv_list
#test show directories
gdb_test "show directories" "Source directories searched: .cdir\[:;\].cwd" "show directories"
@@ -650,7 +668,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
@@ -660,7 +678,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
@@ -711,6 +729,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
« no previous file with comments | « gdb/testsuite/gdb.base/debug-expr.exp ('k') | gdb/testsuite/gdb.base/define.exp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698