* symfile.h (struct sym_fns): Add new field sym_read_linetable.
[deliverable/binutils-gdb.git] / gdb / hppa-linux-nat.c
index ee24856855d04a4cb4fedff1bfefddb0ff9d9e4d..87db5a4a9dd3f751954b145cd642d28bb1dbbfaf 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 "gdbcore.h"
@@ -158,7 +156,7 @@ hppa_linux_register_addr (int regno, CORE_ADDR blockend)
 {
   CORE_ADDR addr;
 
-  if ((unsigned) regno >= NUM_REGS)
+  if ((unsigned) regno >= gdbarch_num_regs (current_gdbarch))
     error (_("Invalid register number %d."), regno);
 
   if (u_offsets[regno] == -1)
@@ -221,7 +219,7 @@ fetch_register (struct regcache *regcache, int regno)
   int tid;
   int val;
 
-  if (CANNOT_FETCH_REGISTER (regno))
+  if (gdbarch_cannot_fetch_register (current_gdbarch, regno))
     {
       regcache_raw_supply (regcache, regno, NULL);
       return;
@@ -235,7 +233,8 @@ fetch_register (struct regcache *regcache, int regno)
   errno = 0;
   val = ptrace (PTRACE_PEEKUSER, tid, hppa_linux_register_addr (regno, 0), 0);
   if (errno != 0)
-    error (_("Couldn't read register %s (#%d): %s."), REGISTER_NAME (regno),
+    error (_("Couldn't read register %s (#%d): %s."), 
+          gdbarch_register_name (current_gdbarch, regno),
           regno, safe_strerror (errno));
 
   regcache_raw_supply (regcache, regno, &val);
@@ -249,7 +248,7 @@ store_register (const struct regcache *regcache, int regno)
   int tid;
   int val;
 
-  if (CANNOT_STORE_REGISTER (regno))
+  if (gdbarch_cannot_store_register (current_gdbarch, regno))
     return;
 
   /* GNU/Linux LWP ID's are process ID's.  */
@@ -261,7 +260,8 @@ store_register (const struct regcache *regcache, int regno)
   regcache_raw_collect (regcache, regno, &val);
   ptrace (PTRACE_POKEUSER, tid, hppa_linux_register_addr (regno, 0), val);
   if (errno != 0)
-    error (_("Couldn't write register %s (#%d): %s."), REGISTER_NAME (regno),
+    error (_("Couldn't write register %s (#%d): %s."),
+          gdbarch_register_name (current_gdbarch, regno),
           regno, safe_strerror (errno));
 }
 
@@ -274,7 +274,7 @@ hppa_linux_fetch_inferior_registers (struct regcache *regcache, int regno)
 {
   if (-1 == regno)
     {
-      for (regno = 0; regno < NUM_REGS; regno++)
+      for (regno = 0; regno < gdbarch_num_regs (current_gdbarch); regno++)
         fetch_register (regcache, regno);
     }
   else 
@@ -292,7 +292,7 @@ hppa_linux_store_inferior_registers (struct regcache *regcache, int regno)
 {
   if (-1 == regno)
     {
-      for (regno = 0; regno < NUM_REGS; regno++)
+      for (regno = 0; regno < gdbarch_num_regs (current_gdbarch); regno++)
        store_register (regcache, regno);
     }
   else
This page took 0.025744 seconds and 4 git commands to generate.