This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
[commit] Simplify using_struct_return()
- From: Andrew Cagney <ac131313 at redhat dot com>
- To: gdb-patches at sources dot redhat dot com
- Date: Sat, 13 Sep 2003 15:47:11 -0400
- Subject: [commit] Simplify using_struct_return()
The function had two unused parameters, this deletes them.
committed,
Andrew
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.
Index: eval.c
===================================================================
RCS file: /cvs/src/src/gdb/eval.c,v
retrieving revision 1.33
diff -u -r1.33 eval.c
--- eval.c 9 Sep 2003 23:09:37 -0000 1.33
+++ eval.c 13 Sep 2003 19:30:30 -0000
@@ -855,11 +855,11 @@
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: infcall.c
===================================================================
RCS file: /cvs/src/src/gdb/infcall.c,v
retrieving revision 1.26
diff -u -r1.26 infcall.c
--- infcall.c 11 Sep 2003 15:17:15 -0000 1.26
+++ infcall.c 13 Sep 2003 19:30:38 -0000
@@ -512,8 +512,7 @@
/* 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: infcmd.c
===================================================================
RCS file: /cvs/src/src/gdb/infcmd.c,v
retrieving revision 1.86
diff -u -r1.86 infcmd.c
--- infcmd.c 4 Aug 2003 20:34:10 -0000 1.86
+++ infcmd.c 13 Sep 2003 19:30:40 -0000
@@ -1149,9 +1149,7 @@
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 @@
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: value.h
===================================================================
RCS file: /cvs/src/src/gdb/value.h,v
retrieving revision 1.50
diff -u -r1.50 value.h
--- value.h 31 Jul 2003 23:41:25 -0000 1.50
+++ value.h 13 Sep 2003 19:33:54 -0000
@@ -426,8 +426,7 @@
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: values.c
===================================================================
RCS file: /cvs/src/src/gdb/values.c,v
retrieving revision 1.52
diff -u -r1.52 values.c
--- values.c 31 Jul 2003 23:41:25 -0000 1.52
+++ values.c 13 Sep 2003 19:34:15 -0000
@@ -1272,17 +1272,13 @@
|| 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);