* Re: Add sh target to float.exp
@ 2003-07-29 22:07 Michael Elizabeth Chastain
0 siblings, 0 replies; 4+ messages in thread
From: Michael Elizabeth Chastain @ 2003-07-29 22:07 UTC (permalink / raw)
To: gdb-patches, msnyder
Proofread but not tested, looks okay to me.
You might want to start using gdb_test_multiple.
gdb.base/gdb1250.exp is a short example.
gdb_test_multiple "info float" "info float" {
-re ".*fpul.*fr0.*dr0.*$gdb_prompt $" {
# SH may or may not have an FPU
pass "info float (with FPU)"
}
-re "No floating.point info available for this processor.*$gdb_prompt $" {
pass "info float (without FPU)"
}
}
Or leave gdb_test_multiple for another day, whatever.
Michael C
^ permalink raw reply [flat|nested] 4+ messages in thread* Add sh target to float.exp
@ 2003-07-29 21:57 Michael Snyder
2003-07-29 22:03 ` David Carlton
0 siblings, 1 reply; 4+ 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] 4+ messages in thread* Re: Add sh target to float.exp
2003-07-29 21:57 Michael Snyder
@ 2003-07-29 22:03 ` David Carlton
2003-07-29 22:30 ` Michael Snyder
0 siblings, 1 reply; 4+ 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] 4+ 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; 4+ 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] 4+ messages in thread
end of thread, other threads:[~2003-07-29 22:30 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-07-29 22:07 Add sh target to float.exp Michael Elizabeth Chastain
-- strict thread matches above, loose matches on Subject: below --
2003-07-29 21:57 Michael Snyder
2003-07-29 22:03 ` David Carlton
2003-07-29 22:30 ` Michael Snyder
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox