2003-10-18 20:41:22 +02:00
|
|
|
|
/* Native-dependent code for AMD64 BSD's.
|
|
|
|
|
|
2004-02-25 21:59:12 +01:00
|
|
|
|
Copyright 2003, 2004 Free Software Foundation, Inc.
|
2003-10-18 20:41:22 +02:00
|
|
|
|
|
|
|
|
|
This file is part of GDB.
|
|
|
|
|
|
|
|
|
|
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
|
|
|
|
|
(at your option) any later version.
|
|
|
|
|
|
|
|
|
|
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 this program; if not, write to the Free Software
|
|
|
|
|
Foundation, Inc., 59 Temple Place - Suite 330,
|
|
|
|
|
Boston, MA 02111-1307, USA. */
|
|
|
|
|
|
|
|
|
|
#include "defs.h"
|
|
|
|
|
#include "inferior.h"
|
|
|
|
|
#include "regcache.h"
|
2004-09-26 20:42:30 +02:00
|
|
|
|
#include "target.h"
|
2003-10-18 20:41:22 +02:00
|
|
|
|
|
|
|
|
|
/* We include <signal.h> to make sure `struct fxsave64' is defined on
|
|
|
|
|
NetBSD, since NetBSD's <machine/reg.h> needs it. */
|
|
|
|
|
#include "gdb_assert.h"
|
|
|
|
|
#include <signal.h>
|
|
|
|
|
#include <sys/types.h>
|
|
|
|
|
#include <sys/ptrace.h>
|
|
|
|
|
#include <machine/reg.h>
|
|
|
|
|
|
2004-02-25 21:59:12 +01:00
|
|
|
|
#include "amd64-tdep.h"
|
2003-10-18 20:41:22 +02:00
|
|
|
|
#include "amd64-nat.h"
|
2004-09-26 20:42:30 +02:00
|
|
|
|
#include "inf-ptrace.h"
|
2003-10-18 20:41:22 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/* Fetch register REGNUM from the inferior. If REGNUM is -1, do this
|
|
|
|
|
for all registers (including the floating-point registers). */
|
|
|
|
|
|
2004-09-26 20:42:30 +02:00
|
|
|
|
static void
|
|
|
|
|
amd64bsd_fetch_inferior_registers (int regnum)
|
2003-10-18 20:41:22 +02:00
|
|
|
|
{
|
|
|
|
|
if (regnum == -1 || amd64_native_gregset_supplies_p (regnum))
|
|
|
|
|
{
|
|
|
|
|
struct reg regs;
|
|
|
|
|
|
|
|
|
|
if (ptrace (PT_GETREGS, PIDGET (inferior_ptid),
|
* alphabsd-nat.c (fetch_inferior_registers):
(store_inferior_registers): Replace PTRACE_ARG3_TYPE with
PTRACE_TYPE_ARG3.
* amd64bsd-nat.c (fetch_inferior_registers)
(store_inferior_registers): Replace PTRACE_ARG3_TYPE with
PTRACE_TYPE_ARG3.
* armnbsd-nat.c: Update copyright year.
(fetch_register, fetch_regs, fetch_fp_register, fetch_fp_regs)
(store_register, store_regs, store_fp_register, store_fp_regs):
Replace PTRACE_ARG3_TYPE with PTRACE_TYPE_ARG3.
* hppabsd-nat.c (fetch_inferior_registers)
(store_inferior_registers): Replace PTRACE_ARG3_TYPE with
PTRACE_TYPE_ARG3.
* i386bsd-nat.c (fetch_inferior_registers)
(store_inferior_registers, i386bsd_dr_set, i386bsd_dr_get_status):
Replace PTRACE_ARG3_TYPE with PTRACE_TYPE_ARG3.
* m68kbsd-nat.c (fetch_inferior_registers)
(store_inferior_registers): Replace PTRACE_ARG3_TYPE with
PTRACE_TYPE_ARG3.
* m88kbsd-nat.c (fetch_inferior_registers)
(store_inferior_registers): Replace PTRACE_ARG3_TYPE with
PTRACE_TYPE_ARG3.
* mipsnbsd-nat.c: Update copyright year.
(fetch_inferior_registers, store_inferior_registers):
Replace PTRACE_ARG3_TYPE with PTRACE_TYPE_ARG3.
* ns32knbsd-nat.c: Update copyright year.
(fetch_inferior_registers, store_inferior_registers):
Replace PTRACE_ARG3_TYPE with PTRACE_TYPE_ARG3.
* ppcnbsd-nat.c (fetch_inferior_registers):
(store_inferior_registers): Replace PTRACE_ARG3_TYPE with
PTRACE_TYPE_ARG3.
* ppcobsd-nat.c (fetch_inferior_registers):
(store_inferior_registers): Replace PTRACE_ARG3_TYPE with
PTRACE_TYPE_ARG3.
* shnbsd-nat.c: Update copyright year.
(fetch_inferior_registers, store_inferior_registers):
Replace PTRACE_ARG3_TYPE with PTRACE_TYPE_ARG3.
* vaxbsd-nat.c (fetch_inferior_registers)
(store_inferior_registers): Replace PTRACE_ARG3_TYPE with
PTRACE_TYPE_ARG3.
2004-08-15 01:37:04 +02:00
|
|
|
|
(PTRACE_TYPE_ARG3) ®s, 0) == -1)
|
2005-01-05 Baurjan Ismagulov <ibr@ata.cs.hun.edu.tr>
Committed by Andrew Cagney.
* ada-valprint.c, aix-thread.c, alpha-nat.c: I18n markup.
* alphabsd-nat.c, alphanbsd-tdep.c, amd64-linux-nat.c: I18n markup.
* amd64-tdep.c, amd64bsd-nat.c, amd64fbsd-nat.c: I18n markup.
* arch-utils.c, arm-linux-nat.c, arm-tdep.c: I18n markup.
* armnbsd-nat.c, armnbsd-tdep.c, auxv.c, avr-tdep.c: I18n markup.
* aix-thread.c (_initialize_aix_thread): Get rid of the
deprecated_add_show_from_set call.
* alpha-tdep.c (_initialize_alpha_tdep): Ditto.
* arm-tdep.c (_initialize_arm_tdep): Ditto.
* command.h (add_setshow_enum_cmd): Add arguments for returning
new list elements.
* cli/cli-decode.c (add_setshow_enum_cmd): Ditto.
* mips-tdep.c (_initialize_mips_tdep): Modify calls to
add_setshow_enum_cmd.
2005-01-05 16:43:50 +01:00
|
|
|
|
perror_with_name (_("Couldn't get registers"));
|
2003-10-18 20:41:22 +02:00
|
|
|
|
|
|
|
|
|
amd64_supply_native_gregset (current_regcache, ®s, -1);
|
|
|
|
|
if (regnum != -1)
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
2004-04-09 23:16:05 +02:00
|
|
|
|
if (regnum == -1 || !amd64_native_gregset_supplies_p (regnum))
|
2003-10-18 20:41:22 +02:00
|
|
|
|
{
|
|
|
|
|
struct fpreg fpregs;
|
|
|
|
|
|
|
|
|
|
if (ptrace (PT_GETFPREGS, PIDGET (inferior_ptid),
|
* alphabsd-nat.c (fetch_inferior_registers):
(store_inferior_registers): Replace PTRACE_ARG3_TYPE with
PTRACE_TYPE_ARG3.
* amd64bsd-nat.c (fetch_inferior_registers)
(store_inferior_registers): Replace PTRACE_ARG3_TYPE with
PTRACE_TYPE_ARG3.
* armnbsd-nat.c: Update copyright year.
(fetch_register, fetch_regs, fetch_fp_register, fetch_fp_regs)
(store_register, store_regs, store_fp_register, store_fp_regs):
Replace PTRACE_ARG3_TYPE with PTRACE_TYPE_ARG3.
* hppabsd-nat.c (fetch_inferior_registers)
(store_inferior_registers): Replace PTRACE_ARG3_TYPE with
PTRACE_TYPE_ARG3.
* i386bsd-nat.c (fetch_inferior_registers)
(store_inferior_registers, i386bsd_dr_set, i386bsd_dr_get_status):
Replace PTRACE_ARG3_TYPE with PTRACE_TYPE_ARG3.
* m68kbsd-nat.c (fetch_inferior_registers)
(store_inferior_registers): Replace PTRACE_ARG3_TYPE with
PTRACE_TYPE_ARG3.
* m88kbsd-nat.c (fetch_inferior_registers)
(store_inferior_registers): Replace PTRACE_ARG3_TYPE with
PTRACE_TYPE_ARG3.
* mipsnbsd-nat.c: Update copyright year.
(fetch_inferior_registers, store_inferior_registers):
Replace PTRACE_ARG3_TYPE with PTRACE_TYPE_ARG3.
* ns32knbsd-nat.c: Update copyright year.
(fetch_inferior_registers, store_inferior_registers):
Replace PTRACE_ARG3_TYPE with PTRACE_TYPE_ARG3.
* ppcnbsd-nat.c (fetch_inferior_registers):
(store_inferior_registers): Replace PTRACE_ARG3_TYPE with
PTRACE_TYPE_ARG3.
* ppcobsd-nat.c (fetch_inferior_registers):
(store_inferior_registers): Replace PTRACE_ARG3_TYPE with
PTRACE_TYPE_ARG3.
* shnbsd-nat.c: Update copyright year.
(fetch_inferior_registers, store_inferior_registers):
Replace PTRACE_ARG3_TYPE with PTRACE_TYPE_ARG3.
* vaxbsd-nat.c (fetch_inferior_registers)
(store_inferior_registers): Replace PTRACE_ARG3_TYPE with
PTRACE_TYPE_ARG3.
2004-08-15 01:37:04 +02:00
|
|
|
|
(PTRACE_TYPE_ARG3) &fpregs, 0) == -1)
|
2005-01-05 Baurjan Ismagulov <ibr@ata.cs.hun.edu.tr>
Committed by Andrew Cagney.
* ada-valprint.c, aix-thread.c, alpha-nat.c: I18n markup.
* alphabsd-nat.c, alphanbsd-tdep.c, amd64-linux-nat.c: I18n markup.
* amd64-tdep.c, amd64bsd-nat.c, amd64fbsd-nat.c: I18n markup.
* arch-utils.c, arm-linux-nat.c, arm-tdep.c: I18n markup.
* armnbsd-nat.c, armnbsd-tdep.c, auxv.c, avr-tdep.c: I18n markup.
* aix-thread.c (_initialize_aix_thread): Get rid of the
deprecated_add_show_from_set call.
* alpha-tdep.c (_initialize_alpha_tdep): Ditto.
* arm-tdep.c (_initialize_arm_tdep): Ditto.
* command.h (add_setshow_enum_cmd): Add arguments for returning
new list elements.
* cli/cli-decode.c (add_setshow_enum_cmd): Ditto.
* mips-tdep.c (_initialize_mips_tdep): Modify calls to
add_setshow_enum_cmd.
2005-01-05 16:43:50 +01:00
|
|
|
|
perror_with_name (_("Couldn't get floating point status"));
|
2003-10-18 20:41:22 +02:00
|
|
|
|
|
* x86-64-tdep.h: Tewak comment.
(enum amd64_regnum): New.
(X86_64_RAX_REGNUM, X86_64_RDX_REGNUM, X86_64_RDI_REGNUM)
(X86_64_RBP_REGNUM, X86_64_RSP_REGNUM, X86_64_RIP_REGNUM)
(X86_64_EFLAGS_REGNUM, X86_64_ST0_REGNUM, X86_64_XMM0_REGNUM)
(X86_64_XMM1_REGNUM): Removed.
(AMD64_NUM_GREGS): Renamed from X86_64_NUM_GREGS.
(amd64_init_abi, amd64_supply_fxsave, amd64_fill_fxsave): Adjust
prototypes for renamed functions.
* x86-64-tdep.c: Fix typo.
(amd64_dwarf_regmap): Use constants from `enum amd64_regnum' for
register numbers.
(amd64_return_value, amd64_push_arguments, amd64_push_dummy_call):
Use constants from `enum amd64_regnum' for register numbers.
(AMD64_NUM_SAVED_REGS): Adjust for renamed macros.
(amd64_analyze_prologue, amd64_frame_cache,
amd64_sigtramp_frame_cache): Use constants from `enum
amd64_regnum' for register numbers.
(amd64_supply_fpregset): Adjust for renamed functions.
(amd64_init_abi): Rename from x86_64_init_abi. Use constants from
`enum amd64_regnum' for register numbers.
(I387_ST0_REGNUM): Use constant from `enum amd64_regnum'.
(amd64_supply_fxsave): Rename from x86_64_supply_fxsave.
(amd64_fill_fxsave): Rename fro x86_64_fill_fxsave.
* x86-64-linux-tdep.c (amd64_linux_supply_gregset)
(amd64_linux_fill_gregset): Adjust for renamed macros.
(fetch_core_registers): Adjust for renamed functions.
(amd64_linux_init_abi): Adjust for renamed functions.
* x86-64-linux-nat.c (supply_gregset, fill_gregset): Adjust for
renamed functions.
* amd64-nat.c: Adjust for renamed macros.
* amd64bsd-nat.c (fetch_inferior_registers)
(store_inferior_registers): Use constants from `enum amd64_regnum'
for register numbers. Adjust for renamed variables.
* amd64fbsd-nat.c (supply_gregset, fill_gregset): Adjust for
renamed variables.
(_initialize_amd64fbsd_nat): Use constants from `enum
amd64_regnum' for register numbers.
* amd64fbsd-tdep.c (amd64fbsd_sigcontext_addr): Use constants from
`enum amd64_regnum' for register numbers.
(amd64fbsd_init_abi): Adjust for renamed functions.
* amd64nbsd-tdep.c (amd64nbsd_sigcontext_addr): Use constants from
`enum amd64_regnum' for register numbers.
(amd64nbsd_init_abi): Adjust for renamed functions.
(_initialize_amd64nbsd_ndep): Adjust for renamed macros.
* amd64obsd-tdep.c (amd64obsd_sigcontext_addr): Use constants from
`enum amd64_regnum' for register numbers.
(amd64obsd_init_abi): Adjust for renamed functions.
(_initialize_amd64obsd_ndep): Adjust for renamed macros.
2004-02-23 22:37:52 +01:00
|
|
|
|
amd64_supply_fxsave (current_regcache, -1, &fpregs);
|
2003-10-18 20:41:22 +02:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/* Store register REGNUM back into the inferior. If REGNUM is -1, do
|
|
|
|
|
this for all registers (including the floating-point registers). */
|
|
|
|
|
|
2004-09-26 20:42:30 +02:00
|
|
|
|
static void
|
|
|
|
|
amd64bsd_store_inferior_registers (int regnum)
|
2003-10-18 20:41:22 +02:00
|
|
|
|
{
|
|
|
|
|
if (regnum == -1 || amd64_native_gregset_supplies_p (regnum))
|
|
|
|
|
{
|
|
|
|
|
struct reg regs;
|
|
|
|
|
|
|
|
|
|
if (ptrace (PT_GETREGS, PIDGET (inferior_ptid),
|
* alphabsd-nat.c (fetch_inferior_registers):
(store_inferior_registers): Replace PTRACE_ARG3_TYPE with
PTRACE_TYPE_ARG3.
* amd64bsd-nat.c (fetch_inferior_registers)
(store_inferior_registers): Replace PTRACE_ARG3_TYPE with
PTRACE_TYPE_ARG3.
* armnbsd-nat.c: Update copyright year.
(fetch_register, fetch_regs, fetch_fp_register, fetch_fp_regs)
(store_register, store_regs, store_fp_register, store_fp_regs):
Replace PTRACE_ARG3_TYPE with PTRACE_TYPE_ARG3.
* hppabsd-nat.c (fetch_inferior_registers)
(store_inferior_registers): Replace PTRACE_ARG3_TYPE with
PTRACE_TYPE_ARG3.
* i386bsd-nat.c (fetch_inferior_registers)
(store_inferior_registers, i386bsd_dr_set, i386bsd_dr_get_status):
Replace PTRACE_ARG3_TYPE with PTRACE_TYPE_ARG3.
* m68kbsd-nat.c (fetch_inferior_registers)
(store_inferior_registers): Replace PTRACE_ARG3_TYPE with
PTRACE_TYPE_ARG3.
* m88kbsd-nat.c (fetch_inferior_registers)
(store_inferior_registers): Replace PTRACE_ARG3_TYPE with
PTRACE_TYPE_ARG3.
* mipsnbsd-nat.c: Update copyright year.
(fetch_inferior_registers, store_inferior_registers):
Replace PTRACE_ARG3_TYPE with PTRACE_TYPE_ARG3.
* ns32knbsd-nat.c: Update copyright year.
(fetch_inferior_registers, store_inferior_registers):
Replace PTRACE_ARG3_TYPE with PTRACE_TYPE_ARG3.
* ppcnbsd-nat.c (fetch_inferior_registers):
(store_inferior_registers): Replace PTRACE_ARG3_TYPE with
PTRACE_TYPE_ARG3.
* ppcobsd-nat.c (fetch_inferior_registers):
(store_inferior_registers): Replace PTRACE_ARG3_TYPE with
PTRACE_TYPE_ARG3.
* shnbsd-nat.c: Update copyright year.
(fetch_inferior_registers, store_inferior_registers):
Replace PTRACE_ARG3_TYPE with PTRACE_TYPE_ARG3.
* vaxbsd-nat.c (fetch_inferior_registers)
(store_inferior_registers): Replace PTRACE_ARG3_TYPE with
PTRACE_TYPE_ARG3.
2004-08-15 01:37:04 +02:00
|
|
|
|
(PTRACE_TYPE_ARG3) ®s, 0) == -1)
|
2005-01-05 Baurjan Ismagulov <ibr@ata.cs.hun.edu.tr>
Committed by Andrew Cagney.
* ada-valprint.c, aix-thread.c, alpha-nat.c: I18n markup.
* alphabsd-nat.c, alphanbsd-tdep.c, amd64-linux-nat.c: I18n markup.
* amd64-tdep.c, amd64bsd-nat.c, amd64fbsd-nat.c: I18n markup.
* arch-utils.c, arm-linux-nat.c, arm-tdep.c: I18n markup.
* armnbsd-nat.c, armnbsd-tdep.c, auxv.c, avr-tdep.c: I18n markup.
* aix-thread.c (_initialize_aix_thread): Get rid of the
deprecated_add_show_from_set call.
* alpha-tdep.c (_initialize_alpha_tdep): Ditto.
* arm-tdep.c (_initialize_arm_tdep): Ditto.
* command.h (add_setshow_enum_cmd): Add arguments for returning
new list elements.
* cli/cli-decode.c (add_setshow_enum_cmd): Ditto.
* mips-tdep.c (_initialize_mips_tdep): Modify calls to
add_setshow_enum_cmd.
2005-01-05 16:43:50 +01:00
|
|
|
|
perror_with_name (_("Couldn't get registers"));
|
2003-10-18 20:41:22 +02:00
|
|
|
|
|
|
|
|
|
amd64_collect_native_gregset (current_regcache, ®s, regnum);
|
|
|
|
|
|
|
|
|
|
if (ptrace (PT_SETREGS, PIDGET (inferior_ptid),
|
* alphabsd-nat.c (fetch_inferior_registers):
(store_inferior_registers): Replace PTRACE_ARG3_TYPE with
PTRACE_TYPE_ARG3.
* amd64bsd-nat.c (fetch_inferior_registers)
(store_inferior_registers): Replace PTRACE_ARG3_TYPE with
PTRACE_TYPE_ARG3.
* armnbsd-nat.c: Update copyright year.
(fetch_register, fetch_regs, fetch_fp_register, fetch_fp_regs)
(store_register, store_regs, store_fp_register, store_fp_regs):
Replace PTRACE_ARG3_TYPE with PTRACE_TYPE_ARG3.
* hppabsd-nat.c (fetch_inferior_registers)
(store_inferior_registers): Replace PTRACE_ARG3_TYPE with
PTRACE_TYPE_ARG3.
* i386bsd-nat.c (fetch_inferior_registers)
(store_inferior_registers, i386bsd_dr_set, i386bsd_dr_get_status):
Replace PTRACE_ARG3_TYPE with PTRACE_TYPE_ARG3.
* m68kbsd-nat.c (fetch_inferior_registers)
(store_inferior_registers): Replace PTRACE_ARG3_TYPE with
PTRACE_TYPE_ARG3.
* m88kbsd-nat.c (fetch_inferior_registers)
(store_inferior_registers): Replace PTRACE_ARG3_TYPE with
PTRACE_TYPE_ARG3.
* mipsnbsd-nat.c: Update copyright year.
(fetch_inferior_registers, store_inferior_registers):
Replace PTRACE_ARG3_TYPE with PTRACE_TYPE_ARG3.
* ns32knbsd-nat.c: Update copyright year.
(fetch_inferior_registers, store_inferior_registers):
Replace PTRACE_ARG3_TYPE with PTRACE_TYPE_ARG3.
* ppcnbsd-nat.c (fetch_inferior_registers):
(store_inferior_registers): Replace PTRACE_ARG3_TYPE with
PTRACE_TYPE_ARG3.
* ppcobsd-nat.c (fetch_inferior_registers):
(store_inferior_registers): Replace PTRACE_ARG3_TYPE with
PTRACE_TYPE_ARG3.
* shnbsd-nat.c: Update copyright year.
(fetch_inferior_registers, store_inferior_registers):
Replace PTRACE_ARG3_TYPE with PTRACE_TYPE_ARG3.
* vaxbsd-nat.c (fetch_inferior_registers)
(store_inferior_registers): Replace PTRACE_ARG3_TYPE with
PTRACE_TYPE_ARG3.
2004-08-15 01:37:04 +02:00
|
|
|
|
(PTRACE_TYPE_ARG3) ®s, 0) == -1)
|
2005-01-05 Baurjan Ismagulov <ibr@ata.cs.hun.edu.tr>
Committed by Andrew Cagney.
* ada-valprint.c, aix-thread.c, alpha-nat.c: I18n markup.
* alphabsd-nat.c, alphanbsd-tdep.c, amd64-linux-nat.c: I18n markup.
* amd64-tdep.c, amd64bsd-nat.c, amd64fbsd-nat.c: I18n markup.
* arch-utils.c, arm-linux-nat.c, arm-tdep.c: I18n markup.
* armnbsd-nat.c, armnbsd-tdep.c, auxv.c, avr-tdep.c: I18n markup.
* aix-thread.c (_initialize_aix_thread): Get rid of the
deprecated_add_show_from_set call.
* alpha-tdep.c (_initialize_alpha_tdep): Ditto.
* arm-tdep.c (_initialize_arm_tdep): Ditto.
* command.h (add_setshow_enum_cmd): Add arguments for returning
new list elements.
* cli/cli-decode.c (add_setshow_enum_cmd): Ditto.
* mips-tdep.c (_initialize_mips_tdep): Modify calls to
add_setshow_enum_cmd.
2005-01-05 16:43:50 +01:00
|
|
|
|
perror_with_name (_("Couldn't write registers"));
|
2003-10-18 20:41:22 +02:00
|
|
|
|
|
|
|
|
|
if (regnum != -1)
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
2004-04-09 23:16:05 +02:00
|
|
|
|
if (regnum == -1 || !amd64_native_gregset_supplies_p (regnum))
|
2003-10-18 20:41:22 +02:00
|
|
|
|
{
|
|
|
|
|
struct fpreg fpregs;
|
|
|
|
|
|
|
|
|
|
if (ptrace (PT_GETFPREGS, PIDGET (inferior_ptid),
|
* alphabsd-nat.c (fetch_inferior_registers):
(store_inferior_registers): Replace PTRACE_ARG3_TYPE with
PTRACE_TYPE_ARG3.
* amd64bsd-nat.c (fetch_inferior_registers)
(store_inferior_registers): Replace PTRACE_ARG3_TYPE with
PTRACE_TYPE_ARG3.
* armnbsd-nat.c: Update copyright year.
(fetch_register, fetch_regs, fetch_fp_register, fetch_fp_regs)
(store_register, store_regs, store_fp_register, store_fp_regs):
Replace PTRACE_ARG3_TYPE with PTRACE_TYPE_ARG3.
* hppabsd-nat.c (fetch_inferior_registers)
(store_inferior_registers): Replace PTRACE_ARG3_TYPE with
PTRACE_TYPE_ARG3.
* i386bsd-nat.c (fetch_inferior_registers)
(store_inferior_registers, i386bsd_dr_set, i386bsd_dr_get_status):
Replace PTRACE_ARG3_TYPE with PTRACE_TYPE_ARG3.
* m68kbsd-nat.c (fetch_inferior_registers)
(store_inferior_registers): Replace PTRACE_ARG3_TYPE with
PTRACE_TYPE_ARG3.
* m88kbsd-nat.c (fetch_inferior_registers)
(store_inferior_registers): Replace PTRACE_ARG3_TYPE with
PTRACE_TYPE_ARG3.
* mipsnbsd-nat.c: Update copyright year.
(fetch_inferior_registers, store_inferior_registers):
Replace PTRACE_ARG3_TYPE with PTRACE_TYPE_ARG3.
* ns32knbsd-nat.c: Update copyright year.
(fetch_inferior_registers, store_inferior_registers):
Replace PTRACE_ARG3_TYPE with PTRACE_TYPE_ARG3.
* ppcnbsd-nat.c (fetch_inferior_registers):
(store_inferior_registers): Replace PTRACE_ARG3_TYPE with
PTRACE_TYPE_ARG3.
* ppcobsd-nat.c (fetch_inferior_registers):
(store_inferior_registers): Replace PTRACE_ARG3_TYPE with
PTRACE_TYPE_ARG3.
* shnbsd-nat.c: Update copyright year.
(fetch_inferior_registers, store_inferior_registers):
Replace PTRACE_ARG3_TYPE with PTRACE_TYPE_ARG3.
* vaxbsd-nat.c (fetch_inferior_registers)
(store_inferior_registers): Replace PTRACE_ARG3_TYPE with
PTRACE_TYPE_ARG3.
2004-08-15 01:37:04 +02:00
|
|
|
|
(PTRACE_TYPE_ARG3) &fpregs, 0) == -1)
|
2005-01-05 Baurjan Ismagulov <ibr@ata.cs.hun.edu.tr>
Committed by Andrew Cagney.
* ada-valprint.c, aix-thread.c, alpha-nat.c: I18n markup.
* alphabsd-nat.c, alphanbsd-tdep.c, amd64-linux-nat.c: I18n markup.
* amd64-tdep.c, amd64bsd-nat.c, amd64fbsd-nat.c: I18n markup.
* arch-utils.c, arm-linux-nat.c, arm-tdep.c: I18n markup.
* armnbsd-nat.c, armnbsd-tdep.c, auxv.c, avr-tdep.c: I18n markup.
* aix-thread.c (_initialize_aix_thread): Get rid of the
deprecated_add_show_from_set call.
* alpha-tdep.c (_initialize_alpha_tdep): Ditto.
* arm-tdep.c (_initialize_arm_tdep): Ditto.
* command.h (add_setshow_enum_cmd): Add arguments for returning
new list elements.
* cli/cli-decode.c (add_setshow_enum_cmd): Ditto.
* mips-tdep.c (_initialize_mips_tdep): Modify calls to
add_setshow_enum_cmd.
2005-01-05 16:43:50 +01:00
|
|
|
|
perror_with_name (_("Couldn't get floating point status"));
|
2003-10-18 20:41:22 +02:00
|
|
|
|
|
2004-03-04 11:35:57 +01:00
|
|
|
|
amd64_collect_fxsave (current_regcache, regnum, &fpregs);
|
2003-10-18 20:41:22 +02:00
|
|
|
|
|
|
|
|
|
if (ptrace (PT_SETFPREGS, PIDGET (inferior_ptid),
|
* alphabsd-nat.c (fetch_inferior_registers):
(store_inferior_registers): Replace PTRACE_ARG3_TYPE with
PTRACE_TYPE_ARG3.
* amd64bsd-nat.c (fetch_inferior_registers)
(store_inferior_registers): Replace PTRACE_ARG3_TYPE with
PTRACE_TYPE_ARG3.
* armnbsd-nat.c: Update copyright year.
(fetch_register, fetch_regs, fetch_fp_register, fetch_fp_regs)
(store_register, store_regs, store_fp_register, store_fp_regs):
Replace PTRACE_ARG3_TYPE with PTRACE_TYPE_ARG3.
* hppabsd-nat.c (fetch_inferior_registers)
(store_inferior_registers): Replace PTRACE_ARG3_TYPE with
PTRACE_TYPE_ARG3.
* i386bsd-nat.c (fetch_inferior_registers)
(store_inferior_registers, i386bsd_dr_set, i386bsd_dr_get_status):
Replace PTRACE_ARG3_TYPE with PTRACE_TYPE_ARG3.
* m68kbsd-nat.c (fetch_inferior_registers)
(store_inferior_registers): Replace PTRACE_ARG3_TYPE with
PTRACE_TYPE_ARG3.
* m88kbsd-nat.c (fetch_inferior_registers)
(store_inferior_registers): Replace PTRACE_ARG3_TYPE with
PTRACE_TYPE_ARG3.
* mipsnbsd-nat.c: Update copyright year.
(fetch_inferior_registers, store_inferior_registers):
Replace PTRACE_ARG3_TYPE with PTRACE_TYPE_ARG3.
* ns32knbsd-nat.c: Update copyright year.
(fetch_inferior_registers, store_inferior_registers):
Replace PTRACE_ARG3_TYPE with PTRACE_TYPE_ARG3.
* ppcnbsd-nat.c (fetch_inferior_registers):
(store_inferior_registers): Replace PTRACE_ARG3_TYPE with
PTRACE_TYPE_ARG3.
* ppcobsd-nat.c (fetch_inferior_registers):
(store_inferior_registers): Replace PTRACE_ARG3_TYPE with
PTRACE_TYPE_ARG3.
* shnbsd-nat.c: Update copyright year.
(fetch_inferior_registers, store_inferior_registers):
Replace PTRACE_ARG3_TYPE with PTRACE_TYPE_ARG3.
* vaxbsd-nat.c (fetch_inferior_registers)
(store_inferior_registers): Replace PTRACE_ARG3_TYPE with
PTRACE_TYPE_ARG3.
2004-08-15 01:37:04 +02:00
|
|
|
|
(PTRACE_TYPE_ARG3) &fpregs, 0) == -1)
|
2005-01-05 Baurjan Ismagulov <ibr@ata.cs.hun.edu.tr>
Committed by Andrew Cagney.
* ada-valprint.c, aix-thread.c, alpha-nat.c: I18n markup.
* alphabsd-nat.c, alphanbsd-tdep.c, amd64-linux-nat.c: I18n markup.
* amd64-tdep.c, amd64bsd-nat.c, amd64fbsd-nat.c: I18n markup.
* arch-utils.c, arm-linux-nat.c, arm-tdep.c: I18n markup.
* armnbsd-nat.c, armnbsd-tdep.c, auxv.c, avr-tdep.c: I18n markup.
* aix-thread.c (_initialize_aix_thread): Get rid of the
deprecated_add_show_from_set call.
* alpha-tdep.c (_initialize_alpha_tdep): Ditto.
* arm-tdep.c (_initialize_arm_tdep): Ditto.
* command.h (add_setshow_enum_cmd): Add arguments for returning
new list elements.
* cli/cli-decode.c (add_setshow_enum_cmd): Ditto.
* mips-tdep.c (_initialize_mips_tdep): Modify calls to
add_setshow_enum_cmd.
2005-01-05 16:43:50 +01:00
|
|
|
|
perror_with_name (_("Couldn't write floating point status"));
|
2003-10-18 20:41:22 +02:00
|
|
|
|
}
|
|
|
|
|
}
|
2004-09-26 20:42:30 +02:00
|
|
|
|
|
|
|
|
|
/* Create a prototype *BSD/amd64 target. The client can override it
|
|
|
|
|
with local methods. */
|
|
|
|
|
|
|
|
|
|
struct target_ops *
|
|
|
|
|
amd64bsd_target (void)
|
|
|
|
|
{
|
|
|
|
|
struct target_ops *t;
|
|
|
|
|
|
|
|
|
|
t = inf_ptrace_target ();
|
|
|
|
|
t->to_fetch_registers = amd64bsd_fetch_inferior_registers;
|
|
|
|
|
t->to_store_registers = amd64bsd_store_inferior_registers;
|
|
|
|
|
return t;
|
|
|
|
|
}
|