aboutsummaryrefslogtreecommitdiff
path: root/gdb/config
diff options
context:
space:
mode:
authorMark Alexander <marka@cygnus>1998-07-24 20:44:47 +0000
committerMark Alexander <marka@cygnus>1998-07-24 20:44:47 +0000
commit4448ace2424a0318e38dc0ee0b000bb0102eeead (patch)
tree9fc388e004f959f608526fb09d304638af5bd53b /gdb/config
parentbd06c4e4d32a233b504e8b95a76c8b282ab6aa44 (diff)
downloadgdb-4448ace2424a0318e38dc0ee0b000bb0102eeead.zip
gdb-4448ace2424a0318e38dc0ee0b000bb0102eeead.tar.gz
gdb-4448ace2424a0318e38dc0ee0b000bb0102eeead.tar.bz2
* config/i386/tm-i386.h (STORE_STRUCT_RETURN): Make it
work on hosts of any endianness. * config/i386/tm-i386v.h: Ditto.
Diffstat (limited to 'gdb/config')
-rw-r--r--gdb/config/i386/tm-i386v.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/gdb/config/i386/tm-i386v.h b/gdb/config/i386/tm-i386v.h
index 235558b..bb31cb0 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,