diff options
author | qiyao <qiyao> | 2012-06-08 14:24:51 +0000 |
---|---|---|
committer | qiyao <qiyao> | 2012-06-08 14:24:51 +0000 |
commit | 092881b3e0d6e992d12f46f8fd251bbb868598ea (patch) | |
tree | 2faef897c11e385219946fef5cc0e5660417f375 /gdb/infcall.c | |
parent | 56a901143f1fa4c62f904c540041bd0000678c01 (diff) | |
download | gdb-092881b3e0d6e992d12f46f8fd251bbb868598ea.tar.gz |
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.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/gdb/infcall.c b/gdb/infcall.c index a3496d6bf3e..20a2c2baad4 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)); |