-# 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
gdb_test "append binary value" "Missing filename\."
if !$use_gdb_stub {
- setup_xfail "mips-idt-*"
gdb_test_multiple "attach" "attach" {
-re "Argument required .(process-id|program) to attach.*$gdb_prompt $"\
{ pass "attach" }
}
- setup_xfail "mips-idt-*"
gdb_test "backtrace" "No stack."
# ba and bac are no longer unique command prefixes. So these tests
# GDB needs to be fixed to map unique alias here for ba bac.
#
foreach i "bt ba bac" {
- setup_xfail "mips-idt-*"
gdb_test $i "No stack." "backtrace \"$i\" abbreviation"
}
} else {
warning "Skipping backtrace and break tests because of GDB stub."
}
-# This works on the MIPS IDT board, but confuses future tests.
-if ![istarget "mips-idt-*"] then {
- gdb_test "continue" "The program is not being run." "continue"
- gdb_test "c" "The program is not being run." "continue \"c\" abbreviation"
-}
+gdb_test "continue" "The program is not being run." "continue"
+gdb_test "c" "The program is not being run." "continue \"c\" abbreviation"
#test call
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\]*\\."
#test clear
gdb_test "clear" "No source file specified..*" "clear"
gdb_test "info bogus-gdb-command" "Undefined info command: \"bogus-gdb-command\". Try \"help info\".*" "info bogus-gdb-command"
#test info breakpoints
gdb_test "info breakpoints" "No breakpoints or watchpoints." "info breakpoints"
-#test info catch
-gdb_test "info catch" "No frame selected." "info catch"
#test info copying
# FIXME -- doesn't work worth a shit
#send_gdb "info copying"
{ pass "run \"r\" abbreviation" }
-re "Don't know how to run. Try \"help target\"..*$gdb_prompt $"\
{ pass "run \"r\" abbreviation" }
+ -re "Starting program: .*Running the default executable on the remote target failed; try \"set remote exec-file\"?.*$gdb_prompt $"\
+ { pass "run \"r\" abbreviation" }
}
}
{ pass "run" }
-re "Don't know how to run. Try \"help target\"..*$gdb_prompt $"\
{ pass "run" }
+ -re "Starting program: .*Running the default executable on the remote target failed; try \"set remote exec-file\"?.*$gdb_prompt $"\
+ { pass "run" }
}
}
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
#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" "Requires an argument. Valid arguments are auto, local, unknown, ada, c, c.., asm, minimal, d, fortran, objective-c, java, modula-2, opencl, pascal." "set language"
+gdb_test "set language" "Requires an argument. Valid arguments are auto, local, unknown, ada, c, c.., asm, minimal, d, fortran, objective-c, go, java, modula-2, opencl, pascal." "set language"
#test set listsize
gdb_test "set listsize" "Argument required .integer to set it to.*" "set listsize"
#test set print "p" abbreviation
# FIXME -- need a test for "set prompt"
#test set radix
gdb_test "set radix" "Input and output radices now set to decimal 10, hex a, octal 12.*" "set radix"
-#test set symbol-reloading
-gdb_test_no_output "set symbol-reloading" "set symbol-reloading"
#test set variable
gdb_test "set variable" "Argument required .expression to compute.*" "set variable"
#test set verbose
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
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>} \
+ {$_probe_arg2 = <error: No frame selected>} \
+ {$_probe_arg3 = <error: No frame selected>} \
+ {$_probe_arg4 = <error: No frame selected>} \
+ {$_probe_arg5 = <error: No frame selected>} \
+ {$_probe_arg6 = <error: No frame selected>} \
+ {$_probe_arg7 = <error: No frame selected>} \
+ {$_probe_arg8 = <error: No frame selected>} \
+ {$_probe_arg9 = <error: No frame selected>} \
+ {$_probe_arg10 = <error: No frame selected>} \
+ {$_probe_arg11 = <error: No frame selected>} \
}
+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"
gdb_test "show prompt" "Gdb's prompt is \"$gdb_prompt \".*" "show prompt"
#test show radix
gdb_test "show radix" "Input and output radices set to decimal 10, hex a, octal 12." "show radix"
-#test show symbol-reloading
-gdb_test "show symbol-reloading" "Dynamic symbol table reloading multiple times in one run is on." "show symbol-reloading"
#test show user
gdb_test_no_output "show user" "show user"
#test show values