]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
2004-06-10 Andrew Cagney <cagney@gnu.org>
authorAndrew Cagney <cagney@redhat.com>
Thu, 10 Jun 2004 17:39:28 +0000 (17:39 +0000)
committerAndrew Cagney <cagney@redhat.com>
Thu, 10 Jun 2004 17:39:28 +0000 (17:39 +0000)
* 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.

gdb/ChangeLog
gdb/infcall.c
gdb/ns32k-tdep.c
gdb/valops.c
gdb/value.h

index cdcaf371233140452960f299a6352c2544928671..a6a88389ccd16228190c94ae883ec6bddaeedd37 100644 (file)
@@ -1,3 +1,13 @@
+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.
+
 2004-06-10  Brian Ford  <ford@vss.fsi.com>
 
        * coffread.c (coff_symfile_read): Prevent mixed debugging formats
index 7f0a118de7c495cf835c92295f3ed624a9773426..ce3f25470b5d32170d668b214ff4feb71152a658 100644 (file)
@@ -669,7 +669,7 @@ You must use a pointer to function type variable. Command ignored.", arg_name);
     sp = DEPRECATED_PUSH_ARGUMENTS (nargs, args, sp, struct_return,
                                    struct_addr);
   else
-    sp = legacy_push_arguments (nargs, args, sp, struct_return, struct_addr);
+    error ("This target does not support function calls");
 
   if (DEPRECATED_PUSH_RETURN_ADDRESS_P ())
     /* for targets that use no CALL_DUMMY */
index 71d4e4015966a649cd0a2b9fbe91bb13af48b212..784cea499339c84e398bf10e03ccfd8bc9d3049b 100644 (file)
@@ -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;
+}
+
 \f
 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);
index 25c7443550a67649f6e375118db50fd48296482d..de6a8ddf4c5d5b8a4bf16e827a6ce03ffdcd6e3f 100644 (file)
@@ -50,8 +50,6 @@ extern int overload_debug;
 static int typecmp (int staticp, int varargs, int nargs,
                    struct field t1[], struct value *t2[]);
 
-static CORE_ADDR value_push (CORE_ADDR, struct value *);
-
 static struct value *search_struct_field (char *, struct value *, int,
                                      struct type *, int);
 
@@ -1005,49 +1003,6 @@ push_bytes (CORE_ADDR sp, char *buffer, int len)
   return sp;
 }
 
-/* Push onto the stack the specified value VALUE.  Pad it correctly for
-   it to be an argument to a function.  */
-
-static CORE_ADDR
-value_push (CORE_ADDR sp, struct value *arg)
-{
-  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;
-
-  if (INNER_THAN (1, 2))
-    {
-      /* stack grows downward */
-      sp -= container_len;
-      write_memory (sp + offset, VALUE_CONTENTS_ALL (arg), len);
-    }
-  else
-    {
-      /* stack grows upward */
-      write_memory (sp + offset, VALUE_CONTENTS_ALL (arg), len);
-      sp += container_len;
-    }
-
-  return sp;
-}
-
-CORE_ADDR
-legacy_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--)
-    sp = value_push (sp, args[i]);
-  return sp;
-}
-
 /* Create a value for an array by allocating space in the inferior, copying
    the data into that space, and then setting up an array value.
 
index 690edb96e89add5ba903b2beb47d2ef93813a6e5..c50c2cac2e67a0e93d9e42e2d4391e7d835a3ca7 100644 (file)
@@ -560,10 +560,6 @@ extern struct value *find_function_in_inferior (const char *);
 
 extern struct value *value_allocate_space_in_inferior (int);
 
-extern CORE_ADDR legacy_push_arguments (int nargs, struct value ** args,
-                                       CORE_ADDR sp, int struct_return,
-                                       CORE_ADDR struct_addr);
-
 extern struct value *value_of_local (const char *name, int complain);
 
 #endif /* !defined (VALUE_H) */