2003-09-13 Andrew Cagney <cagney@redhat.com>
authorAndrew Cagney <cagney@redhat.com>
Sat, 13 Sep 2003 21:31:33 +0000 (21:31 +0000)
committerAndrew Cagney <cagney@redhat.com>
Sat, 13 Sep 2003 21:31:33 +0000 (21:31 +0000)
* values.c (using_struct_return): Delete "function" and "funcaddr"
parameters.
* value.h (using_struct_return): Update declaration.
* infcmd.c (finish_command_continuation): Update.
(finish_command): Update.
* infcall.c (call_function_by_hand): Update.
* eval.c (evaluate_subexp_standard): Update.

gdb/ChangeLog
gdb/eval.c
gdb/infcall.c
gdb/infcmd.c
gdb/value.h
gdb/values.c

index 147eafb..bbe3d5f 100644 (file)
@@ -1,3 +1,13 @@
+2003-09-13  Andrew Cagney  <cagney@redhat.com>
+
+       * values.c (using_struct_return): Delete "function" and "funcaddr"
+       parameters.
+       * value.h (using_struct_return): Update declaration.
+       * infcmd.c (finish_command_continuation): Update.
+       (finish_command): Update.
+       * infcall.c (call_function_by_hand): Update.
+       * eval.c (evaluate_subexp_standard): Update.
+
 2003-09-13  Christopher Faylor  <cgf@redhat.com>
 
        * win32-nat.c: Just rely on CONTEXT_EXTENDED_REGISTER being defined for
index 914a552..99a1b83 100644 (file)
@@ -855,11 +855,11 @@ evaluate_subexp_standard (struct type *expect_type,
                  value_type = expect_type;
              }
 
-           struct_return = using_struct_return (method, funaddr, value_type, using_gcc);
+           struct_return = using_struct_return (value_type, using_gcc);
          }
        else if (expect_type != NULL)
          {
-           struct_return = using_struct_return (NULL, addr, check_typedef (expect_type), using_gcc);
+           struct_return = using_struct_return (check_typedef (expect_type), using_gcc);
          }
        
        /* Found a function symbol.  Now we will substitute its
index a33cdd2..02cd92d 100644 (file)
@@ -512,8 +512,7 @@ call_function_by_hand (struct value *function, int nargs, struct value **args)
   /* Are we returning a value using a structure return or a normal
      value return? */
 
-  struct_return = using_struct_return (function, funaddr, value_type,
-                                      using_gcc);
+  struct_return = using_struct_return (value_type, using_gcc);
 
   /* Determine the location of the breakpoint (and possibly other
      stuff) that the called function will return to.  The SPARC, for a
index 6831d6b..4fcfd88 100644 (file)
@@ -1149,9 +1149,7 @@ finish_command_continuation (struct continuation_arg *arg)
 
       funcaddr = BLOCK_START (SYMBOL_BLOCK_VALUE (function));
 
-      struct_return = using_struct_return (value_of_variable (function, NULL),
-                                          funcaddr,
-                                          check_typedef (value_type),
+      struct_return = using_struct_return (check_typedef (value_type),
                                           BLOCK_GCC_COMPILED (SYMBOL_BLOCK_VALUE (function)));
 
       print_return_value (struct_return, value_type); 
@@ -1277,9 +1275,7 @@ finish_command (char *arg, int from_tty)
          funcaddr = BLOCK_START (SYMBOL_BLOCK_VALUE (function));
 
          struct_return =
-           using_struct_return (value_of_variable (function, NULL),
-                                funcaddr,
-                                check_typedef (value_type),
+           using_struct_return (check_typedef (value_type),
                        BLOCK_GCC_COMPILED (SYMBOL_BLOCK_VALUE (function)));
 
          print_return_value (struct_return, value_type); 
index d50626e..afec160 100644 (file)
@@ -426,8 +426,7 @@ extern struct value *value_in (struct value *element, struct value *set);
 
 extern int value_bit_index (struct type *type, char *addr, int index);
 
-extern int using_struct_return (struct value *function, CORE_ADDR funcaddr,
-                               struct type *value_type, int gcc_p);
+extern int using_struct_return (struct type *value_type, int gcc_p);
 
 extern void set_return_value (struct value *val);
 
index 42395c8..67f91f0 100644 (file)
@@ -1272,17 +1272,13 @@ generic_use_struct_convention (int gcc_p, struct type *value_type)
               || TYPE_LENGTH (value_type) == 8));
 }
 
-/* Return true if the function specified is using the structure returning
-   convention on this machine to return arguments, or 0 if it is using
-   the value returning convention.  FUNCTION is the value representing
-   the function, FUNCADDR is the address of the function, and VALUE_TYPE
-   is the type returned by the function.  GCC_P is nonzero if compiled
+/* Return true if the function returning the specified type is using
+   the convention of returning structures in memory (passing in the
+   address as a hidden first parameter).  GCC_P is nonzero if compiled
    with GCC.  */
 
-/* ARGSUSED */
 int
-using_struct_return (struct value *function, CORE_ADDR funcaddr,
-                    struct type *value_type, int gcc_p)
+using_struct_return (struct type *value_type, int gcc_p)
 {
   register enum type_code code = TYPE_CODE (value_type);