Minor bug fixes from last big checkin.
[deliverable/binutils-gdb.git] / gdb / hp300ux-xdep.c
index f7f1cf08102d93a1f2a247cb46aa32bb2fa114be..f043accd0b0517c83128e3da7013674a9d24c2f3 100644 (file)
@@ -3,23 +3,21 @@
    
 This file is part of GDB.
 
-GDB is free software; you can redistribute it and/or modify
+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 1, or (at your option)
-any later version.
+the Free Software Foundation; either version 2 of the License, or
+(at your option) any later version.
 
-GDB is distributed in the hope that it will be useful,
+This program is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 GNU General Public License for more details.
 
 You should have received a copy of the GNU General Public License
-along with GDB; see the file COPYING.  If not, write to
-the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.  */
+along with this program; if not, write to the Free Software
+Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.  */
 
-#include <stdio.h>
 #include "defs.h"
-#include "param.h"
 #include "frame.h"
 #include "inferior.h"
 
@@ -43,7 +41,8 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.  */
 
 #define INFERIOR_AR0(u)                                                        \
   ((ptrace                                                             \
-    (PT_RUAREA, inferior_pid, ((char *) &u.u_ar0 - (char *) &u), 0))   \
+    (PT_RUAREA, inferior_pid,                                          \
+     (PTRACE_ARG3_TYPE) ((char *) &u.u_ar0 - (char *) &u), 0))         \
    - KERNEL_U_ADDR)
 
 static void
@@ -57,7 +56,8 @@ fetch_inferior_register (regno, regaddr)
       union { int i; short s[2]; } ps_val;
       int regval;
       
-      ps_val.i = (ptrace (PT_RUAREA, inferior_pid, regaddr, 0));
+      ps_val.i = (ptrace (PT_RUAREA, inferior_pid, (PTRACE_ARG3_TYPE) regaddr,
+                         0));
       regval = ps_val.s[0];
       supply_register (regno, &regval);
     }
@@ -69,7 +69,8 @@ fetch_inferior_register (regno, regaddr)
       
       for (i = 0; i < REGISTER_RAW_SIZE (regno); i += sizeof (int))
        {
-         *(int *) &buf[i] = ptrace (PT_RUAREA, inferior_pid, regaddr, 0);
+         *(int *) &buf[i] = ptrace (PT_RUAREA, inferior_pid,
+                                    (PTRACE_ARG3_TYPE) regaddr, 0);
          regaddr += sizeof (int);
        }
       supply_register (regno, buf);
@@ -84,7 +85,7 @@ store_inferior_register_1 (regno, regaddr, value)
      int value;
 {
   errno = 0;
-  ptrace (PT_WUAREA, inferior_pid, regaddr, value);
+  ptrace (PT_WUAREA, inferior_pid, (PTRACE_ARG3_TYPE) regaddr, value);
 #if 0
   /* HP-UX randomly sets errno to non-zero for regno == 25.
      However, the value is correctly written, so ignore errno. */
@@ -109,7 +110,8 @@ store_inferior_register (regno, regaddr)
     {
       union { int i; short s[2]; } ps_val;
       
-      ps_val.i = (ptrace (PT_RUAREA, inferior_pid, regaddr, 0));
+      ps_val.i = (ptrace (PT_RUAREA, inferior_pid, (PTRACE_ARG3_TYPE) regaddr,
+                         0));
       ps_val.s[0] = (read_register (regno));
       store_inferior_register_1 (regno, regaddr, ps_val.i);
     }
@@ -136,7 +138,6 @@ fetch_inferior_registers (regno)
      int regno;
 {
   struct user u;
-  register int regno;
   register unsigned int ar0_offset;
   
   ar0_offset = (INFERIOR_AR0 (u));
@@ -158,6 +159,7 @@ fetch_inferior_registers (regno)
    If REGNO is -1, do this for all registers.
    Otherwise, REGNO specifies which register (so we can save time).  */
 
+void
 store_inferior_registers (regno)
      register int regno;
 {
@@ -195,10 +197,11 @@ store_inferior_registers (regno)
 #endif /* HPUX_VERSION_5 */
 
 void
-fetch_core_registers (core_reg_sect, core_reg_size, which)
+fetch_core_registers (core_reg_sect, core_reg_size, which, reg_addr)
      char *core_reg_sect;
      int core_reg_size;
      int which;
+     unsigned int reg_addr;    /* Unused in this version */
 {
   int val, regno;
   struct user u;
This page took 0.024185 seconds and 4 git commands to generate.