aboutsummaryrefslogtreecommitdiff
path: root/gdb/jit.c
diff options
context:
space:
mode:
authorThiago Jung Bauermann <thiago.bauermann@linaro.org>2024-08-22 19:42:45 -0300
committerThiago Jung Bauermann <thiago.bauermann@linaro.org>2025-01-09 22:47:21 -0300
commitad59259604f008e20490f9c82cf287d5a601a66c (patch)
tree4e99f99c286fa94b1eefe8effdcb5ebc2dbc7bbf /gdb/jit.c
parent1f493519f703220bc072538ce3586f7363eba904 (diff)
downloadbinutils-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.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gdb/jit.c b/gdb/jit.c
index 77d41bf..4b9400a 100644
--- a/gdb/jit.c
+++ b/gdb/jit.c
@@ -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)