aboutsummaryrefslogtreecommitdiff
path: root/gdb
diff options
context:
space:
mode:
authorMark Kettenis <kettenis@gnu.org>2003-01-15 17:46:20 +0000
committerMark Kettenis <kettenis@gnu.org>2003-01-15 17:46:20 +0000
commitdabf8a3592412cc3e69da44075ce8cd7cf4c9b9c (patch)
tree1385d5f4c589fd400845e3c84d3943b5ca06dc8e /gdb
parenta1769aca316bb1f0e0e57ce5e423ea673810a898 (diff)
downloadfsf-binutils-gdb-dabf8a3592412cc3e69da44075ce8cd7cf4c9b9c.zip
fsf-binutils-gdb-dabf8a3592412cc3e69da44075ce8cd7cf4c9b9c.tar.gz
fsf-binutils-gdb-dabf8a3592412cc3e69da44075ce8cd7cf4c9b9c.tar.bz2
* gdb.base/default.exp: Adapt "info float" test for recent changes
to that command. Add test for "info vector". * gdb.base/float.exp: New file. Add test for "info float" that resembles the old test in gdb.base/default.exp.
Diffstat (limited to 'gdb')
-rw-r--r--gdb/testsuite/ChangeLog7
-rw-r--r--gdb/testsuite/gdb.base/default.exp14
-rw-r--r--gdb/testsuite/gdb.base/float.exp62
3 files changed, 73 insertions, 10 deletions
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog
index bf815a0..0a46cd7 100644
--- a/gdb/testsuite/ChangeLog
+++ b/gdb/testsuite/ChangeLog
@@ -1,3 +1,10 @@
+2003-01-15 Mark Kettenis <kettenis@gnu.org>
+
+ * gdb.base/default.exp: Adapt "info float" test for recent changes
+ to that command. Add test for "info vector".
+ * gdb.base/float.exp: New file. Add test for "info float" that
+ resembles the old test in gdb.base/default.exp.
+
2003-01-15 David Carlton <carlton@math.stanford.edu>
* gdb.base/selftest.exp (do_steps_and_nexts): Allow gdb_sysroot.
diff --git a/gdb/testsuite/gdb.base/default.exp b/gdb/testsuite/gdb.base/default.exp
index 3fc6f0d..7e3ed44 100644
--- a/gdb/testsuite/gdb.base/default.exp
+++ b/gdb/testsuite/gdb.base/default.exp
@@ -1,5 +1,5 @@
# Copyright 1988, 1990, 1991, 1992, 1994, 1995, 1996, 1997, 1998, 1999,
-# 2000, 2001, 2002
+# 2000, 2001, 2002, 2003
# Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
@@ -320,15 +320,7 @@ gdb_test "info frame" "No stack.|No selected frame." "info frame"
#test info files
gdb_test "info files" "" "info files"
#test info float
-if { [istarget "arm*-*-*"] || \
- [istarget "xscale*-*-*"] || \
- [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 float" "The program has no registers now." "info float"
#test info functions
gdb_test "info functions" "All defined functions:" "info functions"
#test info locals
@@ -359,6 +351,8 @@ gdb_test "info terminal" "No saved terminal information." "info terminal"
gdb_test "info types" "All defined types:" "info types"
#test info variables
gdb_test "info variables" "All defined variables:" "info variables"
+#test info vector
+gdb_test "info vector" "The program has no registers now." "info vector"
#test info warranty
gdb_test "info warranty" "NO WARRANTY(\[^\r\n\]*\[\r\n\])+ *11. *BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY(\[^\r\n\]*\[\r\n\])+FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN(\[^\r\n\]*\[\r\n\])+OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES(\[^\r\n\]*\[\r\n\])+PROVIDE THE PROGRAM \"AS IS\" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED(\[^\r\n\]*\[\r\n\])+OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF(\[^\r\n\]*\[\r\n\])+MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS(\[^\r\n\]*\[\r\n\])+TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE(\[^\r\n\]*\[\r\n\])+PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,(\[^\r\n\]*\[\r\n\])+REPAIR OR CORRECTION.(\[^\r\n\]*\[\r\n\])+ *12. *IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING(\[^\r\n\]*\[\r\n\])+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR(\[^\r\n\]*\[\r\n\])+REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,(\[^\r\n\]*\[\r\n\])+INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING(\[^\r\n\]*\[\r\n\])+OUT OF THE USE OR INABILITY TO USE THE PROGRAM .INCLUDING BUT NOT LIMITED(\[^\r\n\]*\[\r\n\])+TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY(\[^\r\n\]*\[\r\n\])+YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER(\[^\r\n\]*\[\r\n\])+PROGRAMS., EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE(\[^\r\n\]*\[\r\n\])+POSSIBILITY OF SUCH DAMAGES.*" "info warranty"
#test info watchpoints
diff --git a/gdb/testsuite/gdb.base/float.exp b/gdb/testsuite/gdb.base/float.exp
new file mode 100644
index 0000000..66943ef
--- /dev/null
+++ b/gdb/testsuite/gdb.base/float.exp
@@ -0,0 +1,62 @@
+# Copyright 2003 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
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+# Please email any bugs, comments, and/or additions to this file to:
+# bug-gdb@gnu.org
+
+# This file is part of the gdb testsuite.
+
+if $tracelevel {
+ strace $tracelevel
+}
+
+#
+# Test floating-point related functionality.
+#
+
+set prms_id 0
+set bug_id 0
+
+set testfile "run"
+set srcfile ${testfile}.c
+set binfile ${objdir}/${subdir}/${testfile}
+if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
+ gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
+}
+
+gdb_exit
+gdb_start
+gdb_reinitialize_dir $srcdir/$subdir
+gdb_load ${binfile}
+
+# Set it up at a breakpoint so we have its registers.
+
+if ![runto_main] then {
+ perror "couldn't run to breakpoint"
+ continue
+}
+
+# Test "info float".
+
+if { [istarget "arm*-*-*"] || \
+ [istarget "xscale*-*-*"] || \
+ [istarget "strongarm*-*-*"] } then {
+ gdb_test "info float" "Software FPU type.*mask:.*flags:.*" "info float"
+} elseif [istarget "i?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"
+}