diff options
author | Simon Marchi <simon.marchi@efficios.com> | 2023-12-21 16:03:02 +0000 |
---|---|---|
committer | Simon Marchi <simon.marchi@polymtl.ca> | 2023-12-24 09:02:08 -0500 |
commit | 9f02b3a0249e61be6150ff3450726573916fca91 (patch) | |
tree | 3bc14163215990f6eb9c8f666c4af6cad12362d6 /gdb/gdbarch.c | |
parent | 6658f874cf7b521bf2ce431fcf31cc89aebc7009 (diff) | |
download | binutils-9f02b3a0249e61be6150ff3450726573916fca91.zip binutils-9f02b3a0249e61be6150ff3450726573916fca91.tar.gz binutils-9f02b3a0249e61be6150ff3450726573916fca91.tar.bz2 |
gdb: pass frame_info_ptr to gdbarch_value_from_register
Pass a frame_info_ptr rather than a frame_id. This avoids having to do
a frame lookup on the callee side, when we can just pass the frame down
directly.
I think this fixes a bug in rs6000-tdep.c where the id of the wrong
frame was set to `VALUE_NEXT_FRAME_ID (v)`.
Change-Id: I77039bc87ea8fc5262f16d0e1446515efa21c565
Diffstat (limited to 'gdb/gdbarch.c')
-rw-r--r-- | gdb/gdbarch.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/gdb/gdbarch.c b/gdb/gdbarch.c index d584305..3b0fc04 100644 --- a/gdb/gdbarch.c +++ b/gdb/gdbarch.c @@ -2557,13 +2557,13 @@ set_gdbarch_value_to_register (struct gdbarch *gdbarch, } struct value * -gdbarch_value_from_register (struct gdbarch *gdbarch, struct type *type, int regnum, struct frame_id frame_id) +gdbarch_value_from_register (struct gdbarch *gdbarch, struct type *type, int regnum, const frame_info_ptr &this_frame) { gdb_assert (gdbarch != NULL); gdb_assert (gdbarch->value_from_register != NULL); if (gdbarch_debug >= 2) gdb_printf (gdb_stdlog, "gdbarch_value_from_register called\n"); - return gdbarch->value_from_register (gdbarch, type, regnum, frame_id); + return gdbarch->value_from_register (gdbarch, type, regnum, this_frame); } void |