summaryrefslogtreecommitdiff
path: root/gdb/arch-utils.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/arch-utils.c')
-rw-r--r--gdb/arch-utils.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/gdb/arch-utils.c b/gdb/arch-utils.c
index a6d0035f973..3ca193085cb 100644
--- a/gdb/arch-utils.c
+++ b/gdb/arch-utils.c
@@ -1098,6 +1098,24 @@ default_get_return_buf_addr (struct type *val_type, frame_info_ptr cur_frame)
return 0;
}
+enum return_value_convention
+default_gdbarch_return_value
+ (struct gdbarch *gdbarch, struct value *function, struct type *valtype,
+ struct regcache *regcache, struct value **read_value,
+ const gdb_byte *writebuf)
+{
+ gdb_byte *readbuf = nullptr;
+
+ if (read_value != nullptr)
+ {
+ *read_value = allocate_value (valtype);
+ readbuf = value_contents_raw (*read_value).data ();
+ }
+
+ return gdbarch_return_value (gdbarch, function, valtype, regcache,
+ readbuf, writebuf);
+}
+
/* Non-zero if we want to trace architecture code. */
#ifndef GDBARCH_DEBUG