From 48436ce6b9d02c4f4f9e3628e3dbe8247841fda9 Mon Sep 17 00:00:00 2001 From: Andrew Cagney Date: Sat, 13 Sep 2003 21:31:33 +0000 Subject: [PATCH] 2003-09-13 Andrew Cagney * 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 | 10 ++++++++++ gdb/eval.c | 4 ++-- gdb/infcall.c | 3 +-- gdb/infcmd.c | 8 ++------ gdb/value.h | 3 +-- gdb/values.c | 12 ++++-------- 6 files changed, 20 insertions(+), 20 deletions(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 147eafb05f0..bbe3d5f0eae 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,13 @@ +2003-09-13 Andrew Cagney + + * 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 * win32-nat.c: Just rely on CONTEXT_EXTENDED_REGISTER being defined for diff --git a/gdb/eval.c b/gdb/eval.c index 914a5520704..99a1b83433f 100644 --- a/gdb/eval.c +++ b/gdb/eval.c @@ -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 diff --git a/gdb/infcall.c b/gdb/infcall.c index a33cdd24511..02cd92d9da8 100644 --- a/gdb/infcall.c +++ b/gdb/infcall.c @@ -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 diff --git a/gdb/infcmd.c b/gdb/infcmd.c index 6831d6be8f9..4fcfd88b490 100644 --- a/gdb/infcmd.c +++ b/gdb/infcmd.c @@ -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); diff --git a/gdb/value.h b/gdb/value.h index d50626edf17..afec1609e7b 100644 --- a/gdb/value.h +++ b/gdb/value.h @@ -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); diff --git a/gdb/values.c b/gdb/values.c index 42395c886e2..67f91f01b10 100644 --- a/gdb/values.c +++ b/gdb/values.c @@ -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); -- 2.30.2