diff options
author | Pedro Alves <palves@redhat.com> | 2013-04-19 15:21:24 +0000 |
---|---|---|
committer | Pedro Alves <palves@redhat.com> | 2013-04-19 15:21:24 +0000 |
commit | 70242eb16c06c7fcc080003af6c17ad9dfd634c1 (patch) | |
tree | 2478328b3f8feaba484517c0ee4865e663a6d215 | |
parent | 9d1dd0e275837ad325f8ff8f51bc3d5912fa3561 (diff) | |
download | fsf-binutils-gdb-70242eb16c06c7fcc080003af6c17ad9dfd634c1.zip fsf-binutils-gdb-70242eb16c06c7fcc080003af6c17ad9dfd634c1.tar.gz fsf-binutils-gdb-70242eb16c06c7fcc080003af6c17ad9dfd634c1.tar.bz2 |
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.
-rw-r--r-- | gdb/ChangeLog | 4 | ||||
-rw-r--r-- | gdb/mips-tdep.c | 2 |
2 files changed, 5 insertions, 1 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index cfd5449..9314749 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,5 +1,9 @@ 2013-04-19 Pedro Alves <palves@redhat.com> + * mips-tdep.c (mips_read_pc): Change local 'pc' type to LONGEST. + +2013-04-19 Pedro Alves <palves@redhat.com> + * mep-tdep.c (mep_get_insn): Change 'insn' parameter type to unsigned long *. diff --git a/gdb/mips-tdep.c b/gdb/mips-tdep.c index 8e5d5d2..245ffd6 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)) |