summaryrefslogtreecommitdiff
path: root/gdb/mips-tdep.c
diff options
context:
space:
mode:
authorPedro Alves <palves@redhat.com>2013-04-19 15:21:24 +0000
committerPedro Alves <palves@redhat.com>2013-04-19 15:21:24 +0000
commit5c6f64738585ff93d63f5782b9bb044eca637fa0 (patch)
tree5c9297a81c4cc653b8640bb9360f0d27979d4add /gdb/mips-tdep.c
parent7b6538165a92ffa94a76d4c7677c8c0a5de527b9 (diff)
downloadgdb-5c6f64738585ff93d63f5782b9bb044eca637fa0.tar.gz
mips-tdep.c: Wrong signness for local holding PC register.
Addresses on MIPS are signed, and we're indeed using regcache_cooked_read_signed to read the PC, but, we're passing it the address of an unsigned variable, which triggers a -Wpointer-sign warning. I've chosen to change the variable's type. I believe this will end up being the same (though I can't test it). gdb/ 2013-04-19 Pedro Alves <palves@redhat.com> * mips-tdep.c (mips_read_pc): Change local 'pc' type to LONGEST.
Diffstat (limited to 'gdb/mips-tdep.c')
-rw-r--r--gdb/mips-tdep.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gdb/mips-tdep.c b/gdb/mips-tdep.c
index 8e5d5d2cd84..245ffd6bb4b 100644
--- a/gdb/mips-tdep.c
+++ b/gdb/mips-tdep.c
@@ -1245,7 +1245,7 @@ static CORE_ADDR
mips_read_pc (struct regcache *regcache)
{
int regnum = gdbarch_pc_regnum (get_regcache_arch (regcache));
- ULONGEST pc;
+ LONGEST pc;
regcache_cooked_read_signed (regcache, regnum, &pc);
if (is_compact_addr (pc))