infcmd.c (step_1),
authorK. Richard Pixley <rich@cygnus>
Wed, 22 Sep 1993 18:34:05 +0000 (18:34 +0000)
committerK. Richard Pixley <rich@cygnus>
Wed, 22 Sep 1993 18:34:05 +0000 (18:34 +0000)
  infrun.c (wait_for_inferior): collapse SHIFT_INST_REGS ifdef
  and insert macro.

gdb/infcmd.c
gdb/infrun.c

index 8cd99404c6e2fff81460306a6283a19ae5680cba..1df2c8fa23f34dfa2575aa468804b396624735db 100644 (file)
@@ -395,8 +395,7 @@ which has no line number information.\n", name);
       if (! stop_step)
        break;
 #if defined (SHIFT_INST_REGS)
-      write_register (NNPC_REGNUM, read_register (NPC_REGNUM));
-      write_register (NPC_REGNUM, read_register (PC_REGNUM));
+      SHIFT_INST_REGS();
 #endif
     }
 
index b3484a157c024b9f28cf96ce551f71b2544fa017..e7d2c4221ea55eeab66f643edede2267339f7259 100644 (file)
@@ -1259,15 +1259,7 @@ step_into_function:
           if (!bpstat_explains_signal (stop_bpstat)
              && (stop_signal != SIGCLD) 
               && !stopped_by_random_signal)
-            {
-            CORE_ADDR pc_contents = read_register (PC_REGNUM);
-            CORE_ADDR npc_contents = read_register (NPC_REGNUM);
-            if (pc_contents != npc_contents)
-              {
-              write_register (NNPC_REGNUM, npc_contents);
-              write_register (NPC_REGNUM, pc_contents);
-             }
-            }
+            SHIFT_INST_REGS();
 #endif /* SHIFT_INST_REGS */
 
          resume (CURRENTLY_STEPPING (), stop_signal);