From: Mark Alexander Date: Fri, 24 Jul 1998 20:38:43 +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=bd06c4e4d32a233b504e8b95a76c8b282ab6aa44;p=binutils-gdb.git * config/i386/tm-i386.h (STORE_STRUCT_RETURN): Make it work on hosts of any endianness. --- diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 8a5e7c6b791..12caaa57922 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,8 @@ +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. + Fri Jul 24 07:41:12 1998 Mark Alexander * mn10300-tdep.c (set_movm_offsets): New helper function diff --git a/gdb/config/i386/tm-i386.h b/gdb/config/i386/tm-i386.h index 8f8090b96f2..0bf3109cdab 100644 --- a/gdb/config/i386/tm-i386.h +++ b/gdb/config/i386/tm-i386.h @@ -158,8 +158,10 @@ extern int i386_skip_prologue PARAMS ((int)); subroutine will return. This is called from call_function. */ #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,