Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/external/gpl3/gdb/dist/gdb shnbsd_get_next_pc: declare displ...



details:   https://anonhg.NetBSD.org/src/rev/d84130accc27
branches:  trunk
changeset: 770697:d84130accc27
user:      uwe <uwe%NetBSD.org@localhost>
date:      Sat Oct 29 21:18:28 2011 +0000

description:
shnbsd_get_next_pc: declare displacement as LONGEST and use
regcache_cooked_read_signed() to fetch displacement for braf/bsrf.

diffstat:

 external/gpl3/gdb/dist/gdb/shnbsd-tdep.c |  4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diffs (21 lines):

diff -r dc4d2b68ca35 -r d84130accc27 external/gpl3/gdb/dist/gdb/shnbsd-tdep.c
--- a/external/gpl3/gdb/dist/gdb/shnbsd-tdep.c  Sat Oct 29 20:59:30 2011 +0000
+++ b/external/gpl3/gdb/dist/gdb/shnbsd-tdep.c  Sat Oct 29 21:18:28 2011 +0000
@@ -264,7 +264,7 @@
 {
   unsigned short insn;
   ULONGEST sr;
-  int displacement;
+  LONGEST displacement;
   int reg;
   CORE_ADDR next_pc;
   int delay_slot;
@@ -310,7 +310,7 @@
   /* BRAF, BSRF */
   else if (BRANCH_FAR_P(insn))
     {
-      regcache_cooked_read_unsigned (regcache, BRANCH_FAR_REG(insn),
+      regcache_cooked_read_signed (regcache, BRANCH_FAR_REG(insn),
          &displacement);
       next_pc = pc + 4 + displacement;
       delay_slot = 1;



Home | Main Index | Thread Index | Old Index