aboutsummaryrefslogtreecommitdiff
path: root/gdb/trad-frame.h
diff options
context:
space:
mode:
authorLuis Machado <luis.machado@linaro.org>2020-12-23 16:06:11 -0300
committerLuis Machado <luis.machado@linaro.org>2021-01-19 10:26:52 -0300
commitccbe4c82d5219502806dc62aa1cf51e5b1a4b479 (patch)
tree5e3b6973a19cee71128da07880c85464b702d5ef /gdb/trad-frame.h
parent26503e2f5eae6019c8649a3dd204a82705efc740 (diff)
downloadfsf-binutils-gdb-ccbe4c82d5219502806dc62aa1cf51e5b1a4b479.zip
fsf-binutils-gdb-ccbe4c82d5219502806dc62aa1cf51e5b1a4b479.tar.gz
fsf-binutils-gdb-ccbe4c82d5219502806dc62aa1cf51e5b1a4b479.tar.bz2
Use gdb::array_view for setting value bytes in trad-frame
This patch updates the functions setting value bytes in trad-frame to use a gdb::array_view instead of passing a buffer and a size. gdb/ChangeLog: 2021-01-19 Luis Machado <luis.machado@linaro.org> * aarch64-linux-tdep.c (aarch64_linux_restore_vreg): Pass in an array_view. * trad-frame.c (trad_frame_set_value_bytes): Use gdb::array_view instead of buffer and size. (trad_frame_set_reg_value_bytes): Likewise. * trad-frame.h (trad_frame_set_reg_value_bytes): Likewise. (trad_frame_set_value_bytes): Likewise.
Diffstat (limited to 'gdb/trad-frame.h')
-rw-r--r--gdb/trad-frame.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/gdb/trad-frame.h b/gdb/trad-frame.h
index cdc937c..dc29bab 100644
--- a/gdb/trad-frame.h
+++ b/gdb/trad-frame.h
@@ -55,8 +55,8 @@ void trad_frame_set_reg_value (struct trad_frame_cache *this_cache,
/* Given the cache in THIS_TRAD_CACHE, set the value of REGNUM to the bytes
contained in BYTES with size SIZE. */
void trad_frame_set_reg_value_bytes (struct trad_frame_cache *this_trad_cache,
- int regnum, const gdb_byte *bytes,
- size_t size);
+ int regnum,
+ gdb::array_view<const gdb_byte> bytes);
struct value *trad_frame_get_register (struct trad_frame_cache *this_trad_cache,
struct frame_info *this_frame,
@@ -204,8 +204,8 @@ void trad_frame_set_unknown (trad_frame_saved_reg this_saved_regs[],
/* Encode REGNUM value in the trad-frame as a sequence of bytes. This is
useful when the value is larger than what primitive types can hold. */
void trad_frame_set_value_bytes (trad_frame_saved_reg this_saved_regs[],
- int regnum, const gdb_byte *bytes,
- size_t size);
+ int regnum,
+ gdb::array_view<const gdb_byte> bytes);
/* Convenience functions, return non-zero if the register has been
encoded as specified. */