aboutsummaryrefslogtreecommitdiff
path: root/gdb/mips-linux-tdep.c
diff options
context:
space:
mode:
authorSimon Marchi <simon.marchi@efficios.com>2024-04-23 16:46:06 +0000
committerSimon Marchi <simon.marchi@efficios.com>2024-07-31 13:07:44 -0400
commitc2a2c5dba240be96cf8ec9abdde4e410524b9158 (patch)
tree49f27e5a94d49357723e030f8b09e87870aa21be /gdb/mips-linux-tdep.c
parentc60b22e8edaeb7beffcf00c5616f4d4f12aae1be (diff)
downloadbinutils-c2a2c5dba240be96cf8ec9abdde4e410524b9158.zip
binutils-c2a2c5dba240be96cf8ec9abdde4e410524b9158.tar.gz
binutils-c2a2c5dba240be96cf8ec9abdde4e410524b9158.tar.bz2
gdb: remove uses of VLA
Remove uses of VLAs, replace with gdb::byte_vector. There might be more in files that I can't compile, but it's difficult to tell without actually compiling on all platforms. Change-Id: I3e5e34fcac51f3e6b732bb801c77944e010b162e
Diffstat (limited to 'gdb/mips-linux-tdep.c')
-rw-r--r--gdb/mips-linux-tdep.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/gdb/mips-linux-tdep.c b/gdb/mips-linux-tdep.c
index 7bd96a8..fecefd7 100644
--- a/gdb/mips-linux-tdep.c
+++ b/gdb/mips-linux-tdep.c
@@ -99,16 +99,17 @@ mips_linux_get_longjmp_target (const frame_info_ptr &frame, CORE_ADDR *pc)
CORE_ADDR jb_addr;
struct gdbarch *gdbarch = get_frame_arch (frame);
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
- gdb_byte buf[gdbarch_ptr_bit (gdbarch) / TARGET_CHAR_BIT];
+ gdb::byte_vector buf (gdbarch_ptr_bit (gdbarch) / TARGET_CHAR_BIT);
jb_addr = get_frame_register_unsigned (frame, MIPS_A0_REGNUM);
if (target_read_memory ((jb_addr
+ MIPS_LINUX_JB_PC * MIPS_LINUX_JB_ELEMENT_SIZE),
- buf, gdbarch_ptr_bit (gdbarch) / TARGET_CHAR_BIT))
+ buf.data (),
+ gdbarch_ptr_bit (gdbarch) / TARGET_CHAR_BIT))
return 0;
- *pc = extract_unsigned_integer (buf,
+ *pc = extract_unsigned_integer (buf.data (),
gdbarch_ptr_bit (gdbarch) / TARGET_CHAR_BIT,
byte_order);