* [patch/rfc] kfail, not xfail descriptor parameter fails
@ 2003-11-17 23:14 Andrew Cagney
2003-11-19 18:36 ` Andrew Cagney
0 siblings, 1 reply; 2+ messages in thread
From: Andrew Cagney @ 2003-11-17 23:14 UTC (permalink / raw)
To: gdb-patches
[-- Attachment #1: Type: text/plain, Size: 394 bytes --]
Hello,
GDB screws up the passing of function parameters when the ABI uses a
descriptor (it passes the code instead of descriptor address). Anyway,
it's a bug. This changes the xfail's for that case into kfails
(refining them a little - powerpc*-*-* is too broad, the tests work on
some powerpc machines).
I think its almost but not quite obvious so I'll commit it in a day or so,
Andrew
[-- Attachment #2: diffs --]
[-- Type: text/plain, Size: 2750 bytes --]
2003-11-17 Andrew Cagney <cagney@redhat.com>
* gdb.base/callfuncs.exp: Change the XFAILed descriptor test to a
KFAIL.
Index: gdb.base/callfuncs.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.base/callfuncs.exp,v
retrieving revision 1.11
diff -u -r1.11 callfuncs.exp
--- gdb.base/callfuncs.exp 3 Apr 2003 16:34:48 -0000 1.11
+++ gdb.base/callfuncs.exp 17 Nov 2003 22:53:27 -0000
@@ -182,30 +182,27 @@
gdb_test "p t_func_values(func_val2,func_val1)" " = 0"
gdb_test "p t_func_values(func_val1,func_val2)" " = 1"
- # On the rs6000, we need to pass the address of the trampoline routine,
- # not the address of add itself. I don't know how to go from add to
- # the address of the trampoline. Similar problems exist on the HPPA,
- # and in fact can present an unsolvable problem as the stubs may not
- # even exist in the user's program. We've slightly recoded t_func_values
- # to avoid such problems in the common case. This may or may not help
- # the RS6000.
- setup_xfail "rs6000*-*-*"
- setup_xfail "powerpc*-*-*"
- if {![istarget hppa*-*-hpux*]} then {
- gdb_test "p t_func_values(add,func_val2)" " = 1"
- }
-
- setup_xfail "rs6000*-*-*"
- setup_xfail "powerpc*-*-*"
- if {![istarget hppa*-*-hpux*]} then {
- gdb_test "p t_func_values(func_val1,doubleit)" " = 1"
- }
-
- setup_xfail "rs6000*-*-*"
- setup_xfail "powerpc*-*-*"
- if {![istarget hppa*-*-hpux*]} then {
- gdb_test "p t_call_add(add,3,4)" " = 7"
- }
+ # GDB currently screws up the passing of function parameters for
+ # ABIs that use function descriptors. Instead of passing the
+ # address of te function descriptor, GDB passes the address of the
+ # function body. This results in the called function treating the
+ # first few instructions of the function proper as a descriptor
+ # and attempting a jump through that (a totally random address).
+ setup_kfail "rs6000*-*-aix*" gdb/1457
+ setup_kfail "powerpc*-*-aix*" gdb/1457
+ setup_kfail "powerpc64*-*-*" gdb/1457
+ setup_kfail hppa*-*-hpux* gdb/1457
+ gdb_test "p t_func_values(add,func_val2)" " = 1"
+ setup_kfail "rs6000*-*-aix*" gdb/1457
+ setup_kfail "powerpc*-*-aix*" gdb/1457
+ setup_kfail "powerpc64*-*-*" gdb/1457
+ setup_kfail hppa*-*-hpux* gdb/1457
+ gdb_test "p t_func_values(func_val1,doubleit)" " = 1"
+ setup_kfail "rs6000*-*-aix*" gdb/1457
+ setup_kfail "powerpc*-*-aix*" gdb/1457
+ setup_kfail "powerpc64*-*-*" gdb/1457
+ setup_kfail hppa*-*-hpux* gdb/1457
+ gdb_test "p t_call_add(add,3,4)" " = 7"
gdb_test "p t_call_add(func_val1,3,4)" " = 7"
gdb_test "p t_enum_value1(enumval1)" " = 1"
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [patch/rfc] kfail, not xfail descriptor parameter fails
2003-11-17 23:14 [patch/rfc] kfail, not xfail descriptor parameter fails Andrew Cagney
@ 2003-11-19 18:36 ` Andrew Cagney
0 siblings, 0 replies; 2+ messages in thread
From: Andrew Cagney @ 2003-11-19 18:36 UTC (permalink / raw)
To: gdb-patches
> Hello,
>
> GDB screws up the passing of function parameters when the ABI uses a descriptor (it passes the code instead of descriptor address). Anyway, it's a bug. This changes the xfail's for that case into kfails (refining them a little - powerpc*-*-* is too broad, the tests work on some powerpc machines).
>
> I think its almost but not quite obvious so I'll commit it in a day or so,
I've checked this in.
> 2003-11-17 Andrew Cagney <cagney@redhat.com>
>
> * gdb.base/callfuncs.exp: Change the XFAILed descriptor test to a
> KFAIL.
Andrew
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2003-11-19 18:36 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-11-17 23:14 [patch/rfc] kfail, not xfail descriptor parameter fails Andrew Cagney
2003-11-19 18:36 ` Andrew Cagney
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox