Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* [patch/rfc] more structs.exp kfails
@ 2003-12-04 17:44 Andrew Cagney
  2003-12-04 21:46 ` J. Johnston
  0 siblings, 1 reply; 4+ messages in thread
From: Andrew Cagney @ 2003-12-04 17:44 UTC (permalink / raw)
  To: gdb-patches, J. Johnston

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


The attatched tweaks structs.exp so that it KFAILs the case where a 
"return struct" fails because the target hasn't implemented the relevant 
code.

Jeff and I were puzzling over an apparent regression in the ia64 - this 
better clasifies it as something that is known to have never worked.

So, jeff, if it works for you, I'll commit it in a day or so,
Andrew

[-- Attachment #2: diffs --]
[-- Type: text/plain, Size: 1760 bytes --]

2003-12-04  Andrew Cagney  <cagney@redhat.com>

	* gdb.base/structs.exp (test_struct_returns): When applicable, set
	"return_value_unimplemented".  When an unimplemented struct return
	architecture, report incorrect values as a KFAIL

Index: testsuite/gdb.base/structs.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.base/structs.exp,v
retrieving revision 1.12
diff -u -r1.12 structs.exp
--- testsuite/gdb.base/structs.exp	27 Nov 2003 20:40:52 -0000	1.12
+++ testsuite/gdb.base/structs.exp	4 Dec 2003 16:07:14 -0000
@@ -299,6 +299,7 @@
 
     set test "return foo<n>; ${tests}"
     set return_value_unknown 0
+    set return_value_unimplemented 0
     gdb_test_multiple "return foo${n}" "${test}" {
 	-re "The location" {
 	    # Ulgh, a struct return, remember this (still need prompt).
@@ -307,10 +308,10 @@
 	}
 	-re "A structure or union" {
 	    # Ulgh, a struct return, remember this (still need prompt).
-	    # Set it to something unique so that it won't match a
-	    # struct return convention value.
-	    # set return_value_unknown -1
 	    set return_value_unknown 1
+	    # Double ulgh.  Architecture doesn't use return_value and
+	    # hence hasn't implemented small structure return.
+	    set return_value_unimplemented 1
 	    exp_continue
 	}
 	-re "Make fun${n} return now.*y or n. $" {
@@ -353,6 +354,15 @@
 		# This contradicts the above claim that GDB knew
 		# the location of the return-value.
 		fail "${test}"
+	    }
+	}
+	-re ".*${gdb_prompt} $" {
+	    if $return_value_unimplemented {
+		# What a suprize.  The architecture hasn't implemented
+		# return_value, and hence has to fail.
+		kfail "$test" gdb/1444
+	    } else {
+		fail "$test"
 	    }
 	}
     }	

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

* Re: [patch/rfc] more structs.exp kfails
  2003-12-04 17:44 [patch/rfc] more structs.exp kfails Andrew Cagney
@ 2003-12-04 21:46 ` J. Johnston
  2003-12-06 22:47   ` Andrew Cagney
  0 siblings, 1 reply; 4+ messages in thread
From: J. Johnston @ 2003-12-04 21:46 UTC (permalink / raw)
  To: Andrew Cagney; +Cc: gdb-patches

Andrew Cagney wrote:
> 
> The attatched tweaks structs.exp so that it KFAILs the case where a 
> "return struct" fails because the target hasn't implemented the relevant 
> code.
> 
> Jeff and I were puzzling over an apparent regression in the ia64 - this 
> better clasifies it as something that is known to have never worked.
> 
> So, jeff, if it works for you, I'll commit it in a day or so,
> Andrew

The patch works but it uncovers two separate bugs.  1. printing long doubles on 
the ia64 is hosed  2. once fixing printing long doubles, doing a p/c on a long 
double value causes it to spit out the hex bytes of the long double

That doesn't affect whether you should check this in.  I will shortly post a fix 
for the ia64-tdep file.

-- Jeff J.


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

* Re: [patch/rfc] more structs.exp kfails
  2003-12-04 21:46 ` J. Johnston
@ 2003-12-06 22:47   ` Andrew Cagney
  0 siblings, 0 replies; 4+ messages in thread
From: Andrew Cagney @ 2003-12-06 22:47 UTC (permalink / raw)
  To: J. Johnston; +Cc: Andrew Cagney, gdb-patches

> Andrew Cagney wrote:
> 
> The attatched tweaks structs.exp so that it KFAILs the case where a "return struct" fails because the target hasn't implemented the relevant code.
> 
> Jeff and I were puzzling over an apparent regression in the ia64 - this better clasifies it as something that is known to have never worked.
> 
> So, jeff, if it works for you, I'll commit it in a day or so,
> Andrew
> 
> The patch works but it uncovers two separate bugs.  1. printing long doubles on the ia64 is hosed  2. once fixing printing long doubles, doing a p/c on a long double value causes it to spit out the hex bytes of the long double
> 
> That doesn't affect whether you should check this in.  I will shortly post a fix for the ia64-tdep file.

Thanks, committed.

Andrew



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

* Re: [patch/rfc] more structs.exp kfails
@ 2003-12-04 18:02 Michael Elizabeth Chastain
  0 siblings, 0 replies; 4+ messages in thread
From: Michael Elizabeth Chastain @ 2003-12-04 18:02 UTC (permalink / raw)
  To: ac131313, gdb-patches, jjohnstn

ac> The attatched tweaks structs.exp so that it KFAILs the case where a 
ac> "return struct" fails because the target hasn't implemented the relevant 
ac> code.

I like it!

Michael C


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

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

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-12-04 17:44 [patch/rfc] more structs.exp kfails Andrew Cagney
2003-12-04 21:46 ` J. Johnston
2003-12-06 22:47   ` Andrew Cagney
2003-12-04 18:02 Michael Elizabeth Chastain

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