-# Copyright (C) 1988, 1990, 1991, 1992, 1994, 1997, 1998
+# Copyright 1988, 1990, 1991, 1992, 1994, 1995, 1996, 1997, 1998, 1999,
+# 2000, 2001
# Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
{ pass "attach" }
-re "You can't do that when your target is `None'.*$gdb_prompt $"\
{ pass "attach" }
+ -re "You can't do that without a process to debug.*$gdb_prompt $"\
+ { pass "attach" }
-re "Don't know how to attach. Try \"help target\"..*$gdb_prompt $"\
{ pass "attach" }
-re "Kill it. .y or n." {
setup_xfail "mips-idt-*" "a29k-*-udi"
gdb_test "backtrace" "No stack."
+
+ # ba and bac are no longer unique command prefixes. So these tests
+ # elict an error from GDB.
+ # GDB needs to be fixed to map unique alias here for ba bac.
+ #
foreach i "bt ba bac" {
setup_xfail "mips-idt-*" "a29k-*-udi"
gdb_test $i "No stack." "backtrace \"$i\" abbreviation"
#test info files
gdb_test "info files" "" "info files"
#test info float
-if [istarget "arm-*-*"] then {
+if [istarget "arm*-*-*"] then {
gdb_test "info float" "Software FPU type.*mask:.*flags:.*" "info float"
-} elseif [istarget "thumb-*-*"] then {
+} elseif [istarget "thumb*-*-*"] then {
gdb_test "info float" "Software FPU type.*mask:.*flags:.*" "info float"
+} elseif [istarget "strongarm*-*-*"] then {
+ gdb_test "info float" "Software FPU type.*mask:.*flags:.*" "info float"
+} elseif [istarget "i\[3456\]86-*-*"] then {
+ gdb_test "info float" "R7:.*Status Word:.*Opcode:.*" "info float"
} else {
gdb_test "info float" "No floating point info available for this processor." "info float"
}
gdb_test "info stack" "No stack." "info stack"
#test info set
# FIXME -- needs to match the entire output
+# FIXME -- on native solaris 2.8, this test fails due to this line:
+# prompt: Gdb's prompt is "(gdb) ".^M
gdb_test "info set" "confirm: Whether to confirm potentially dangerous operations is o\[a-z\]*..*\[\r\n\]+history filename: The filename in which to record the command history is .*\[\r\n\]+listsize: Number of source lines gdb will list by default is 10.*" "info set"
gdb_test "info symbol" "Argument required .address.."
#test info source
#test info variables
gdb_test "info variables" "All defined variables:" "info variables"
#test info warranty
+setup_xfail "hppa*-hp-hpux*"
gdb_test "info warranty" "NO WARRANTY.*\[\r\n\]+ *11. *BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY.*\[\r\n\]+FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN.*\[\r\n\]+OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES.*\[\r\n\]+PROVIDE THE PROGRAM \"AS IS\" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED.*\[\r\n\]+OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF.*\[\r\n\]+MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS.*\[\r\n\]+TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE.*\[\r\n\]+PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,.*\[\r\n\]+REPAIR OR CORRECTION..*\[\r\n\]+ *12. *IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING.*\[\r\n\]+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR.*\[\r\n\]+REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,.*\[\r\n\]+INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING.*\[\r\n\]+OUT OF THE USE OR INABILITY TO USE THE PROGRAM .INCLUDING BUT NOT LIMITED.*\[\r\n\]+TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY.*\[\r\n\]+YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER.*\[\r\n\]+PROGRAMS., EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE.*\[\r\n\]+POSSIBILITY OF SUCH DAMAGES.*" "info warranty"
#test info watchpoints
gdb_test "info watchpoints" "No breakpoints or watchpoints." "info watchpoints"
gdb_test "overlay off" ""
gdb_test "overlay list" "No sections are mapped."
gdb_test "overlay map" "Overlay debugging not enabled.*" "overlay map #1"
-gdb_test "overlay unmap" "Overlay debugging not enabled.*" "overlay unmap #2"
+gdb_test "overlay unmap" "Overlay debugging not enabled.*" "overlay unmap #1"
gdb_test "overlay manual" "" "overlay manual #2"
gdb_test "overlay map" "Argument required: name of an overlay section." "overlay map #2"
gdb_test "overlay unmap" "Argument required: name of an overlay section." "overlay unmap #2"
#test show verbose
gdb_test "show verbose" "Verbose printing of informational messages is o.*|Verbosity is off.*" "show verbose"
#test show version
-
+setup_xfail "hppa*-hp-hpux*"
gdb_test "show version" "GNU gdb \[0-9\.\]*.*\[\r\n\]+Copyright \[0-9\]* Free Software Foundation, Inc.*\[\r\n\]+GDB is free software, covered by the GNU General Public License, and you are.*\[\r\n\]+welcome to change it and/or distribute copies of it under certain conditions.*\[\r\n\]+Type \"show copying\" to see the conditions.*\[\r\n\]+There is absolutely no warranty for GDB. Type \"show warranty\" for details.*\[\r\n\]+This GDB was configured as .*|GDB is free software and you are welcome to distribute copies of it.*\[\r\n\]+ under certain conditions; type \"show copying\" to see the conditions..*\[\r\n\]+There is absolutely no warranty for GDB; type \"show warranty\" for details..*\[\r\n\]+GDB.*Copyright \[0-9\]* Free Software Foundation, Inc.*" "show version"
#test show width
gdb_test "show width" "Number of characters gdb thinks are in a line is.*" "show width"
if ![istarget "*-*-udi*"] then {
send_gdb "target remote\n"
gdb_expect {
- -re "To open a remote debug connection, you need to specify what serial.*
-device is attached to the remote system .e.g. /dev/ttya.*$gdb_prompt $"\
+ -re "To open a remote debug connection, you need to specify what.*serial.*device is attached to the remote system.*.e.g. .*$gdb_prompt $"\
{ pass "target remote" }
-re ".*A program is being debugged already. Kill it. .y or n.*$" {
send_gdb "n\n"
gdb_test "where" "No stack." "where"
#test x
#The case in which it prints a number is for vxgdb.
-gdb_test "x" "0x0:.*0x\[0-9\]*|0x0:.*Cannot access memory at address 0x0." "x"
+send_gdb "x\n"
+gdb_expect {
+ -re "0x0:.*Cannot access memory at address 0x0..*$gdb_prompt $" {
+ pass "x"
+ }
+ -re "0x0:.*Error accessing memory address 0x0:.*$gdb_prompt $" {
+ pass "x"
+ }
+ -re ".*$gdb_prompt $" { fail "x" }
+ timeout { fail "(timeout) x" }
+}
gdb_exit