diff options
author | Andrew Cagney <cagney@redhat.com> | 2004-06-10 17:39:28 +0000 |
---|---|---|
committer | Andrew Cagney <cagney@redhat.com> | 2004-06-10 17:39:28 +0000 |
commit | 6675be865877705d13e6fcf9a679221f2375d96a (patch) | |
tree | f5c3b712abd1b5d81128095160cbe63b2f04562c /gdb/ns32k-tdep.c | |
parent | 6d20d2295120b8ed8f783ab23d531c5237f0cffb (diff) | |
download | gdb-6675be865877705d13e6fcf9a679221f2375d96a.tar.gz |
2004-06-10 Andrew Cagney <cagney@gnu.org>
* ns32k-tdep.c (ns32k_push_arguments): New function.
(ns32k_gdbarch_init): Set deprecated_push_arguments.
* infcall.c (call_function_by_hand): Call error instead of
legacy_push_arguments.
* value.h (legacy_push_arguments): Delete declaration.
* valops.c (legacy_push_arguments): Delete function.
(value_push): Delete function.
Diffstat (limited to 'gdb/ns32k-tdep.c')
-rw-r--r-- | gdb/ns32k-tdep.c | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/gdb/ns32k-tdep.c b/gdb/ns32k-tdep.c index 71d4e401596..784cea49933 100644 --- a/gdb/ns32k-tdep.c +++ b/gdb/ns32k-tdep.c @@ -418,6 +418,34 @@ ns32k_pop_frame (void) write_register (SP_REGNUM, fp + 8); flush_cached_frames (); } + +static CORE_ADDR +ns32k_push_arguments (int nargs, struct value **args, CORE_ADDR sp, + int struct_return, CORE_ADDR struct_addr) +{ + /* ASSERT ( !struct_return); */ + int i; + for (i = nargs - 1; i >= 0; i--) + { + struct value *arg = args[i]; + int len = TYPE_LENGTH (VALUE_ENCLOSING_TYPE (arg)); + int container_len = len; + int offset; + + /* Are we going to put it at the high or low end of the + container? */ + if (TARGET_BYTE_ORDER == BFD_ENDIAN_BIG) + offset = container_len - len; + else + offset = 0; + + /* Stack grows downward. */ + sp -= container_len; + write_memory (sp + offset, VALUE_CONTENTS_ALL (arg), len); + } + return sp; +} + static void ns32k_store_struct_return (CORE_ADDR addr, CORE_ADDR sp) @@ -524,6 +552,7 @@ ns32k_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) /* Call dummy info */ set_gdbarch_deprecated_pop_frame (gdbarch, ns32k_pop_frame); set_gdbarch_call_dummy_location (gdbarch, ON_STACK); + set_gdbarch_deprecated_push_arguments (gdbarch, ns32k_push_arguments); /* Breakpoint info */ set_gdbarch_breakpoint_from_pc (gdbarch, ns32k_breakpoint_from_pc); |