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.
This commit is contained in:
Pedro Alves 2013-04-19 15:21:24 +00:00
parent 9d1dd0e275
commit 70242eb16c
2 changed files with 5 additions and 1 deletions

View File

@ -1,3 +1,7 @@
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

View File

@ -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))