Source-Changes-HG archive

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

[src/trunk]: src/gnu/dist/gdb/gdb Fix register offset calculations. From Chri...



details:   https://anonhg.NetBSD.org/src/rev/e926dd535e3b
branches:  trunk
changeset: 555206:e926dd535e3b
user:      martin <martin%NetBSD.org@localhost>
date:      Tue Nov 11 16:24:23 2003 +0000

description:
Fix register offset calculations. From Christian Limpach.

diffstat:

 gnu/dist/gdb/gdb/sparcnbsd-tdep.c |  8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diffs (39 lines):

diff -r b24634c6d3df -r e926dd535e3b gnu/dist/gdb/gdb/sparcnbsd-tdep.c
--- a/gnu/dist/gdb/gdb/sparcnbsd-tdep.c Tue Nov 11 16:21:05 2003 +0000
+++ b/gnu/dist/gdb/gdb/sparcnbsd-tdep.c Tue Nov 11 16:24:23 2003 +0000
@@ -271,7 +271,7 @@
        {
          if (regno == i || regno == -1)
            regcache_collect (i, regs + REG64_OFFSET_GLOBAL +
-                             ((i - G0_REGNUM) * 4));
+                             ((i - G0_REGNUM) * 8));
        }
     }
 
@@ -281,7 +281,7 @@
        {
          if (regno == i || regno == -1)
            regcache_collect (i, regs + REG64_OFFSET_OUT +
-                             ((i - O0_REGNUM) * 4));
+                             ((i - O0_REGNUM) * 8));
         }
     }
 
@@ -317,7 +317,7 @@
   for (; i <= 47; i++)
     {
       if (regno == (FP0_REGNUM + i) || regno == -1)
-       supply_register (FP0_REGNUM + i, fpregs + (32 * 4) + (i * 8));
+       supply_register (FP0_REGNUM + i, fpregs + (32 * 4) + ((i - 32) * 8));
     }
 
   if (regno == FPS_REGNUM || regno == -1)
@@ -355,7 +355,7 @@
   for (; i <= 47; i++)
     {
       if (regno == (FP0_REGNUM + i) || regno == -1)
-       regcache_collect (FP0_REGNUM + i, fpregs + (32 * 4) + (i * 8));
+       regcache_collect (FP0_REGNUM + i, fpregs + (32 * 4) + ((i - 32) * 8));
     }
 
   if (regno == FPS_REGNUM || regno == -1)



Home | Main Index | Thread Index | Old Index