aboutsummaryrefslogtreecommitdiff
path: root/gdb/sh-tdep.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/sh-tdep.c')
-rw-r--r--gdb/sh-tdep.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/gdb/sh-tdep.c b/gdb/sh-tdep.c
index 7f15191..ec1151b 100644
--- a/gdb/sh-tdep.c
+++ b/gdb/sh-tdep.c
@@ -1398,10 +1398,12 @@ sh_store_return_value_fpu (struct type *type, struct regcache *regcache,
}
static enum return_value_convention
-sh_return_value_nofpu (struct gdbarch *gdbarch, struct type *func_type,
+sh_return_value_nofpu (struct gdbarch *gdbarch, struct value *function,
struct type *type, struct regcache *regcache,
gdb_byte *readbuf, const gdb_byte *writebuf)
{
+ struct type *func_type = function ? value_type (function) : NULL;
+
if (sh_use_struct_convention_nofpu (
sh_is_renesas_calling_convention (func_type), type))
return RETURN_VALUE_STRUCT_CONVENTION;
@@ -1413,10 +1415,12 @@ sh_return_value_nofpu (struct gdbarch *gdbarch, struct type *func_type,
}
static enum return_value_convention
-sh_return_value_fpu (struct gdbarch *gdbarch, struct type *func_type,
+sh_return_value_fpu (struct gdbarch *gdbarch, struct value *function,
struct type *type, struct regcache *regcache,
gdb_byte *readbuf, const gdb_byte *writebuf)
{
+ struct type *func_type = function ? value_type (function) : NULL;
+
if (sh_use_struct_convention (
sh_is_renesas_calling_convention (func_type), type))
return RETURN_VALUE_STRUCT_CONVENTION;