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"
#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
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, ®val);
}
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);
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. */
{
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);
}
int regno;
{
struct user u;
- register int regno;
register unsigned int ar0_offset;
ar0_offset = (INFERIOR_AR0 (u));
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;
{
#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;