aboutsummaryrefslogtreecommitdiff
path: root/gdb/config/i386
diff options
context:
space:
mode:
authorMark Alexander <marka@cygnus>1998-07-24 20:38:43 +0000
committerMark Alexander <marka@cygnus>1998-07-24 20:38:43 +0000
commitbd06c4e4d32a233b504e8b95a76c8b282ab6aa44 (patch)
tree9121dd967f55ce0fe43cbfe7f44cc0bac04292ac /gdb/config/i386
parent3a66870a3eca92510f2454d09e2046c0fa733254 (diff)
downloadgdb-bd06c4e4d32a233b504e8b95a76c8b282ab6aa44.zip
gdb-bd06c4e4d32a233b504e8b95a76c8b282ab6aa44.tar.gz
gdb-bd06c4e4d32a233b504e8b95a76c8b282ab6aa44.tar.bz2
* config/i386/tm-i386.h (STORE_STRUCT_RETURN): Make it
work on hosts of any endianness.
Diffstat (limited to 'gdb/config/i386')
-rw-r--r--gdb/config/i386/tm-i386.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/gdb/config/i386/tm-i386.h b/gdb/config/i386/tm-i386.h
index 8f8090b..0bf3109 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,