Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Mark Kettenis <kettenis@chello.nl>
To: fnasser@redhat.com
Cc: drow@mvista.com, gdb-patches@sources.redhat.com
Subject: Re: [RFC/testsuite] Update "info float" output for i386
Date: Wed, 15 Jan 2003 22:22:00 -0000	[thread overview]
Message-ID: <200301151802.h0FI2Aro054758@elgar.kettenis.dyndns.org> (raw)
In-Reply-To: <3E2574C9.6040108@redhat.com> (message from Fernando Nasser on Wed, 15 Jan 2003 09:48:41 -0500)

   Date: Wed, 15 Jan 2003 09:48:41 -0500
   From: Fernando Nasser <fnasser@redhat.com>

   If Daniel does not object, I prefer Mark's patch because it
   preserves the nature of default.exp (tests with no inferior) and in
   doing so it can test for the specific message that we are expecting
   in that condition.

Here's what I actually checked in:

Index: ChangeLog
from  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.

Index: 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
--- gdb.base/default.exp 18 Oct 2002 18:54:55 -0000 1.14
+++ gdb.base/default.exp 15 Jan 2003 17:43:07 -0000
@@ -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 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
Index: gdb.base/float.exp
===================================================================
RCS file: gdb.base/float.exp
diff -N gdb.base/float.exp
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ gdb.base/float.exp 15 Jan 2003 17:43:07 -0000
@@ -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"
+}


  reply	other threads:[~2003-01-15 22:22 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-01-14  4:15 Daniel Jacobowitz
2003-01-14  5:52 ` Andrew Cagney
2003-01-14  5:54   ` Daniel Jacobowitz
2003-01-14 15:36     ` Andrew Cagney
2003-01-15  0:48 ` Mark Kettenis
2003-01-15  2:00   ` Daniel Jacobowitz
2003-01-15 14:48   ` Fernando Nasser
2003-01-15 22:22     ` Mark Kettenis [this message]
2003-01-14  7:41 Michael Elizabeth Chastain
2003-01-15  1:14 Michael Elizabeth Chastain
2003-01-15 23:26 ` Mark Kettenis

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200301151802.h0FI2Aro054758@elgar.kettenis.dyndns.org \
    --to=kettenis@chello.nl \
    --cc=drow@mvista.com \
    --cc=fnasser@redhat.com \
    --cc=gdb-patches@sources.redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox