summaryrefslogtreecommitdiff
path: root/gdb/arch-utils.c
diff options
context:
space:
mode:
authorqiyao <qiyao>2012-06-08 14:24:51 +0000
committerqiyao <qiyao>2012-06-08 14:24:51 +0000
commit092881b3e0d6e992d12f46f8fd251bbb868598ea (patch)
tree2faef897c11e385219946fef5cc0e5660417f375 /gdb/arch-utils.c
parent56a901143f1fa4c62f904c540041bd0000678c01 (diff)
downloadgdb-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/arch-utils.c')
-rw-r--r--gdb/arch-utils.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/gdb/arch-utils.c b/gdb/arch-utils.c
index e683a2d42b0..f4414b91dda 100644
--- a/gdb/arch-utils.c
+++ b/gdb/arch-utils.c
@@ -31,6 +31,7 @@
#include "osabi.h"
#include "target-descriptions.h"
#include "objfiles.h"
+#include "language.h"
#include "version.h"
@@ -793,6 +794,16 @@ default_gen_return_address (struct gdbarch *gdbarch,
error (_("This architecture has no method to collect a return address."));
}
+int
+default_return_in_first_hidden_param_p (struct gdbarch *gdbarch,
+ struct type *type)
+{
+ /* Usually, the return value's address is stored the in the "first hidden"
+ parameter if the return value should be passed by reference, as
+ specified in ABI. */
+ return language_pass_by_reference (type);
+}
+
/* */
/* -Wmissing-prototypes */