* lib/gdb.exp (build_id_debug_filename_get): Improve check for
[deliverable/binutils-gdb.git] / gdb / hppa-hpux-nat.c
index fcf681c6a40c6cd27d70a0667884a5d1416faa62..4a0f75ff52c61b26396d0e3e6eee7c802a1e32a4 100644 (file)
@@ -6,7 +6,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,
@@ -15,9 +15,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"
@@ -110,7 +108,8 @@ hppa_hpux_fetch_register (struct regcache *regcache, int regnum)
 
     if (ttrace (TT_LWP_RUREGS, pid, lwp, addr, size, (uintptr_t)buf) == -1)
       error (_("Couldn't read register %s (#%d): %s"),
-            REGISTER_NAME (regnum), regnum, safe_strerror (errno));
+            gdbarch_register_name (current_gdbarch, regnum),
+            regnum, safe_strerror (errno));
   }
 #else
   {
@@ -123,7 +122,8 @@ hppa_hpux_fetch_register (struct regcache *regcache, int regnum)
        buf[i] = ptrace (PT_RUREGS, pid, (PTRACE_TYPE_ARG3) addr, 0, 0);
        if (errno != 0)
          error (_("Couldn't read register %s (#%d): %s"),
-                REGISTER_NAME (regnum), regnum, safe_strerror (errno));
+                gdbarch_register_name (current_gdbarch, regnum),
+                regnum, safe_strerror (errno));
 
        addr += sizeof (PTRACE_TYPE_RET);
       }
@@ -145,7 +145,7 @@ static void
 hppa_hpux_fetch_inferior_registers (struct regcache *regcache, int regnum)
 {
   if (regnum == -1)
-    for (regnum = 0; regnum < NUM_REGS; regnum++)
+    for (regnum = 0; regnum < gdbarch_num_regs (current_gdbarch); regnum++)
       hppa_hpux_fetch_register (regcache, regnum);
   else
     hppa_hpux_fetch_register (regcache, regnum);
@@ -187,7 +187,8 @@ hppa_hpux_store_register (struct regcache *regcache, int regnum)
 
     if (ttrace (TT_LWP_WUREGS, pid, lwp, addr, size, (uintptr_t)buf) == -1)
       error (_("Couldn't write register %s (#%d): %s"),
-            REGISTER_NAME (regnum), regnum, safe_strerror (errno));
+            gdbarch_register_name (current_gdbarch, regnum),
+            regnum, safe_strerror (errno));
   }
 #else
   {
@@ -200,7 +201,8 @@ hppa_hpux_store_register (struct regcache *regcache, int regnum)
        ptrace (PT_WUREGS, pid, (PTRACE_TYPE_ARG3) addr, buf[i], 0);
        if (errno != 0)
          error (_("Couldn't write register %s (#%d): %s"),
-                REGISTER_NAME (regnum), regnum, safe_strerror (errno));
+                gdbarch_register_name (current_gdbarch, regnum),
+                regnum, safe_strerror (errno));
 
        addr += sizeof (PTRACE_TYPE_RET);
       }
@@ -215,7 +217,7 @@ static void
 hppa_hpux_store_inferior_registers (struct regcache *regcache, int regnum)
 {
   if (regnum == -1)
-    for (regnum = 0; regnum < NUM_REGS; regnum++)
+    for (regnum = 0; regnum < gdbarch_num_regs (current_gdbarch); regnum++)
       hppa_hpux_store_register (regcache, regnum);
   else
     hppa_hpux_store_register (regcache, regnum);
This page took 0.025012 seconds and 4 git commands to generate.