aboutsummaryrefslogtreecommitdiff
path: root/gdb/infcall.c
diff options
context:
space:
mode:
authorYao Qi <yao@codesourcery.com>2012-06-08 14:24:57 +0000
committerYao Qi <yao@codesourcery.com>2012-06-08 14:24:57 +0000
commit18648a37491f7c0a459750048611bd2e83aa54bf (patch)
tree4a5d0b3c65985e5982b2cbff9c4cc0a27940014e /gdb/infcall.c
parent16bdd41fc61515376a944d7e81b7adcb126bcb4e (diff)
downloadgdb-18648a37491f7c0a459750048611bd2e83aa54bf.zip
gdb-18648a37491f7c0a459750048611bd2e83aa54bf.tar.gz
gdb-18648a37491f7c0a459750048611bd2e83aa54bf.tar.bz2
gdb/
* arch-utils.c (default_return_in_first_hidden_param_p): New. * arch-utils.h: Declare. * gdbarch.sh: Add return_in_first_hidden_param_p. * gdbarch.c, gdbarch.h: Regenerated. * infcall.c (call_function_by_hand): Call gdbarch_return_in_first_hidden_param_p instead of language_pass_by_reference. * m68k-tdep.c (m68k_return_in_first_hidden_param_p): New. (m68k_gdbarch_init): Install m68k_return_in_first_hidden_param_p. * sh-tdep.c (sh_return_in_first_hidden_param_p): New. (sh_gdbarch_init): Install sh_return_in_first_hidden_param_p. * tic6x-tdep.c (tic6x_push_dummy_call): Remove local variable `cplus_return_struct_by_reference'. (tic6x_return_value): Handle language cplusplus. (tic6x_return_in_first_hidden_param_p): New. (tic6x_gdbarch_init): Install tic6x_return_in_first_hidden_param_p.
Diffstat (limited to 'gdb/infcall.c')
-rw-r--r--gdb/infcall.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/gdb/infcall.c b/gdb/infcall.c
index a3496d6..20a2c2b 100644
--- a/gdb/infcall.c
+++ b/gdb/infcall.c
@@ -464,7 +464,7 @@ call_function_by_hand (struct value *function, int nargs, struct value **args)
{
CORE_ADDR sp;
struct type *values_type, *target_values_type;
- unsigned char struct_return = 0, lang_struct_return = 0;
+ unsigned char struct_return = 0, hidden_first_param_p = 0;
CORE_ADDR struct_addr = 0;
struct infcall_control_state *inf_status;
struct cleanup *inf_status_cleanup;
@@ -598,9 +598,9 @@ call_function_by_hand (struct value *function, int nargs, struct value **args)
the first argument is passed in out0 but the hidden structure
return pointer would normally be passed in r8. */
- if (language_pass_by_reference (values_type))
+ if (gdbarch_return_in_first_hidden_param_p (gdbarch, values_type))
{
- lang_struct_return = 1;
+ hidden_first_param_p = 1;
/* Tell the target specific argument pushing routine not to
expect a value. */
@@ -680,7 +680,7 @@ call_function_by_hand (struct value *function, int nargs, struct value **args)
stack, if necessary. Make certain that the value is correctly
aligned. */
- if (struct_return || lang_struct_return)
+ if (struct_return || hidden_first_param_p)
{
int len = TYPE_LENGTH (values_type);
@@ -706,7 +706,7 @@ call_function_by_hand (struct value *function, int nargs, struct value **args)
}
}
- if (lang_struct_return)
+ if (hidden_first_param_p)
{
struct value **new_args;
@@ -1012,7 +1012,7 @@ When the function is done executing, GDB will silently stop."),
/* Figure out the value returned by the function. */
retval = allocate_value (values_type);
- if (lang_struct_return)
+ if (hidden_first_param_p)
read_value_memory (retval, 0, 1, struct_addr,
value_contents_raw (retval),
TYPE_LENGTH (values_type));