aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon Marchi <simon.marchi@polymtl.ca>2015-10-22 09:46:28 -0400
committerSimon Marchi <simon.marchi@ericsson.com>2015-10-22 09:47:41 -0400
commit709476c3c595fb61f155ba453733809d3e76ed51 (patch)
tree416c6aaa6cb859efa640640b68fe1506084af5f2
parent4894d80b508ad2626eb2cfd23cfcb5635cdf7442 (diff)
downloadgdb-709476c3c595fb61f155ba453733809d3e76ed51.zip
gdb-709476c3c595fb61f155ba453733809d3e76ed51.tar.gz
gdb-709476c3c595fb61f155ba453733809d3e76ed51.tar.bz2
mips: fix void*/gdb_byte* compilation errors
The error in mips64_linux_get_longjmp_target is fixed by changing "buf" to be a gdb_byte*, as usual. supply_32bit_reg and mips64_fill_gregset do some more complicated things however, so it's safer just to add the explicit cast and avoid changing the code too much. gdb/ChangeLog: * mips-linux-tdep.c (mips64_linux_get_longjmp_target): Change type of buf to gdb_byte*. (supply_32bit_reg): Add cast. (mips64_fill_gregset): Likewise.
-rw-r--r--gdb/ChangeLog7
-rw-r--r--gdb/mips-linux-tdep.c8
2 files changed, 12 insertions, 3 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 1d3f683..5ac983f 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,10 @@
+2015-10-22 Simon Marchi <simon.marchi@polymtl.ca>
+
+ * mips-linux-tdep.c (mips64_linux_get_longjmp_target): Change type of
+ buf to gdb_byte*.
+ (supply_32bit_reg): Add cast.
+ (mips64_fill_gregset): Likewise.
+
2015-10-21 Simon Marchi <simon.marchi@polymtl.ca>
PR python/18073
diff --git a/gdb/mips-linux-tdep.c b/gdb/mips-linux-tdep.c
index a8c86bb..f7eaf34 100644
--- a/gdb/mips-linux-tdep.c
+++ b/gdb/mips-linux-tdep.c
@@ -120,7 +120,8 @@ supply_32bit_reg (struct regcache *regcache, int regnum, const void *addr)
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
gdb_byte buf[MAX_REGISTER_SIZE];
store_signed_integer (buf, register_size (gdbarch, regnum), byte_order,
- extract_signed_integer (addr, 4, byte_order));
+ extract_signed_integer ((const gdb_byte *) addr, 4,
+ byte_order));
regcache_raw_supply (regcache, regnum, buf);
}
@@ -334,7 +335,8 @@ mips64_linux_get_longjmp_target (struct frame_info *frame, CORE_ADDR *pc)
CORE_ADDR jb_addr;
struct gdbarch *gdbarch = get_frame_arch (frame);
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
- void *buf = alloca (gdbarch_ptr_bit (gdbarch) / TARGET_CHAR_BIT);
+ gdb_byte *buf
+ = (gdb_byte *) alloca (gdbarch_ptr_bit (gdbarch) / TARGET_CHAR_BIT);
int element_size = gdbarch_ptr_bit (gdbarch) == 32 ? 4 : 8;
jb_addr = get_frame_register_unsigned (frame, MIPS_A0_REGNUM);
@@ -475,7 +477,7 @@ mips64_fill_gregset (const struct regcache *regcache,
val = extract_signed_integer (buf, register_size (gdbarch, regno),
byte_order);
dst = regp + regaddr;
- store_signed_integer (dst, 8, byte_order, val);
+ store_signed_integer ((gdb_byte *) dst, 8, byte_order, val);
}
}