Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* Add sh target to float.exp
@ 2003-07-29 21:57 Michael Snyder
  2003-07-29 22:03 ` David Carlton
  2003-08-11 22:54 ` [ping] " Michael Snyder
  0 siblings, 2 replies; 7+ messages in thread
From: Michael Snyder @ 2003-07-29 21:57 UTC (permalink / raw)
  To: gdb-patches

[-- Attachment #1: Type: text/plain, Size: 1 bytes --]



[-- Attachment #2: float --]
[-- Type: text/plain, Size: 1187 bytes --]

2003-07-29  Michael Snyder  <msnyder@redhat.com>

	* gdb.base/float.exp: Add test for SH.

Index: float.exp
===================================================================
RCS file: /cvs/cvsfiles/devo/gdb/testsuite/gdb.base/float.exp,v
retrieving revision 1.3
diff -p -r1.3 float.exp
*** float.exp	18 Jun 2003 19:12:39 -0000	1.3
--- float.exp	29 Jul 2003 21:52:18 -0000
*************** if { [istarget "alpha*-*-*"] } then {
*** 61,66 ****
--- 61,83 ----
      gdb_test "info float" "R7:.*Status Word:.*Opcode:.*" "info float"
  } elseif [istarget "ia64-*-*"] then {
      gdb_test "info float" "f0.*f1.*f127.*" "info float"
+ } elseif [istarget "sh*-*"] then {
+     # SH may or may not have an FPU
+     send_gdb "info float\n"
+     gdb_expect {
+ 	-re ".*fpul.*fr0.*dr0.*$gdb_prompt $" {
+ 	    pass "info float (with FPU)"
+ 	}
+ 	-re "No floating.point info available for this processor.*$gdb_prompt $" {
+ 	    pass "info float (without FPU)"
+ 	}
+ 	-re ".*$gdb_prompt $" {
+ 	    fail "info float"
+ 	}
+ 	timeout {
+ 	    fail "info float (timeout)"
+ 	}
+     }
  } else {
      gdb_test "info float" "No floating.point info available for this processor." "info float"
  }

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

* Re: Add sh target to float.exp
  2003-07-29 21:57 Add sh target to float.exp Michael Snyder
@ 2003-07-29 22:03 ` David Carlton
  2003-07-29 22:30   ` Michael Snyder
  2003-08-11 22:54 ` [ping] " Michael Snyder
  1 sibling, 1 reply; 7+ messages in thread
From: David Carlton @ 2003-07-29 22:03 UTC (permalink / raw)
  To: Michael Snyder; +Cc: gdb-patches

On Tue, 29 Jul 2003 14:57:31 -0700, Michael Snyder <msnyder@redhat.com> said:
> +     send_gdb "info float\n"
> +     gdb_expect {
> + 	-re ".*fpul.*fr0.*dr0.*$gdb_prompt $" {
> + 	    pass "info float (with FPU)"
> + 	}
> + 	-re "No floating.point info available for this processor.*$gdb_prompt $" {
> + 	    pass "info float (without FPU)"
> + 	}
> + 	-re ".*$gdb_prompt $" {
> + 	    fail "info float"
> + 	}
> + 	timeout {
> + 	    fail "info float (timeout)"
> + 	}
> +     }

Does replacing the above with

  gdb_test_multiple "info float" "info float" {
  -re ".*fpul.*fr0.*dr0.*$gdb_prompt $" {
      pass "info float (with FPU)"
  }
  -re "No floating.point info available for this processor.*$gdb_prompt $" {
      pass "info float (without FPU)"
  }

work?  Daniel's been trying to convince us to use gdb_test_multiple
instead of gdb_expect, and it definitely saves typing once you get
used to it.

David Carlton
carlton@kealia.com


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

* Re: Add sh target to float.exp
  2003-07-29 22:03 ` David Carlton
@ 2003-07-29 22:30   ` Michael Snyder
  0 siblings, 0 replies; 7+ messages in thread
From: Michael Snyder @ 2003-07-29 22:30 UTC (permalink / raw)
  To: David Carlton; +Cc: gdb-patches

David Carlton wrote:

>On Tue, 29 Jul 2003 14:57:31 -0700, Michael Snyder <msnyder@redhat.com> said:
>  
>
>>+     send_gdb "info float\n"
>>+     gdb_expect {
>>+ 	-re ".*fpul.*fr0.*dr0.*$gdb_prompt $" {
>>+ 	    pass "info float (with FPU)"
>>+ 	}
>>+ 	-re "No floating.point info available for this processor.*$gdb_prompt $" {
>>+ 	    pass "info float (without FPU)"
>>+ 	}
>>+ 	-re ".*$gdb_prompt $" {
>>+ 	    fail "info float"
>>+ 	}
>>+ 	timeout {
>>+ 	    fail "info float (timeout)"
>>+ 	}
>>+     }
>>    
>>
>
>Does replacing the above with
>
>  gdb_test_multiple "info float" "info float" {
>  -re ".*fpul.*fr0.*dr0.*$gdb_prompt $" {
>      pass "info float (with FPU)"
>  }
>  -re "No floating.point info available for this processor.*$gdb_prompt $" {
>      pass "info float (without FPU)"
>  }
>
>work? 
>
Yep!

> Daniel's been trying to convince us to use gdb_test_multiple
>instead of gdb_expect, and it definitely saves typing once you get
>used to it.
>

I'm sold. If the patch is approved, I'll check it in in that form.




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

* [ping] Re: Add sh target to float.exp
  2003-07-29 21:57 Add sh target to float.exp Michael Snyder
  2003-07-29 22:03 ` David Carlton
@ 2003-08-11 22:54 ` Michael Snyder
  2003-08-12  0:38   ` Elena Zannoni
  1 sibling, 1 reply; 7+ messages in thread
From: Michael Snyder @ 2003-08-11 22:54 UTC (permalink / raw)
  To: Michael Snyder; +Cc: gdb-patches

[-- Attachment #1: Type: text/plain, Size: 35 bytes --]


Ping, and revised per feedback:



[-- Attachment #2: float.exp.test --]
[-- Type: text/plain, Size: 1046 bytes --]

2003-07-29  Michael Snyder  <msnyder@redhat.com>

	* gdb.base/float.exp: Add test for SH.

Index: float.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.base/float.exp,v
retrieving revision 1.5
diff -p -r1.5 float.exp
*** float.exp	6 Jul 2003 22:27:34 -0000	1.5
--- float.exp	11 Aug 2003 22:53:41 -0000
*************** if { [istarget "alpha*-*-*"] } then {
*** 63,68 ****
--- 63,78 ----
      gdb_test "info float" "f0.*f1.*f127.*" "info float"
  } elseif [istarget "m68k-*-*"] then {
      gdb_test "info float" "fp0.*fp1.*fp7.*" "info float"
+ } elseif [istarget "sh*-*"] then {
+     # SH may or may not have an FPU
+     gdb_test_multiple "info float" "info float" {
+ 	-re "fpul.*fr0.*$gdb_prompt $" {
+ 	      pass "info float (with FPU)"
+ 	  }
+ 	-re "No floating.point info available for this processor.*" {
+ 	      pass "info float (without FPU)"
+ 	}
+     }
  } else {
      gdb_test "info float" "No floating.point info available for this processor." "info float"
  }

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

* Re: [ping] Re: Add sh target to float.exp
  2003-08-11 22:54 ` [ping] " Michael Snyder
@ 2003-08-12  0:38   ` Elena Zannoni
  2003-08-12 22:16     ` Michael Snyder
  2003-08-12 22:28     ` Michael Snyder
  0 siblings, 2 replies; 7+ messages in thread
From: Elena Zannoni @ 2003-08-12  0:38 UTC (permalink / raw)
  To: Michael Snyder; +Cc: gdb-patches

Michael Snyder writes:
 > 
 > Ping, and revised per feedback:
 > 

OK, but can you add a test on some other register? At least fr1 to
make sure we at least get past the output of the first float
value. You could also add fr15.

elena



 > 
 > 2003-07-29  Michael Snyder  <msnyder@redhat.com>
 > 
 > 	* gdb.base/float.exp: Add test for SH.
 > 
 > Index: float.exp
 > ===================================================================
 > RCS file: /cvs/src/src/gdb/testsuite/gdb.base/float.exp,v
 > retrieving revision 1.5
 > diff -p -r1.5 float.exp
 > *** float.exp	6 Jul 2003 22:27:34 -0000	1.5
 > --- float.exp	11 Aug 2003 22:53:41 -0000
 > *************** if { [istarget "alpha*-*-*"] } then {
 > *** 63,68 ****
 > --- 63,78 ----
 >       gdb_test "info float" "f0.*f1.*f127.*" "info float"
 >   } elseif [istarget "m68k-*-*"] then {
 >       gdb_test "info float" "fp0.*fp1.*fp7.*" "info float"
 > + } elseif [istarget "sh*-*"] then {
 > +     # SH may or may not have an FPU
 > +     gdb_test_multiple "info float" "info float" {
 > + 	-re "fpul.*fr0.*$gdb_prompt $" {
 > + 	      pass "info float (with FPU)"
 > + 	  }
 > + 	-re "No floating.point info available for this processor.*" {
 > + 	      pass "info float (without FPU)"
 > + 	}
 > +     }
 >   } else {
 >       gdb_test "info float" "No floating.point info available for this processor." "info float"
 >   }


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

* Re: [ping] Re: Add sh target to float.exp
  2003-08-12  0:38   ` Elena Zannoni
@ 2003-08-12 22:16     ` Michael Snyder
  2003-08-12 22:28     ` Michael Snyder
  1 sibling, 0 replies; 7+ messages in thread
From: Michael Snyder @ 2003-08-12 22:16 UTC (permalink / raw)
  To: Elena Zannoni; +Cc: gdb-patches

Elena Zannoni wrote:

>Michael Snyder writes:
> > 
> > Ping, and revised per feedback:
> > 
>
>OK, but can you add a test on some other register? At least fr1 to
>make sure we at least get past the output of the first float
>value. You could also add fr15.
>

All right.  I had originally included dr0, until I realized that
some versions have fp but not dp regs.

>
>elena
>
>
>
> > 
> > 2003-07-29  Michael Snyder  <msnyder@redhat.com>
> > 
> > 	* gdb.base/float.exp: Add test for SH.
> > 
> > Index: float.exp
> > ===================================================================
> > RCS file: /cvs/src/src/gdb/testsuite/gdb.base/float.exp,v
> > retrieving revision 1.5
> > diff -p -r1.5 float.exp
> > *** float.exp	6 Jul 2003 22:27:34 -0000	1.5
> > --- float.exp	11 Aug 2003 22:53:41 -0000
> > *************** if { [istarget "alpha*-*-*"] } then {
> > *** 63,68 ****
> > --- 63,78 ----
> >       gdb_test "info float" "f0.*f1.*f127.*" "info float"
> >   } elseif [istarget "m68k-*-*"] then {
> >       gdb_test "info float" "fp0.*fp1.*fp7.*" "info float"
> > + } elseif [istarget "sh*-*"] then {
> > +     # SH may or may not have an FPU
> > +     gdb_test_multiple "info float" "info float" {
> > + 	-re "fpul.*fr0.*$gdb_prompt $" {
> > + 	      pass "info float (with FPU)"
> > + 	  }
> > + 	-re "No floating.point info available for this processor.*" {
> > + 	      pass "info float (without FPU)"
> > + 	}
> > +     }
> >   } else {
> >       gdb_test "info float" "No floating.point info available for this processor." "info float"
> >   }
>
>  
>



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

* Re: [ping] Re: Add sh target to float.exp
  2003-08-12  0:38   ` Elena Zannoni
  2003-08-12 22:16     ` Michael Snyder
@ 2003-08-12 22:28     ` Michael Snyder
  1 sibling, 0 replies; 7+ messages in thread
From: Michael Snyder @ 2003-08-12 22:28 UTC (permalink / raw)
  To: Elena Zannoni; +Cc: gdb-patches

[-- Attachment #1: Type: text/plain, Size: 283 bytes --]

Elena Zannoni wrote:

>Michael Snyder writes:
> > 
> > Ping, and revised per feedback:
> > 
>
>OK, but can you add a test on some other register? At least fr1 to
>make sure we at least get past the output of the first float
>value. You could also add fr15.
>

Committed like this:



[-- Attachment #2: float.exp.test --]
[-- Type: text/plain, Size: 1084 bytes --]

2003-08-12  Michael Snyder  <msnyder@redhat.com>

	* gdb.base/float.exp: Add test for SH.

Index: gdb.base/float.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.base/float.exp,v
retrieving revision 1.5
diff -p -r1.5 float.exp
*** gdb.base/float.exp	6 Jul 2003 22:27:34 -0000	1.5
--- gdb.base/float.exp	12 Aug 2003 22:26:45 -0000
*************** if { [istarget "alpha*-*-*"] } then {
*** 63,68 ****
--- 63,78 ----
      gdb_test "info float" "f0.*f1.*f127.*" "info float"
  } elseif [istarget "m68k-*-*"] then {
      gdb_test "info float" "fp0.*fp1.*fp7.*" "info float"
+ } elseif [istarget "sh*-*"] then {
+     # SH may or may not have an FPU
+     gdb_test_multiple "info float" "info float" {
+ 	-re "fpul.*fr0.*fr1.*fr15.*$gdb_prompt $" {
+ 	      pass "info float (with FPU)"
+ 	  }
+ 	-re "No floating.point info available for this processor.*" {
+ 	      pass "info float (without FPU)"
+ 	}
+     }
  } else {
      gdb_test "info float" "No floating.point info available for this processor." "info float"
  }

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

end of thread, other threads:[~2003-08-12 22:28 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-07-29 21:57 Add sh target to float.exp Michael Snyder
2003-07-29 22:03 ` David Carlton
2003-07-29 22:30   ` Michael Snyder
2003-08-11 22:54 ` [ping] " Michael Snyder
2003-08-12  0:38   ` Elena Zannoni
2003-08-12 22:16     ` Michael Snyder
2003-08-12 22:28     ` Michael Snyder

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