2007-08-17 Michael Snyder <msnyder@access-company.com>
[deliverable/binutils-gdb.git] / gdb / regcache.c
index 05dc4bb77a24c89642f4ebfdbf8cb05ae3a942f1..4e3dd8e1e77bac5c2347ec0f84111ef4039c373b 100644 (file)
@@ -867,7 +867,7 @@ write_pc_pid (CORE_ADDR pc, ptid_t ptid)
 
   if (gdbarch_write_pc_p (gdbarch))
     gdbarch_write_pc (gdbarch, regcache, pc);
-  if (gdbarch_pc_regnum (current_gdbarch) >= 0)
+  else if (gdbarch_pc_regnum (current_gdbarch) >= 0)
     regcache_cooked_write_unsigned (regcache,
                                    gdbarch_pc_regnum (current_gdbarch), pc);
   else
@@ -1114,13 +1114,13 @@ static void
 regcache_print (char *args, enum regcache_dump_what what_to_dump)
 {
   if (args == NULL)
-    regcache_dump (current_regcache, gdb_stdout, what_to_dump);
+    regcache_dump (get_current_regcache (), gdb_stdout, what_to_dump);
   else
     {
       struct ui_file *file = gdb_fopen (args, "w");
       if (file == NULL)
        perror_with_name (_("maintenance print architecture"));
-      regcache_dump (current_regcache, file, what_to_dump);    
+      regcache_dump (get_current_regcache (), file, what_to_dump);
       ui_file_delete (file);
     }
 }
This page took 0.023498 seconds and 4 git commands to generate.