Add gdbarch callback to provide formats for debug info float types
[deliverable/binutils-gdb.git] / gdb / hppa-linux-nat.c
index a92510b94aeb4d7444130956aa963ad24028870d..f66b12c7fdb87fd641654f756c20c00f1cb624e2 100644 (file)
@@ -1,6 +1,6 @@
 /* Functions specific to running GDB native on HPPA running GNU/Linux.
 
-   Copyright (C) 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
+   Copyright (C) 2004-2016 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
 #include "defs.h"
 #include "gdbcore.h"
 #include "regcache.h"
-#include "gdb_string.h"
 #include "inferior.h"
 #include "target.h"
 #include "linux-nat.h"
 
 #include <sys/procfs.h>
-#include <sys/ptrace.h>
+#include "nat/gdb_ptrace.h"
 #include <linux/version.h>
 
 #include <asm/ptrace.h>
@@ -34,7 +33,7 @@
 
 #include "hppa-tdep.h"
 
-/* Prototypes for supply_gregset etc. */
+/* Prototypes for supply_gregset etc.  */
 #include "gregset.h"
 
 /* These must match the order of the register names.
@@ -224,9 +223,9 @@ fetch_register (struct regcache *regcache, int regno)
     }
 
   /* GNU/Linux LWP ID's are process ID's.  */
-  tid = TIDGET (inferior_ptid);
+  tid = ptid_get_lwp (inferior_ptid);
   if (tid == 0)
-    tid = PIDGET (inferior_ptid); /* Not a threaded program.  */
+    tid = ptid_get_pid (inferior_ptid); /* Not a threaded program.  */
 
   errno = 0;
   val = ptrace (PTRACE_PEEKUSER, tid, hppa_linux_register_addr (regno, 0), 0);
@@ -238,7 +237,7 @@ fetch_register (struct regcache *regcache, int regno)
   regcache_raw_supply (regcache, regno, &val);
 }
 
-/* Store one register. */
+/* Store one register.  */
 
 static void
 store_register (const struct regcache *regcache, int regno)
@@ -251,9 +250,9 @@ store_register (const struct regcache *regcache, int regno)
     return;
 
   /* GNU/Linux LWP ID's are process ID's.  */
-  tid = TIDGET (inferior_ptid);
+  tid = ptid_get_lwp (inferior_ptid);
   if (tid == 0)
-    tid = PIDGET (inferior_ptid); /* Not a threaded program.  */
+    tid = ptid_get_pid (inferior_ptid); /* Not a threaded program.  */
 
   errno = 0;
   regcache_raw_collect (regcache, regno, &val);
@@ -269,7 +268,8 @@ store_register (const struct regcache *regcache, int regno)
    point registers depending upon the value of regno.  */
 
 static void
-hppa_linux_fetch_inferior_registers (struct regcache *regcache, int regno)
+hppa_linux_fetch_inferior_registers (struct target_ops *ops,
+                                    struct regcache *regcache, int regno)
 {
   if (-1 == regno)
     {
@@ -289,7 +289,8 @@ hppa_linux_fetch_inferior_registers (struct regcache *regcache, int regno)
    point registers depending upon the value of regno.  */
 
 static void
-hppa_linux_store_inferior_registers (struct regcache *regcache, int regno)
+hppa_linux_store_inferior_registers (struct target_ops *ops,
+                                    struct regcache *regcache, int regno)
 {
   if (-1 == regno)
     {
@@ -343,7 +344,7 @@ fill_gregset (const struct regcache *regcache,
 
 /*  Given a pointer to a floating point register set in /proc format
    (fpregset_t *), unpack the register contents and supply them as gdb's
-   idea of the current floating point register values. */
+   idea of the current floating point register values.  */
 
 void
 supply_fpregset (struct regcache *regcache, const gdb_fpregset_t *fpregsetp)
@@ -362,7 +363,7 @@ supply_fpregset (struct regcache *regcache, const gdb_fpregset_t *fpregsetp)
 /*  Given a pointer to a floating point register set in /proc format
    (fpregset_t *), update the register specified by REGNO from gdb's idea
    of the current floating point register set.  If REGNO is -1, update
-   them all. */
+   them all.  */
 
 void
 fill_fpregset (const struct regcache *regcache,
This page took 0.026806 seconds and 4 git commands to generate.