aboutsummaryrefslogtreecommitdiff
path: root/gdb/amd64-windows-tdep.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/amd64-windows-tdep.c')
-rw-r--r--gdb/amd64-windows-tdep.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/gdb/amd64-windows-tdep.c b/gdb/amd64-windows-tdep.c
index 14477e6..6f7dbaa 100644
--- a/gdb/amd64-windows-tdep.c
+++ b/gdb/amd64-windows-tdep.c
@@ -355,11 +355,18 @@ amd64_windows_push_dummy_call
static enum return_value_convention
amd64_windows_return_value (struct gdbarch *gdbarch, struct value *function,
struct type *type, struct regcache *regcache,
- gdb_byte *readbuf, const gdb_byte *writebuf)
+ struct value **read_value, const gdb_byte *writebuf)
{
int len = type->length ();
int regnum = -1;
+ gdb_byte *readbuf = nullptr;
+ if (read_value != nullptr)
+ {
+ *read_value = allocate_value (type);
+ readbuf = value_contents_raw (*read_value).data ();
+ }
+
/* See if our value is returned through a register. If it is, then
store the associated register number in REGNUM. */
switch (type->code ())
@@ -1297,7 +1304,7 @@ amd64_windows_init_abi_common (gdbarch_info info, struct gdbarch *gdbarch)
/* Function calls. */
set_gdbarch_push_dummy_call (gdbarch, amd64_windows_push_dummy_call);
- set_gdbarch_return_value (gdbarch, amd64_windows_return_value);
+ set_gdbarch_return_value_as_value (gdbarch, amd64_windows_return_value);
set_gdbarch_skip_main_prologue (gdbarch, amd64_skip_main_prologue);
set_gdbarch_skip_trampoline_code (gdbarch,
amd64_windows_skip_trampoline_code);