diff options
Diffstat (limited to 'gdb/trad-frame.c')
-rw-r--r-- | gdb/trad-frame.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/gdb/trad-frame.c b/gdb/trad-frame.c index e64374a..35bf02e 100644 --- a/gdb/trad-frame.c +++ b/gdb/trad-frame.c @@ -154,12 +154,14 @@ trad_frame_set_reg_regmap (struct trad_frame_cache *this_trad_cache, else { enum bfd_endian byte_order = gdbarch_byte_order (gdbarch); - gdb_byte buf[slot_size]; + gdb::byte_vector buf (slot_size); - if (target_read_memory (addr + offs, buf, sizeof buf) == 0) + if (target_read_memory (addr + offs, buf.data (), buf.size ()) + == 0) { LONGEST val - = extract_unsigned_integer (buf, sizeof buf, byte_order); + = extract_unsigned_integer (buf.data (), buf.size (), + byte_order); trad_frame_set_reg_value (this_trad_cache, regno, val); } } |