aboutsummaryrefslogtreecommitdiff
path: root/gdb/tm-sun3.h
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/tm-sun3.h')
-rw-r--r--gdb/tm-sun3.h9
1 files changed, 7 insertions, 2 deletions
diff --git a/gdb/tm-sun3.h b/gdb/tm-sun3.h
index e6860c6..b3da81b 100644
--- a/gdb/tm-sun3.h
+++ b/gdb/tm-sun3.h
@@ -120,5 +120,10 @@ taken for the arguments. */
into a call sequence of the above form stored at DUMMYNAME. */
#define FIX_CALL_DUMMY(dummyname, pc, fun, nargs, args, type, gcc_p) \
-{ *(int *)((char *) dummyname + 20) = nargs * 4; \
- *(int *)((char *) dummyname + 14) = fun; }
+{ int temp; \
+ temp = nargs * 4; \
+ SWAP_TARGET_AND_HOST (temp, 4); \
+ bcopy ((char *)&temp, (char *)(dummyname) + 20, 4); \
+ temp = fun; \
+ SWAP_TARGET_AND_HOST (temp, 4); \
+ bcopy ((char *)&temp, (char *)(dummyname) + 14, 4); }