Module Name:    src
Committed By:   uwe
Date:           Sat Oct 29 21:18:28 UTC 2011

Modified Files:
        src/external/gpl3/gdb/dist/gdb: shnbsd-tdep.c

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


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/external/gpl3/gdb/dist/gdb/shnbsd-tdep.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/gpl3/gdb/dist/gdb/shnbsd-tdep.c
diff -u src/external/gpl3/gdb/dist/gdb/shnbsd-tdep.c:1.4 src/external/gpl3/gdb/dist/gdb/shnbsd-tdep.c:1.5
--- src/external/gpl3/gdb/dist/gdb/shnbsd-tdep.c:1.4	Mon Oct 24 23:58:01 2011
+++ src/external/gpl3/gdb/dist/gdb/shnbsd-tdep.c	Sat Oct 29 21:18:28 2011
@@ -264,7 +264,7 @@ shnbsd_get_next_pc (struct regcache *reg
 {
   unsigned short insn;
   ULONGEST sr;
-  int displacement;
+  LONGEST displacement;
   int reg;
   CORE_ADDR next_pc;
   int delay_slot;
@@ -310,7 +310,7 @@ shnbsd_get_next_pc (struct regcache *reg
   /* 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;

Reply via email to