* win32-low.c (create_process): New.
[deliverable/binutils-gdb.git] / gdb / regcache.c
index 6c0fca82acaf0a8c8b2a626970babbc4413862ff..5eb16cc74f8d7d17da6cd2bca5753adbb0a22794 100644 (file)
@@ -7,7 +7,7 @@
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 2 of the License, or
+   the Free Software Foundation; either version 3 of the License, or
    (at your option) any later version.
 
    This program is distributed in the hope that it will be useful,
@@ -16,9 +16,7 @@
    GNU General Public License for more details.
 
    You should have received a copy of the GNU General Public License
-   along with this program; if not, write to the Free Software
-   Foundation, Inc., 51 Franklin Street, Fifth Floor,
-   Boston, MA 02110-1301, USA.  */
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 
 #include "defs.h"
 #include "inferior.h"
@@ -839,10 +837,12 @@ read_pc_pid (ptid_t ptid)
   if (gdbarch_read_pc_p (gdbarch))
     pc_val = gdbarch_read_pc (gdbarch, regcache);
   /* Else use per-frame method on get_current_frame.  */
-  else if (PC_REGNUM >= 0)
+  else if (gdbarch_pc_regnum (current_gdbarch) >= 0)
     {
       ULONGEST raw_val;
-      regcache_cooked_read_unsigned (regcache, PC_REGNUM, &raw_val);
+      regcache_cooked_read_unsigned (regcache,
+                                    gdbarch_pc_regnum (current_gdbarch),
+                                    &raw_val);
       pc_val = gdbarch_addr_bits_remove (current_gdbarch, raw_val);
     }
   else
@@ -865,8 +865,9 @@ write_pc_pid (CORE_ADDR pc, ptid_t ptid)
 
   if (gdbarch_write_pc_p (gdbarch))
     gdbarch_write_pc (gdbarch, regcache, pc);
-  else if (PC_REGNUM >= 0)
-    regcache_cooked_write_unsigned (regcache, PC_REGNUM, pc);
+  else if (gdbarch_pc_regnum (current_gdbarch) >= 0)
+    regcache_cooked_write_unsigned (regcache,
+                                   gdbarch_pc_regnum (current_gdbarch), pc);
   else
     internal_error (__FILE__, __LINE__,
                    _("write_pc_pid: Unable to update PC"));
@@ -1111,13 +1112,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.023682 seconds and 4 git commands to generate.