Don't emit gdbarch_return_value

The previous patch introduced a new overload of gdbarch_return_value.
The intent here is that this new overload always be called by the core
of gdb -- the previous implementation is effectively deprecated,
because a call to the old-style method will not work with any
converted architectures (whereas calling the new-style method is will
delegate when needed).

This patch changes gdbarch.py so that the old gdbarch_return_value
wrapper function can be omitted.  This will prevent any errors from
creeping in.
This commit is contained in:
Tom Tromey
2022-09-07 08:58:18 -06:00
parent 4e1d2f5814
commit 43f2b4583f
5 changed files with 61 additions and 62 deletions

View File

@@ -1098,24 +1098,6 @@ 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
@@ -1186,6 +1168,24 @@ pstring_list (const char *const *list)
#include "gdbarch.c"
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);
}
obstack *gdbarch_obstack (gdbarch *arch)
{
return &arch->obstack;