diff options
author | Tom Tromey <tromey@adacore.com> | 2022-09-09 06:39:56 -0600 |
---|---|---|
committer | Tom Tromey <tromey@adacore.com> | 2023-01-03 08:45:01 -0700 |
commit | 5cb0f2d5b67ce2b4f60d5ad0b0a26ef918e8244f (patch) | |
tree | 301730b1a22abe06aeab97c275dbd27ff69a15a6 /gdb/arm-tdep.c | |
parent | 12bb802fab16b5bf8edc027c247741bd75db1257 (diff) | |
download | gdb-5cb0f2d5b67ce2b4f60d5ad0b0a26ef918e8244f.zip gdb-5cb0f2d5b67ce2b4f60d5ad0b0a26ef918e8244f.tar.gz gdb-5cb0f2d5b67ce2b4f60d5ad0b0a26ef918e8244f.tar.bz2 |
Convert selected architectures to gdbarch_return_value_as_value
This converts a few selected architectures to use
gdbarch_return_value_as_value rather than gdbarch_return_value. The
architectures are just the ones that I am able to test. This patch
should not introduce any behavior changes.
Diffstat (limited to 'gdb/arm-tdep.c')
-rw-r--r-- | gdb/arm-tdep.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/gdb/arm-tdep.c b/gdb/arm-tdep.c index 7c9adbd..fa10439 100644 --- a/gdb/arm-tdep.c +++ b/gdb/arm-tdep.c @@ -9138,8 +9138,15 @@ arm_store_return_value (struct type *type, struct regcache *regs, static enum return_value_convention arm_return_value (struct gdbarch *gdbarch, struct value *function, struct type *valtype, struct regcache *regcache, - gdb_byte *readbuf, const gdb_byte *writebuf) + 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 (); + } + arm_gdbarch_tdep *tdep = gdbarch_tdep<arm_gdbarch_tdep> (gdbarch); struct type *func_type = function ? value_type (function) : NULL; enum arm_vfp_cprc_base_type vfp_base_type; @@ -10675,7 +10682,7 @@ arm_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) set_gdbarch_register_name (gdbarch, arm_register_name); /* Returning results. */ - set_gdbarch_return_value (gdbarch, arm_return_value); + set_gdbarch_return_value_as_value (gdbarch, arm_return_value); /* Disassembly. */ set_gdbarch_print_insn (gdbarch, gdb_print_insn_arm); |