Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* RFA: Fix sparc-specific MI tests
@ 2002-02-02 20:41 Jim Blandy
  2002-02-03  2:14 ` Eli Zaretskii
  2002-02-03 16:20 ` Andrew Cagney
  0 siblings, 2 replies; 5+ messages in thread
From: Jim Blandy @ 2002-02-02 20:41 UTC (permalink / raw)
  To: gdb-patches


2002-02-02  Jim Blandy  <jimb@redhat.com>

	* mi-regs.exp: Various cleanups for SPARC-only tests.
	(test_breakpoints_creation_and_listing): Format of breakpoint
	table has changed.
	(sparc_register_tests): Expand floating-point number regexp to
	recognize NaN values, too.  Replace ineffectual single backslash
	before a hyphen with a double backslash.  Don't check the exact
	numbers of the registers which have changed, since there's no way
	to know which registers changed, exactly; just check that the
	result is well-formed.
	* mi0-regs.exp: (sparc_register_tests): Same as for
	sparc_register_tests in mi-regs.exp.

Index: gdb/testsuite/gdb.mi/mi-regs.exp
===================================================================
RCS file: /cvs/cvsfiles/devo/gdb/testsuite/gdb.mi/mi-regs.exp,v
retrieving revision 1.9
diff -c -r1.9 mi-regs.exp
*** gdb/testsuite/gdb.mi/mi-regs.exp	2001/08/20 19:06:07	1.9
--- gdb/testsuite/gdb.mi/mi-regs.exp	2002/02/03 04:32:55
***************
*** 63,69 ****
               "break-insert operation"
  
      mi_gdb_test "204-break-list" \
!                 "204\\^done,BreakpointTable=\{hdr=\{.*\},bkpt=\{number=\"1\",type=\"breakpoint\",disp=\"keep\",enabled=\"y\",addr=\"$hex\",func=\"main\",file=\".*basics.c\",line=\"32\",times=\"0\"\}\}" \
                  "list of breakpoints"
  }
  
--- 63,69 ----
               "break-insert operation"
  
      mi_gdb_test "204-break-list" \
!                 "204\\^done,BreakpointTable=\{nr_rows=\".\",nr_cols=\".\",hdr=\\\[.*\\\],body=\\\[bkpt=\{number=\"1\",type=\"breakpoint\",disp=\"keep\",enabled=\"y\",addr=\"$hex\",func=\"main\",file=\".*basics.c\",line=\"32\",times=\"0\"\}\\\]\}" \
                  "list of breakpoints"
  }
  
***************
*** 112,119 ****
      global decimal
      set octal "\[0-7\]+"
      set binary "\[0-1\]+"
!     set float "-?\[0-9\]+(\.\[0-9\]+)?(e\[+\-\]\[0-9\]+)?"
!     set float2 "\-?\[0-9\]+"
  
      mi_gdb_test "111-data-list-register-names" \
  	    "111\\^done,register-names=\\\[\"g0\",\"g1\",\"g2\",\"g3\",\"g4\",\"g5\",\"g6\",\"g7\",\"o0\",\"o1\",\"o2\",\"o3\",\"o4\",\"o5\",\"sp\",\"o7\",\"l0\",\"l1\",\"l2\",\"l3\",\"l4\",\"l5\",\"l6\",\"l7\",\"i0\",\"i1\",\"i2\",\"i3\",\"i4\",\"i5\",\"fp\",\"i7\",\"f0\",\"f1\",\"f2\",\"f3\",\"f4\",\"f5\",\"f6\",\"f7\",\"f8\",\"f9\",\"f10\",\"f11\",\"f12\",\"f13\",\"f14\",\"f15\",\"f16\",\"f17\",\"f18\",\"f19\",\"f20\",\"f21\",\"f22\",\"f23\",\"f24\",\"f25\",\"f26\",\"f27\",\"f28\",\"f29\",\"f30\",\"f31\",\"y\",\"psr\",\"wim\",\"tbr\",\"pc\",\"npc\",\"fpsr\",\"cpsr\"\\\]" \
--- 112,119 ----
      global decimal
      set octal "\[0-7\]+"
      set binary "\[0-1\]+"
!     set float "\\-?((\[0-9\]+(\\.\[0-9\]+)?(e\[-+\]\[0-9\]+)?)|(nan\\($hex\\)))"
!     set float2 "\\-?\[0-9\]+"
  
      mi_gdb_test "111-data-list-register-names" \
  	    "111\\^done,register-names=\\\[\"g0\",\"g1\",\"g2\",\"g3\",\"g4\",\"g5\",\"g6\",\"g7\",\"o0\",\"o1\",\"o2\",\"o3\",\"o4\",\"o5\",\"sp\",\"o7\",\"l0\",\"l1\",\"l2\",\"l3\",\"l4\",\"l5\",\"l6\",\"l7\",\"i0\",\"i1\",\"i2\",\"i3\",\"i4\",\"i5\",\"fp\",\"i7\",\"f0\",\"f1\",\"f2\",\"f3\",\"f4\",\"f5\",\"f6\",\"f7\",\"f8\",\"f9\",\"f10\",\"f11\",\"f12\",\"f13\",\"f14\",\"f15\",\"f16\",\"f17\",\"f18\",\"f19\",\"f20\",\"f21\",\"f22\",\"f23\",\"f24\",\"f25\",\"f26\",\"f27\",\"f28\",\"f29\",\"f30\",\"f31\",\"y\",\"psr\",\"wim\",\"tbr\",\"pc\",\"npc\",\"fpsr\",\"cpsr\"\\\]" \
***************
*** 157,166 ****
  	    "001\\^done,register-values=\\\[\{number=\"68\",value=\"$hex\"\},\{number=\"69\",value=\"$hex\"\},\{number=\"70\",value=\"$hex\"\},\{number=\"71\",value=\"$hex\"\}\\\]" \
  	    "list values of some regs"
  
-     # Don't know how useful this test is
- 
      mi_gdb_test "002-data-list-changed-registers" \
! 	    "002\\^done,changed-registers=\\\[\"1\",\"9\",\"10\",\"11\",\"12\",\"13\",\"14\",\"15\",\"16\",\"23\",\"24\",\"25\",\"26\",\"27\",\"28\",\"30\",\"31\",\"65\",\"68\",\"69\"\\\]" \
  	    "list changed registers"
  }
  
--- 157,164 ----
  	    "001\\^done,register-values=\\\[\{number=\"68\",value=\"$hex\"\},\{number=\"69\",value=\"$hex\"\},\{number=\"70\",value=\"$hex\"\},\{number=\"71\",value=\"$hex\"\}\\\]" \
  	    "list values of some regs"
  
      mi_gdb_test "002-data-list-changed-registers" \
! 	    "002\\^done,changed-registers=\\\[(\"${decimal}\"(,\"${decimal}\")*)?\\\]" \
  	    "list changed registers"
  }
  
Index: gdb/testsuite/gdb.mi/mi0-regs.exp
===================================================================
RCS file: /cvs/cvsfiles/devo/gdb/testsuite/gdb.mi/mi0-regs.exp,v
retrieving revision 1.2
diff -c -r1.2 mi0-regs.exp
*** gdb/testsuite/gdb.mi/mi0-regs.exp	2001/08/20 19:06:07	1.2
--- gdb/testsuite/gdb.mi/mi0-regs.exp	2002/02/03 04:32:55
***************
*** 112,119 ****
      global decimal
      set octal "\[0-7\]+"
      set binary "\[0-1\]+"
!     set float "-?\[0-9\]+(\.\[0-9\]+)?(e\[+\-\]\[0-9\]+)?"
!     set float2 "\-?\[0-9\]+"
  
      mi_gdb_test "111-data-list-register-names" \
  	    "111\\^done,register-names=\{\"g0\",\"g1\",\"g2\",\"g3\",\"g4\",\"g5\",\"g6\",\"g7\",\"o0\",\"o1\",\"o2\",\"o3\",\"o4\",\"o5\",\"sp\",\"o7\",\"l0\",\"l1\",\"l2\",\"l3\",\"l4\",\"l5\",\"l6\",\"l7\",\"i0\",\"i1\",\"i2\",\"i3\",\"i4\",\"i5\",\"fp\",\"i7\",\"f0\",\"f1\",\"f2\",\"f3\",\"f4\",\"f5\",\"f6\",\"f7\",\"f8\",\"f9\",\"f10\",\"f11\",\"f12\",\"f13\",\"f14\",\"f15\",\"f16\",\"f17\",\"f18\",\"f19\",\"f20\",\"f21\",\"f22\",\"f23\",\"f24\",\"f25\",\"f26\",\"f27\",\"f28\",\"f29\",\"f30\",\"f31\",\"y\",\"psr\",\"wim\",\"tbr\",\"pc\",\"npc\",\"fpsr\",\"cpsr\"\}" \
--- 112,119 ----
      global decimal
      set octal "\[0-7\]+"
      set binary "\[0-1\]+"
!     set float "\\-?((\[0-9\]+(\\.\[0-9\]+)?(e\[-+\]\[0-9\]+)?)|(nan\\($hex\\)))"
!     set float2 "\\-?\[0-9\]+"
  
      mi_gdb_test "111-data-list-register-names" \
  	    "111\\^done,register-names=\{\"g0\",\"g1\",\"g2\",\"g3\",\"g4\",\"g5\",\"g6\",\"g7\",\"o0\",\"o1\",\"o2\",\"o3\",\"o4\",\"o5\",\"sp\",\"o7\",\"l0\",\"l1\",\"l2\",\"l3\",\"l4\",\"l5\",\"l6\",\"l7\",\"i0\",\"i1\",\"i2\",\"i3\",\"i4\",\"i5\",\"fp\",\"i7\",\"f0\",\"f1\",\"f2\",\"f3\",\"f4\",\"f5\",\"f6\",\"f7\",\"f8\",\"f9\",\"f10\",\"f11\",\"f12\",\"f13\",\"f14\",\"f15\",\"f16\",\"f17\",\"f18\",\"f19\",\"f20\",\"f21\",\"f22\",\"f23\",\"f24\",\"f25\",\"f26\",\"f27\",\"f28\",\"f29\",\"f30\",\"f31\",\"y\",\"psr\",\"wim\",\"tbr\",\"pc\",\"npc\",\"fpsr\",\"cpsr\"\}" \
***************
*** 160,166 ****
      # Don't know how useful this test is
  
      mi_gdb_test "002-data-list-changed-registers" \
! 	    "002\\^done,changed-registers=\{\"1\",\"9\",\"10\",\"11\",\"12\",\"13\",\"14\",\"15\",\"16\",\"23\",\"24\",\"25\",\"26\",\"27\",\"28\",\"30\",\"31\",\"65\",\"68\",\"69\"\}" \
  	    "list changed registers"
  }
  
--- 160,166 ----
      # Don't know how useful this test is
  
      mi_gdb_test "002-data-list-changed-registers" \
! 	    "002\\^done,changed-registers=\{(\"${decimal}\"(,\"${decimal}\")*)?\}" \
  	    "list changed registers"
  }
  


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: RFA: Fix sparc-specific MI tests
  2002-02-02 20:41 RFA: Fix sparc-specific MI tests Jim Blandy
@ 2002-02-03  2:14 ` Eli Zaretskii
  2002-02-05 15:57   ` Jim Blandy
  2002-02-03 16:20 ` Andrew Cagney
  1 sibling, 1 reply; 5+ messages in thread
From: Eli Zaretskii @ 2002-02-03  2:14 UTC (permalink / raw)
  To: jimb; +Cc: gdb-patches

> From: Jim Blandy <jimb@zwingli.cygnus.com>
> Date: Sat,  2 Feb 2002 23:43:22 -0500 (EST)
> 
> 	(sparc_register_tests): Expand floating-point number regexp to
> 	recognize NaN values, too.

If we are going to support NaN's, should we support Inf's as well?


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: RFA: Fix sparc-specific MI tests
  2002-02-02 20:41 RFA: Fix sparc-specific MI tests Jim Blandy
  2002-02-03  2:14 ` Eli Zaretskii
@ 2002-02-03 16:20 ` Andrew Cagney
  2002-02-05 15:59   ` Jim Blandy
  1 sibling, 1 reply; 5+ messages in thread
From: Andrew Cagney @ 2002-02-03 16:20 UTC (permalink / raw)
  To: Jim Blandy; +Cc: gdb-patches

> 2002-02-02  Jim Blandy  <jimb@redhat.com>
> 
> * mi-regs.exp: Various cleanups for SPARC-only tests.
> 	(test_breakpoints_creation_and_listing): Format of breakpoint
> 	table has changed.
> 	(sparc_register_tests): Expand floating-point number regexp to
> 	recognize NaN values, too.  Replace ineffectual single backslash
> 	before a hyphen with a double backslash.  Don't check the exact
> 	numbers of the registers which have changed, since there's no way
> 	to know which registers changed, exactly; just check that the
> 	result is well-formed.
> 	* mi0-regs.exp: (sparc_register_tests): Same as for
> 	sparc_register_tests in mi-regs.exp.
> 

Yes ok.  The most important check, that the names are correct is still 
there, while the tests that will always change are fixed.

thanks!
Andrew




^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: RFA: Fix sparc-specific MI tests
  2002-02-03  2:14 ` Eli Zaretskii
@ 2002-02-05 15:57   ` Jim Blandy
  0 siblings, 0 replies; 5+ messages in thread
From: Jim Blandy @ 2002-02-05 15:57 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: gdb-patches

Eli Zaretskii <eliz@is.elta.co.il> writes:

> > From: Jim Blandy <jimb@zwingli.cygnus.com>
> > Date: Sat,  2 Feb 2002 23:43:22 -0500 (EST)
> > 
> > 	(sparc_register_tests): Expand floating-point number regexp to
> > 	recognize NaN values, too.
> 
> If we are going to support NaN's, should we support Inf's as well?

Yes.  I didn't see any of those, so I wasn't sure what to write.
Someone just need to hack the `float' pattern appropriately.


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: RFA: Fix sparc-specific MI tests
  2002-02-03 16:20 ` Andrew Cagney
@ 2002-02-05 15:59   ` Jim Blandy
  0 siblings, 0 replies; 5+ messages in thread
From: Jim Blandy @ 2002-02-05 15:59 UTC (permalink / raw)
  To: Andrew Cagney; +Cc: gdb-patches


I've committed this, thanks.

Andrew Cagney <ac131313@cygnus.com> writes:

> > 2002-02-02  Jim Blandy  <jimb@redhat.com>
> > * mi-regs.exp: Various cleanups for SPARC-only tests.
> > 	(test_breakpoints_creation_and_listing): Format of breakpoint
> > 	table has changed.
> > 	(sparc_register_tests): Expand floating-point number regexp to
> > 	recognize NaN values, too.  Replace ineffectual single backslash
> > 	before a hyphen with a double backslash.  Don't check the exact
> > 	numbers of the registers which have changed, since there's no way
> > 	to know which registers changed, exactly; just check that the
> > 	result is well-formed.
> > 	* mi0-regs.exp: (sparc_register_tests): Same as for
> > 	sparc_register_tests in mi-regs.exp.
> >
> 
> Yes ok.  The most important check, that the names are correct is still
> there, while the tests that will always change are fixed.
> 
> thanks!
> Andrew


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2002-02-05 23:59 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-02-02 20:41 RFA: Fix sparc-specific MI tests Jim Blandy
2002-02-03  2:14 ` Eli Zaretskii
2002-02-05 15:57   ` Jim Blandy
2002-02-03 16:20 ` Andrew Cagney
2002-02-05 15:59   ` Jim Blandy

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox