From: Mark Alexander Date: Fri, 24 Jul 1998 20:44:47 +0000 (+0000) Subject: * config/i386/tm-i386.h (STORE_STRUCT_RETURN): Make it X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=4448ace2424a0318e38dc0ee0b000bb0102eeead;p=binutils-gdb.git * config/i386/tm-i386.h (STORE_STRUCT_RETURN): Make it work on hosts of any endianness. * config/i386/tm-i386v.h: Ditto. --- diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 12caaa57922..f24f6ed0272 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -2,6 +2,7 @@ Fri Jul 24 13:32:46 1998 Mark Alexander * config/i386/tm-i386.h (STORE_STRUCT_RETURN): Make it work on hosts of any endianness. + * config/i386/tm-i386v.h: Ditto. Fri Jul 24 07:41:12 1998 Mark Alexander diff --git a/gdb/config/i386/tm-i386v.h b/gdb/config/i386/tm-i386v.h index 235558b78cc..bb31cb0c796 100644 --- a/gdb/config/i386/tm-i386v.h +++ b/gdb/config/i386/tm-i386v.h @@ -100,8 +100,10 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #undef STORE_STRUCT_RETURN #define STORE_STRUCT_RETURN(ADDR, SP) \ - { (SP) -= sizeof (ADDR); \ - write_memory ((SP), (char *) &(ADDR), sizeof (ADDR)); } + { char buf[REGISTER_SIZE]; \ + (SP) -= sizeof (ADDR); \ + store_address (buf, sizeof (ADDR), ADDR); \ + write_memory ((SP), buf, sizeof (ADDR)); } /* Extract from an array REGBUF containing the (raw) register state a function return value of type TYPE, and copy that, in virtual format,