From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18855 invoked by alias); 9 Nov 2002 13:00:46 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 18818 invoked from network); 9 Nov 2002 13:00:44 -0000 Received: from unknown (HELO walton.kettenis.dyndns.org) (62.163.169.250) by sources.redhat.com with SMTP; 9 Nov 2002 13:00:44 -0000 Received: from elgar.kettenis.dyndns.org (elgar.kettenis.dyndns.org [192.168.0.2]) by walton.kettenis.dyndns.org (8.12.6/8.12.5) with ESMTP id gA9D0g3L000455 for ; Sat, 9 Nov 2002 14:00:42 +0100 (CET) (envelope-from kettenis@elgar.kettenis.dyndns.org) Received: from elgar.kettenis.dyndns.org (localhost [127.0.0.1]) by elgar.kettenis.dyndns.org (8.12.6/8.12.6) with ESMTP id gA9D0gQO012037 for ; Sat, 9 Nov 2002 14:00:42 +0100 (CET) (envelope-from kettenis@elgar.kettenis.dyndns.org) Received: (from kettenis@localhost) by elgar.kettenis.dyndns.org (8.12.6/8.12.6/Submit) id gA9D0fp8012034; Sat, 9 Nov 2002 14:00:41 +0100 (CET) Date: Sat, 09 Nov 2002 05:00:00 -0000 Message-Id: <200211091300.gA9D0fp8012034@elgar.kettenis.dyndns.org> From: Mark Kettenis To: gdb-patches@sources.redhat.com Subject: [RFA] Testsuite fix for "info float" changes X-SW-Source: 2002-11/txt/msg00278.txt.bz2 This patch fixes the test for "info float" for recent changes to that command. In default.exp we check various commands without having an inferior. Previously "info float" didn't always check if there were any registers to be printed. On the i386 this meant that we always printed some output, but with bogus values. After my recent changes we don't do this anymore. To preserve the old test, I added a new file that does an "info float" while having an inferior. As a bonus, this patch also adds a test for "info vector" in defaults.exp. OK to check this in? Mark Index: testsuite/ChangeLog from Mark Kettenis * 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. Index: testsuite/gdb.base/default.exp =================================================================== RCS file: /cvs/src/src/gdb/testsuite/gdb.base/default.exp,v retrieving revision 1.14 diff -u -p -r1.14 default.exp --- testsuite/gdb.base/default.exp 18 Oct 2002 18:54:55 -0000 1.14 +++ testsuite/gdb.base/default.exp 9 Nov 2002 12:55:42 -0000 @@ -320,15 +320,7 @@ gdb_test "info frame" "No stack.|No sele #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 termi 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 PAR! TY 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 --- /dev/null Sat Nov 9 13:54:21 2002 +++ testsuite/gdb.base/float.exp Sun Nov 3 13:58:30 2002 @@ -0,0 +1,62 @@ +# Copyright 2002 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" +}