This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
PA fixes for return2.exp
- From: law at redhat dot com
- To: gdb-patches at sources dot redhat dot com
- Date: Wed, 19 Dec 2001 11:16:58 -0700
- Subject: PA fixes for return2.exp
- Reply-to: law at redhat dot com
This patch fixes the assorted failures in return2.exp. In a nutshell, for
sub-word return types, we stored the return value into the wrong location
in the register array.
This patch makes STORE_RETURN_VALUE act like EXTRACT_RETURN_VALUE and fixes
the return2.exp failures.
* tm-hppa.h (STORE_RETURN_VALUE): Update to deal with sub-word
return types.
Index: tm-hppa.h
===================================================================
RCS file: /cvs/cvsfiles/devo/gdb/config/pa/tm-hppa.h,v
retrieving revision 1.86
diff -c -3 -p -r1.86 tm-hppa.h
*** tm-hppa.h 2001/06/14 21:03:22 1.86
--- tm-hppa.h 2001/12/19 18:13:19
*************** extern use_struct_convention_fn hppa_use
*** 361,371 ****
then we put it in the float registers too. */
#define STORE_RETURN_VALUE(TYPE,VALBUF) \
! write_register_bytes (REGISTER_BYTE (28),(VALBUF), TYPE_LENGTH (TYPE)) ; \
! if (!SOFT_FLOAT) \
! write_register_bytes ((TYPE_CODE(TYPE) == TYPE_CODE_FLT \
! ? REGISTER_BYTE (FP4_REGNUM) \
! : REGISTER_BYTE (28)), \
(VALBUF), TYPE_LENGTH (TYPE))
/* Extract from an array REGBUF containing the (raw) register state
--- 361,373 ----
then we put it in the float registers too. */
#define STORE_RETURN_VALUE(TYPE,VALBUF) \
! write_register_bytes (REGISTER_BYTE (28) + \
! (TYPE_LENGTH (TYPE) > 4 \
! ? (8 - TYPE_LENGTH (TYPE)) \
! : (4 - TYPE_LENGTH (TYPE))), \
! (VALBUF), TYPE_LENGTH (TYPE)); \
! if (!SOFT_FLOAT && TYPE_CODE (TYPE) == TYPE_CODE_FLT) \
! write_register_bytes (REGISTER_BYTE (FP4_REGNUM), \
(VALBUF), TYPE_LENGTH (TYPE))
/* Extract from an array REGBUF containing the (raw) register state