diff options
author | Thiago Jung Bauermann <thiago.bauermann@linaro.org> | 2024-08-22 19:42:45 -0300 |
---|---|---|
committer | Thiago Jung Bauermann <thiago.bauermann@linaro.org> | 2025-01-09 22:47:21 -0300 |
commit | ad59259604f008e20490f9c82cf287d5a601a66c (patch) | |
tree | 4e99f99c286fa94b1eefe8effdcb5ebc2dbc7bbf /gdb/jit.c | |
parent | 1f493519f703220bc072538ce3586f7363eba904 (diff) | |
download | binutils-ad59259604f008e20490f9c82cf287d5a601a66c.zip binutils-ad59259604f008e20490f9c82cf287d5a601a66c.tar.gz binutils-ad59259604f008e20490f9c82cf287d5a601a66c.tar.bz2 |
GDB: trad-frame: Store length of value_bytes in trad_frame_saved_reg
The goal is to ensure that it is available in frame_unwind_got_bytes () to
make sure that the provided buf isn't larger than the size of the register
being provisioned.
In the process, regcache's cached_reg_t::data also needed to be
converted to a gdb::byte_vector, so that the register contents' size can
be tracked.
Approved-By: Simon Marchi <simon.marchi@efficios.com>
Diffstat (limited to 'gdb/jit.c')
-rw-r--r-- | gdb/jit.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -1096,7 +1096,7 @@ jit_frame_prev_register (const frame_info_ptr &this_frame, void **cache, int reg return frame_unwind_got_optimized (this_frame, reg); gdbarch = priv->regcache->arch (); - gdb_byte *buf = (gdb_byte *) alloca (register_size (gdbarch, reg)); + gdb::byte_vector buf (register_size (gdbarch, reg)); enum register_status status = priv->regcache->cooked_read (reg, buf); if (status == REG_VALID) |