patch-2_6_7-vs1_9_1_12
[linux-2.6.git] / arch / h8300 / platform / h8300h / ptrace_h8300h.c
index 69f6ae1..18e51a7 100644 (file)
@@ -246,11 +246,13 @@ static unsigned short *getnextpc(struct task_struct *child, unsigned short *pc)
                                        return (unsigned short *)addr;
                                case relb:
                                        if ((inst = 0x55) || isbranch(child,inst & 0x0f))
-                                               (unsigned char *)pc += (signed char)(*fetch_p);
+                                               pc = (unsigned short *)((unsigned long)pc +
+                                                                      ((signed char)(*fetch_p)));
                                        return pc+1; /* skip myself */
                                case relw:
                                        if ((inst = 0x5c) || isbranch(child,(*fetch_p & 0xf0) >> 4))
-                                               (unsigned char *)pc += (signed short)(*(pc+1));
+                                               pc = (unsigned short *)((unsigned long)pc +
+                                                                      ((signed short)(*(pc+1))));
                                        return pc+2; /* skip myself */
                                }
                        }