2004-06-26 12:06:35 +02:00
|
|
|
|
/* Native-dependent code for HP PA-RISC BSD's.
|
|
|
|
|
|
2014-01-01 04:54:24 +01:00
|
|
|
|
Copyright (C) 2004-2014 Free Software Foundation, Inc.
|
2004-06-26 12:06:35 +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
|
2007-08-23 20:08:50 +02:00
|
|
|
|
the Free Software Foundation; either version 3 of the License, or
|
2004-06-26 12:06:35 +02:00
|
|
|
|
(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
|
2007-08-23 20:08:50 +02:00
|
|
|
|
along with this program. If not, see <http://www.gnu.org/licenses/>. */
|
2004-06-26 12:06:35 +02:00
|
|
|
|
|
|
|
|
|
#include "defs.h"
|
|
|
|
|
#include "inferior.h"
|
|
|
|
|
#include "regcache.h"
|
2005-04-18 00:20:20 +02:00
|
|
|
|
#include "target.h"
|
2004-06-26 12:06:35 +02:00
|
|
|
|
|
|
|
|
|
#include <sys/types.h>
|
|
|
|
|
#include <sys/ptrace.h>
|
|
|
|
|
#include <machine/reg.h>
|
|
|
|
|
|
|
|
|
|
#include "hppa-tdep.h"
|
2005-04-18 00:20:20 +02:00
|
|
|
|
#include "inf-ptrace.h"
|
2004-06-26 12:06:35 +02:00
|
|
|
|
|
|
|
|
|
static int
|
|
|
|
|
hppabsd_gregset_supplies_p (int regnum)
|
|
|
|
|
{
|
2013-07-25 14:10:44 +02:00
|
|
|
|
return (regnum >= HPPA_R0_REGNUM && regnum <= HPPA_CR27_REGNUM);
|
2004-06-26 12:06:35 +02:00
|
|
|
|
}
|
|
|
|
|
|
* hppa-tdep.h (enum hppa_regnum): Add HPPA_FP31R_REGNUM.
* hppabsd-nat.c (hppabsd_fpregset_supplies_p)
(hppabsd_supply_fpregset, hppabsd_collect_fpregset): New
functions.
(hppabsd_fetch_registers, hppabsd_store_registers): Handle
floating-point registers.
print_scalar_formatted (valaddr, type, format, 0, stream);
val_print_type_code_flags (type, valaddr, stream);
print_scalar_formatted (valaddr + embedded_offset, type, format, 0, stream);
val_print_type_code_flags (type, valaddr + embedded_offset, stream);
for (reg = 16; reg < 31; reg++)
/* We may have to apply a StackGhost cookie. */
fs->regs.reg[31].how = DWARF2_FRAME_REG_SAVED_WCOOKIE;
fs->regs.reg[31].loc.offset = 15 * size;
int regnum;
buf, 0, size);
{
ULONGEST wcookie = extract_unsigned_integer (buf, len);
gdb_assert (len == size);
*lvalp = not_lval;
*addrp = 0;
if (valuep)
{
ULONGEST value = extract_unsigned_integer (valuep, size);
store_unsigned_integer (valuep, size, value ^ wcookie);
}
}
apply StackGhost cookie. */
print_scalar_formatted (valaddr, type, format, 0, stream);
val_print_type_code_flags (type, valaddr, stream);
|| (TYPE_CODE (t) == TYPE_CODE_FLAGS)
case TYPE_CODE_FLAGS:
case TYPE_CODE_FLAGS:
void *fpregs, int regnum)
{
regcache_raw_collect (regcache, i, regs);
regcache_raw_collect (regcache, i + 1, regs + 4);
}
(PTRACE_TYPE_ARG3) &fpregs, 0) == -1)
perror_with_name (_("Couldn't get floating point status"));
(PTRACE_TYPE_ARG3) &fpregs, 0) == -1)
perror_with_name (_("Couldn't get floating point status"));
(PTRACE_TYPE_ARG3) &fpregs, 0) == -1)
perror_with_name (_("Couldn't write floating point status"));
print_scalar_formatted (valaddr + embedded_offset, type, format, 0, stream);
val_print_type_code_flags (type, valaddr + embedded_offset, stream);
|| regnum == PC_REGNUM);
|| regnum == tdep->ppc_fpscr_regnum);
regnum, ®s, sizeof regs);
regnum, &fpregs, sizeof fpregs);
regnum, ®s, sizeof regs);
regnum, &fpregs, sizeof fpregs);
const char *sect_name, size_t sect_size)
struct regcache *regcache, gdb_byte *readbuf,
const gdb_byte *writebuf)
if (lr_reg == -1)
{
/* bcl 20,xx,.+4 is used to get the current PC, with or without
prediction bits. If the LR has already been saved, we can
skip it. */
continue;
}
extract_unsigned_integer ((gdb_byte *)&(MEMBER), sizeof (MEMBER))
builtin_type_void_data_ptr);
lmo->r_version_size);
builtin_type_void_data_ptr);
lm = ldsomap = solib_svr4_r_ldsomap ();
|| (X_I (insn) == 1 && X_RS1 (insn) == 0 && (insn & 0x7f) == 0))
{
/* OpenBSD system call. */
ULONGEST number;
regcache_cooked_read_unsigned (current_regcache,
SPARC_G1_REGNUM, &number);
if (number & 0x400)
return sparc_address_from_register (SPARC_G2_REGNUM);
if (number & 0x800)
return sparc_address_from_register (SPARC_G7_REGNUM);
}
gdb_byte *buffer;
gdb_byte *check = xmalloc (len);
(unsigned int *)cache_ovly_table, cache_novlys * 4);
cache_ovly_table[i], 4);
error (_(""%s" exists in this program but is not a function."),
name);
return value_of_variable (sym, NULL);
struct ui_file *stream)
{
if (TYPE_FIELD_NAME (type, bitpos))
fprintf_filtered (stream, "%s ", TYPE_FIELD_NAME (type, bitpos));
else
fprintf_filtered (stream, "#%d ", bitpos);
}
const gdb_byte *valaddr,
struct ui_file *stream);
i386-sol2-tdep.o sol2-tdep.o corelow.o solib.o solib-svr4.o
sol2-tdep.o solib.o solib-svr4.o
2006-01-14 13:24:36 +01:00
|
|
|
|
static int
|
|
|
|
|
hppabsd_fpregset_supplies_p (int regnum)
|
|
|
|
|
{
|
|
|
|
|
return (regnum >= HPPA_FP0_REGNUM && regnum <= HPPA_FP31R_REGNUM);
|
|
|
|
|
}
|
|
|
|
|
|
2004-06-26 12:06:35 +02:00
|
|
|
|
/* Supply the general-purpose registers stored in GREGS to REGCACHE. */
|
|
|
|
|
|
|
|
|
|
static void
|
|
|
|
|
hppabsd_supply_gregset (struct regcache *regcache, const void *gregs)
|
|
|
|
|
{
|
2013-07-25 14:10:44 +02:00
|
|
|
|
gdb_byte zero[4] = { 0 };
|
2004-06-26 12:06:35 +02:00
|
|
|
|
const char *regs = gregs;
|
|
|
|
|
int regnum;
|
|
|
|
|
|
2013-07-25 14:10:44 +02:00
|
|
|
|
regcache_raw_supply (regcache, HPPA_R0_REGNUM, &zero);
|
2004-06-26 12:06:35 +02:00
|
|
|
|
for (regnum = HPPA_R1_REGNUM; regnum <= HPPA_R31_REGNUM; regnum++)
|
|
|
|
|
regcache_raw_supply (regcache, regnum, regs + regnum * 4);
|
|
|
|
|
|
2013-07-25 14:10:44 +02:00
|
|
|
|
if (sizeof(struct reg) >= 46 * 4)
|
|
|
|
|
{
|
|
|
|
|
regcache_raw_supply (regcache, HPPA_IPSW_REGNUM, regs);
|
|
|
|
|
regcache_raw_supply (regcache, HPPA_SAR_REGNUM, regs + 32 * 4);
|
|
|
|
|
regcache_raw_supply (regcache, HPPA_PCSQ_HEAD_REGNUM, regs + 33 * 4);
|
|
|
|
|
regcache_raw_supply (regcache, HPPA_PCSQ_TAIL_REGNUM, regs + 34 * 4);
|
|
|
|
|
regcache_raw_supply (regcache, HPPA_PCOQ_HEAD_REGNUM, regs + 35 * 4);
|
|
|
|
|
regcache_raw_supply (regcache, HPPA_PCOQ_TAIL_REGNUM, regs + 36 * 4);
|
|
|
|
|
regcache_raw_supply (regcache, HPPA_SR0_REGNUM, regs + 37 * 4);
|
|
|
|
|
regcache_raw_supply (regcache, HPPA_SR1_REGNUM, regs + 38 * 4);
|
|
|
|
|
regcache_raw_supply (regcache, HPPA_SR2_REGNUM, regs + 39 * 4);
|
|
|
|
|
regcache_raw_supply (regcache, HPPA_SR3_REGNUM, regs + 40 * 4);
|
|
|
|
|
regcache_raw_supply (regcache, HPPA_SR4_REGNUM, regs + 41 * 4);
|
|
|
|
|
regcache_raw_supply (regcache, HPPA_SR5_REGNUM, regs + 42 * 4);
|
|
|
|
|
regcache_raw_supply (regcache, HPPA_SR6_REGNUM, regs + 43 * 4);
|
|
|
|
|
regcache_raw_supply (regcache, HPPA_SR7_REGNUM, regs + 44 * 4);
|
|
|
|
|
regcache_raw_supply (regcache, HPPA_CR26_REGNUM, regs + 45 * 4);
|
|
|
|
|
regcache_raw_supply (regcache, HPPA_CR27_REGNUM, regs + 46 * 4);
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
regcache_raw_supply (regcache, HPPA_SAR_REGNUM, regs);
|
|
|
|
|
regcache_raw_supply (regcache, HPPA_PCOQ_HEAD_REGNUM, regs + 32 * 4);
|
|
|
|
|
regcache_raw_supply (regcache, HPPA_PCOQ_TAIL_REGNUM, regs + 33 * 4);
|
|
|
|
|
}
|
2004-06-26 12:06:35 +02:00
|
|
|
|
}
|
|
|
|
|
|
* hppa-tdep.h (enum hppa_regnum): Add HPPA_FP31R_REGNUM.
* hppabsd-nat.c (hppabsd_fpregset_supplies_p)
(hppabsd_supply_fpregset, hppabsd_collect_fpregset): New
functions.
(hppabsd_fetch_registers, hppabsd_store_registers): Handle
floating-point registers.
print_scalar_formatted (valaddr, type, format, 0, stream);
val_print_type_code_flags (type, valaddr, stream);
print_scalar_formatted (valaddr + embedded_offset, type, format, 0, stream);
val_print_type_code_flags (type, valaddr + embedded_offset, stream);
for (reg = 16; reg < 31; reg++)
/* We may have to apply a StackGhost cookie. */
fs->regs.reg[31].how = DWARF2_FRAME_REG_SAVED_WCOOKIE;
fs->regs.reg[31].loc.offset = 15 * size;
int regnum;
buf, 0, size);
{
ULONGEST wcookie = extract_unsigned_integer (buf, len);
gdb_assert (len == size);
*lvalp = not_lval;
*addrp = 0;
if (valuep)
{
ULONGEST value = extract_unsigned_integer (valuep, size);
store_unsigned_integer (valuep, size, value ^ wcookie);
}
}
apply StackGhost cookie. */
print_scalar_formatted (valaddr, type, format, 0, stream);
val_print_type_code_flags (type, valaddr, stream);
|| (TYPE_CODE (t) == TYPE_CODE_FLAGS)
case TYPE_CODE_FLAGS:
case TYPE_CODE_FLAGS:
void *fpregs, int regnum)
{
regcache_raw_collect (regcache, i, regs);
regcache_raw_collect (regcache, i + 1, regs + 4);
}
(PTRACE_TYPE_ARG3) &fpregs, 0) == -1)
perror_with_name (_("Couldn't get floating point status"));
(PTRACE_TYPE_ARG3) &fpregs, 0) == -1)
perror_with_name (_("Couldn't get floating point status"));
(PTRACE_TYPE_ARG3) &fpregs, 0) == -1)
perror_with_name (_("Couldn't write floating point status"));
print_scalar_formatted (valaddr + embedded_offset, type, format, 0, stream);
val_print_type_code_flags (type, valaddr + embedded_offset, stream);
|| regnum == PC_REGNUM);
|| regnum == tdep->ppc_fpscr_regnum);
regnum, ®s, sizeof regs);
regnum, &fpregs, sizeof fpregs);
regnum, ®s, sizeof regs);
regnum, &fpregs, sizeof fpregs);
const char *sect_name, size_t sect_size)
struct regcache *regcache, gdb_byte *readbuf,
const gdb_byte *writebuf)
if (lr_reg == -1)
{
/* bcl 20,xx,.+4 is used to get the current PC, with or without
prediction bits. If the LR has already been saved, we can
skip it. */
continue;
}
extract_unsigned_integer ((gdb_byte *)&(MEMBER), sizeof (MEMBER))
builtin_type_void_data_ptr);
lmo->r_version_size);
builtin_type_void_data_ptr);
lm = ldsomap = solib_svr4_r_ldsomap ();
|| (X_I (insn) == 1 && X_RS1 (insn) == 0 && (insn & 0x7f) == 0))
{
/* OpenBSD system call. */
ULONGEST number;
regcache_cooked_read_unsigned (current_regcache,
SPARC_G1_REGNUM, &number);
if (number & 0x400)
return sparc_address_from_register (SPARC_G2_REGNUM);
if (number & 0x800)
return sparc_address_from_register (SPARC_G7_REGNUM);
}
gdb_byte *buffer;
gdb_byte *check = xmalloc (len);
(unsigned int *)cache_ovly_table, cache_novlys * 4);
cache_ovly_table[i], 4);
error (_(""%s" exists in this program but is not a function."),
name);
return value_of_variable (sym, NULL);
struct ui_file *stream)
{
if (TYPE_FIELD_NAME (type, bitpos))
fprintf_filtered (stream, "%s ", TYPE_FIELD_NAME (type, bitpos));
else
fprintf_filtered (stream, "#%d ", bitpos);
}
const gdb_byte *valaddr,
struct ui_file *stream);
i386-sol2-tdep.o sol2-tdep.o corelow.o solib.o solib-svr4.o
sol2-tdep.o solib.o solib-svr4.o
2006-01-14 13:24:36 +01:00
|
|
|
|
/* Supply the floating-point registers stored in FPREGS to REGCACHE. */
|
|
|
|
|
|
|
|
|
|
static void
|
|
|
|
|
hppabsd_supply_fpregset (struct regcache *regcache, const void *fpregs)
|
|
|
|
|
{
|
|
|
|
|
const char *regs = fpregs;
|
|
|
|
|
int regnum;
|
|
|
|
|
|
|
|
|
|
for (regnum = HPPA_FP0_REGNUM; regnum <= HPPA_FP31R_REGNUM;
|
|
|
|
|
regnum += 2, regs += 8)
|
|
|
|
|
{
|
|
|
|
|
regcache_raw_supply (regcache, regnum, regs);
|
|
|
|
|
regcache_raw_supply (regcache, regnum + 1, regs + 4);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2004-06-26 12:06:35 +02:00
|
|
|
|
/* Collect the general-purpose registers from REGCACHE and store them
|
|
|
|
|
in GREGS. */
|
|
|
|
|
|
|
|
|
|
static void
|
|
|
|
|
hppabsd_collect_gregset (const struct regcache *regcache,
|
|
|
|
|
void *gregs, int regnum)
|
|
|
|
|
{
|
|
|
|
|
char *regs = gregs;
|
|
|
|
|
int i;
|
|
|
|
|
|
|
|
|
|
for (i = HPPA_R1_REGNUM; i <= HPPA_R31_REGNUM; i++)
|
|
|
|
|
{
|
|
|
|
|
if (regnum == -1 || regnum == i)
|
|
|
|
|
regcache_raw_collect (regcache, i, regs + i * 4);
|
|
|
|
|
}
|
|
|
|
|
|
2013-07-25 14:10:44 +02:00
|
|
|
|
if (sizeof(struct reg) >= 46 * 4)
|
|
|
|
|
{
|
|
|
|
|
if (regnum == -1 || regnum == HPPA_IPSW_REGNUM)
|
|
|
|
|
regcache_raw_collect (regcache, HPPA_IPSW_REGNUM, regs);
|
|
|
|
|
if (regnum == -1 || regnum == HPPA_SAR_REGNUM)
|
|
|
|
|
regcache_raw_collect (regcache, HPPA_SAR_REGNUM, regs + 32 * 4);
|
|
|
|
|
if (regnum == -1 || regnum == HPPA_PCSQ_HEAD_REGNUM)
|
|
|
|
|
regcache_raw_collect (regcache, HPPA_PCSQ_HEAD_REGNUM, regs + 33 * 4);
|
|
|
|
|
if (regnum == -1 || regnum == HPPA_PCSQ_TAIL_REGNUM)
|
|
|
|
|
regcache_raw_collect (regcache, HPPA_PCSQ_TAIL_REGNUM, regs + 34 * 4);
|
|
|
|
|
if (regnum == -1 || regnum == HPPA_PCOQ_HEAD_REGNUM)
|
|
|
|
|
regcache_raw_collect (regcache, HPPA_PCOQ_HEAD_REGNUM, regs + 35 * 4);
|
|
|
|
|
if (regnum == -1 || regnum == HPPA_PCOQ_TAIL_REGNUM)
|
|
|
|
|
regcache_raw_collect (regcache, HPPA_PCOQ_TAIL_REGNUM, regs + 36 * 4);
|
|
|
|
|
if (regnum == -1 || regnum == HPPA_SR0_REGNUM)
|
|
|
|
|
regcache_raw_collect (regcache, HPPA_SR0_REGNUM, regs + 37 * 4);
|
|
|
|
|
if (regnum == -1 || regnum == HPPA_SR1_REGNUM)
|
|
|
|
|
regcache_raw_collect (regcache, HPPA_SR1_REGNUM, regs + 38 * 4);
|
|
|
|
|
if (regnum == -1 || regnum == HPPA_SR2_REGNUM)
|
|
|
|
|
regcache_raw_collect (regcache, HPPA_SR2_REGNUM, regs + 39 * 4);
|
|
|
|
|
if (regnum == -1 || regnum == HPPA_SR3_REGNUM)
|
|
|
|
|
regcache_raw_collect (regcache, HPPA_SR3_REGNUM, regs + 40 * 4);
|
|
|
|
|
if (regnum == -1 || regnum == HPPA_SR4_REGNUM)
|
|
|
|
|
regcache_raw_collect (regcache, HPPA_SR4_REGNUM, regs + 41 * 4);
|
|
|
|
|
if (regnum == -1 || regnum == HPPA_SR5_REGNUM)
|
|
|
|
|
regcache_raw_collect (regcache, HPPA_SR5_REGNUM, regs + 42 * 4);
|
|
|
|
|
if (regnum == -1 || regnum == HPPA_SR6_REGNUM)
|
|
|
|
|
regcache_raw_collect (regcache, HPPA_SR6_REGNUM, regs + 43 * 4);
|
|
|
|
|
if (regnum == -1 || regnum == HPPA_SR7_REGNUM)
|
|
|
|
|
regcache_raw_collect (regcache, HPPA_SR7_REGNUM, regs + 44 * 4);
|
|
|
|
|
if (regnum == -1 || regnum == HPPA_CR26_REGNUM)
|
|
|
|
|
regcache_raw_collect (regcache, HPPA_CR26_REGNUM, regs + 45 * 4);
|
|
|
|
|
if (regnum == -1 || regnum == HPPA_CR27_REGNUM)
|
|
|
|
|
regcache_raw_collect (regcache, HPPA_CR27_REGNUM, regs + 46 * 4);
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
if (regnum == -1 || regnum == HPPA_SAR_REGNUM)
|
|
|
|
|
regcache_raw_collect (regcache, HPPA_SAR_REGNUM, regs);
|
|
|
|
|
if (regnum == -1 || regnum == HPPA_PCOQ_HEAD_REGNUM)
|
|
|
|
|
regcache_raw_collect (regcache, HPPA_PCOQ_HEAD_REGNUM, regs + 32 * 4);
|
|
|
|
|
if (regnum == -1 || regnum == HPPA_PCOQ_TAIL_REGNUM)
|
|
|
|
|
regcache_raw_collect (regcache, HPPA_PCOQ_TAIL_REGNUM, regs + 33 * 4);
|
|
|
|
|
}
|
2004-06-26 12:06:35 +02:00
|
|
|
|
}
|
* hppa-tdep.h (enum hppa_regnum): Add HPPA_FP31R_REGNUM.
* hppabsd-nat.c (hppabsd_fpregset_supplies_p)
(hppabsd_supply_fpregset, hppabsd_collect_fpregset): New
functions.
(hppabsd_fetch_registers, hppabsd_store_registers): Handle
floating-point registers.
print_scalar_formatted (valaddr, type, format, 0, stream);
val_print_type_code_flags (type, valaddr, stream);
print_scalar_formatted (valaddr + embedded_offset, type, format, 0, stream);
val_print_type_code_flags (type, valaddr + embedded_offset, stream);
for (reg = 16; reg < 31; reg++)
/* We may have to apply a StackGhost cookie. */
fs->regs.reg[31].how = DWARF2_FRAME_REG_SAVED_WCOOKIE;
fs->regs.reg[31].loc.offset = 15 * size;
int regnum;
buf, 0, size);
{
ULONGEST wcookie = extract_unsigned_integer (buf, len);
gdb_assert (len == size);
*lvalp = not_lval;
*addrp = 0;
if (valuep)
{
ULONGEST value = extract_unsigned_integer (valuep, size);
store_unsigned_integer (valuep, size, value ^ wcookie);
}
}
apply StackGhost cookie. */
print_scalar_formatted (valaddr, type, format, 0, stream);
val_print_type_code_flags (type, valaddr, stream);
|| (TYPE_CODE (t) == TYPE_CODE_FLAGS)
case TYPE_CODE_FLAGS:
case TYPE_CODE_FLAGS:
void *fpregs, int regnum)
{
regcache_raw_collect (regcache, i, regs);
regcache_raw_collect (regcache, i + 1, regs + 4);
}
(PTRACE_TYPE_ARG3) &fpregs, 0) == -1)
perror_with_name (_("Couldn't get floating point status"));
(PTRACE_TYPE_ARG3) &fpregs, 0) == -1)
perror_with_name (_("Couldn't get floating point status"));
(PTRACE_TYPE_ARG3) &fpregs, 0) == -1)
perror_with_name (_("Couldn't write floating point status"));
print_scalar_formatted (valaddr + embedded_offset, type, format, 0, stream);
val_print_type_code_flags (type, valaddr + embedded_offset, stream);
|| regnum == PC_REGNUM);
|| regnum == tdep->ppc_fpscr_regnum);
regnum, ®s, sizeof regs);
regnum, &fpregs, sizeof fpregs);
regnum, ®s, sizeof regs);
regnum, &fpregs, sizeof fpregs);
const char *sect_name, size_t sect_size)
struct regcache *regcache, gdb_byte *readbuf,
const gdb_byte *writebuf)
if (lr_reg == -1)
{
/* bcl 20,xx,.+4 is used to get the current PC, with or without
prediction bits. If the LR has already been saved, we can
skip it. */
continue;
}
extract_unsigned_integer ((gdb_byte *)&(MEMBER), sizeof (MEMBER))
builtin_type_void_data_ptr);
lmo->r_version_size);
builtin_type_void_data_ptr);
lm = ldsomap = solib_svr4_r_ldsomap ();
|| (X_I (insn) == 1 && X_RS1 (insn) == 0 && (insn & 0x7f) == 0))
{
/* OpenBSD system call. */
ULONGEST number;
regcache_cooked_read_unsigned (current_regcache,
SPARC_G1_REGNUM, &number);
if (number & 0x400)
return sparc_address_from_register (SPARC_G2_REGNUM);
if (number & 0x800)
return sparc_address_from_register (SPARC_G7_REGNUM);
}
gdb_byte *buffer;
gdb_byte *check = xmalloc (len);
(unsigned int *)cache_ovly_table, cache_novlys * 4);
cache_ovly_table[i], 4);
error (_(""%s" exists in this program but is not a function."),
name);
return value_of_variable (sym, NULL);
struct ui_file *stream)
{
if (TYPE_FIELD_NAME (type, bitpos))
fprintf_filtered (stream, "%s ", TYPE_FIELD_NAME (type, bitpos));
else
fprintf_filtered (stream, "#%d ", bitpos);
}
const gdb_byte *valaddr,
struct ui_file *stream);
i386-sol2-tdep.o sol2-tdep.o corelow.o solib.o solib-svr4.o
sol2-tdep.o solib.o solib-svr4.o
2006-01-14 13:24:36 +01:00
|
|
|
|
|
|
|
|
|
/* Collect the floating-point registers from REGCACHE and store them
|
|
|
|
|
in FPREGS. */
|
|
|
|
|
|
|
|
|
|
static void
|
|
|
|
|
hppabsd_collect_fpregset (struct regcache *regcache,
|
|
|
|
|
void *fpregs, int regnum)
|
|
|
|
|
{
|
|
|
|
|
char *regs = fpregs;
|
|
|
|
|
int i;
|
|
|
|
|
|
|
|
|
|
for (i = HPPA_FP0_REGNUM; i <= HPPA_FP31R_REGNUM; i += 2, regs += 8)
|
|
|
|
|
{
|
|
|
|
|
if (regnum == -1 || regnum == i || regnum == i + 1)
|
|
|
|
|
{
|
|
|
|
|
regcache_raw_collect (regcache, i, regs);
|
|
|
|
|
regcache_raw_collect (regcache, i + 1, regs + 4);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
2004-06-26 12:06:35 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/* Fetch register REGNUM from the inferior. If REGNUM is -1, do this
|
|
|
|
|
for all registers (including the floating-point registers). */
|
|
|
|
|
|
2005-04-18 00:20:20 +02:00
|
|
|
|
static void
|
* corelow.c (get_core_registers): Adjust.
(core_file_thread_alive): Rename to...
(core_thread_alive): ... this.
(core_pid_to_str): Try gdbarch_core_pid_to_str first.
(init_core_ops): Adjust.
(coreops_suppress_target): Delete.
(_initialize_corelow): Unconditionally add core_ops.
* procfs.c: Include "inf-child.h".
(procfs_ops): Delete.
(init_procfs_ops): Delete. Reimplement as...
(procfs_target): ... this, inheriting from inf-child.
(procfs_attach, procfs_detach, procfs_fetch_registers): Adjust.
(procfs_prepare_to_store): Delete.
(procfs_store_registers, procfs_resume): Adjust.
(procfs_open): Delete.
(procfs_suppress_run): Delete.
(procfs_can_run): Delete.
(procfs_mourn_inferior): Adjust.
(procfs_init_inferior): Add target_ops parameter. Adjust.
(procfs_create_inferior): Don't pass procfs_init_inferior to
fork_inferior. Instead call it after fork_inferior returns.
(procfs_find_new_threads): Adjust.
(_initialize_procfs): Adjust to use procfs_target instead of
init_procfs_ops.
* sol-thread.c (orig_core_ops, sol_core_ops): Delete.
(lwp_to_thread): Use target_thread_alive.
(sol_thread_open): Delete.
(sol_thread_attach): Delete.
(sol_thread_detach, sol_thread_resume, sol_thread_wait)
(sol_thread_fetch_registers, sol_thread_store_registers): Adjust
to use find_target_beneath.
(sol_thread_prepare_to_store, sol_thread_xfer_memory): Delete.
(sol_thread_xfer_partial): Adjust to use find_target_beneath.
(sol_thread_files_info, sol_thread_kill_inferior): Delete.
(check_for_thread_db): New.
(sol_thread_notice_signals, sol_thread_create_inferior): Delete.
(sol_thread_new_objfile): Call check_for_thread_db.
(sol_thread_mourn_inferior): Adjust to use find_target_beneath.
(sol_thread_can_run): Delete.
(sol_thread_alive): Adjust to use find_target_beneath.
(sol_thread_stop): Delete.
(rw_common): Use target_write_memory or target_read_memory.
(ps_lgetregs, ps_lgetfpregs): Use target_fetch_registers.
(ps_lsetregs, ps_lsetfpregs): Use target_store_registers.
(solaris_pid_to_str): Remove check for libthread_db initialization
failing.
(sol_find_new_threads): Remove check for libthread_db
initialization failing, or for an invalid inferior_ptid. Adjust
to use find_target_beneath.
(sol_core_open, sol_core_close, sol_core_detach,
sol_core_files_info, sol_find_memory_regions,
sol_make_note_section, ignore): Delete.
(init_sol_thread_ops): Make it a thread_stratum target. Remove
unneeded callback settings.
(init_sol_core_ops): Delete.
(_initialize_sol_thread): No longer call init_sol_core_ops, set
procfs_suppress_run, or hack with core_ops.
* target.h (struct target_ops): Add a target_ops * parameter to
to_resume, to_fetch_registers, to_store_registers, to_thread_alive
and to_find_new_threads.
(target_fetch_registers, target_store_registers)
(target_thread_alive, target_find_new_threads): Redeclare as
function.
* target.c (update_current_target): Do not inherit or de_fault
to_resume, to_fetch_registers, to_store_registers,
to_thread_alive, to_find_new_threads.
(target_resume): Adjust.
(target_thread_alive, target_find_new_threads): New.
(debug_to_resume, debug_to_fetch_registers): Delete.
(target_fetch_registers): New.
(debug_to_store_registers): Delete.
(target_store_registers): New.
(debug_to_thread_alive, debug_to_find_new_threads): Delete.
(setup_target_debug): Adjust.
* gdbcore.h (core_ops): Delete declaration.
* inf-ptrace.c, linux-nat.c, remote.c, amd64-linux-nat.c,
inf-child.c, linux-thread-db.c, bsd-uthread.c, inf-ttrace.c,
i386-sol2-tdep.c, darwin-nat.c, gnu-nat.c, go32-nat.c,
hpux-thread.c, i386-linux-nat.c, i386fbsd-nat.c, monitor.c,
nto-procfs.c, remote-m32r-sdi.c, remote-mips.c, windows-nat.c,
alphabsd-nat.c, amd64bsd-nat.c, arm-linux-nat.c, armnbsd-nat.c,
bsd-kvm.c, hppa-hpux-nat.c, hppa-linux-nat.c, hppabsd-nat.c,
hppanbsd-nat.c, i386-darwin-nat.c, i386bsd-nat.c,
ia64-linux-nat.c, m32r-linux-nat.c, m68kbsd-nat.c,
m68klinux-nat.c, m88kbsd-nat.c, mips-linux-nat.c,
mips64obsd-nat.c, mipsnbsd-nat.c, ppc-linux-nat.c, ppcnbsd-nat.c,
ppcobsd-nat.c, remote-sim.c, rs6000-nat.c, s390-nat.c,
shnbsd-nat.c, sparc-nat.c, sparc-nat.h, spu-linux-nat.c,
vaxbsd-nat.c, xtensa-linux-nat.c: Adjust to target_ops changes.
* gdbarch.sh (core_pid_to_str): New gdbarch callback.
* gdbarch.h, gdbarch.c: Regenerate.
* sol2-tdep.c: Include "inferior.h".
(sol2_core_pid_to_str): New.
* sol2-tdep.h (sol2_core_pid_to_str): Declare.
* amd64-sol2-tdep.c (amd64_sol2_init_abi): Set it.
* sparc-sol2-tdep.c (sparc32_sol2_init_abi): Set it.
* sparc64-sol2-tdep.c (sparc64_sol2_init_abi): Set it.
* i386-sol2-tdep.c (i386_sol2_init_abi): Set it.
2009-02-23 01:03:50 +01:00
|
|
|
|
hppabsd_fetch_registers (struct target_ops *ops,
|
|
|
|
|
struct regcache *regcache, int regnum)
|
2004-06-26 12:06:35 +02:00
|
|
|
|
{
|
|
|
|
|
if (regnum == -1 || hppabsd_gregset_supplies_p (regnum))
|
|
|
|
|
{
|
|
|
|
|
struct reg regs;
|
|
|
|
|
|
2013-09-30 13:50:12 +02:00
|
|
|
|
if (ptrace (PT_GETREGS, ptid_get_pid (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-02-11 Andrew Cagney <cagney@gnu.org>
Mark up error_no_arg, query, perror_with_name, complaint, and
internal_error.
* breakpoint.c, cp-abi.c, cp-namespace.c, cp-support.c: Update.
* cris-tdep.c, dbxread.c, dictionary.c, dsrec.c: Update.
* dummy-frame.c, dve3900-rom.c, dwarf2-frame.c, dwarf2expr.c: Update.
* dwarf2read.c, dwarfread.c, elfread.c, event-loop.c: Update.
* exceptions.c, exec.c, f-lang.c, findvar.c, fork-child.c: Update.
* frame-unwind.c, frame.c, frv-linux-tdep.c, frv-tdep.c: Update.
* gdb_assert.h, gdbarch.c, gdbtypes.c, gnu-nat.c: Update.
* go32-nat.c, hppa-tdep.c, hppabsd-nat.c, hpread.c: Update.
* i386-linux-nat.c, i386-nat.c, i386-tdep.c, i386bsd-nat.c: Update.
* i386fbsd-nat.c, inf-ptrace.c, inf-ttrace.c, infcall.c: Update.
* infcmd.c, inflow.c, infptrace.c, infrun.c, inftarg.c: Update.
* interps.c, language.c, linespec.c, linux-nat.c: Update.
* m32r-linux-nat.c, m68k-tdep.c, m68kbsd-nat.c: Update.
* m68klinux-nat.c, m88kbsd-nat.c, macroexp.c, macroscope.c: Update.
* macrotab.c, maint.c, mdebugread.c, memattr.c: Update.
* mips-linux-tdep.c, mips-tdep.c, mips64obsd-nat.c: Update.
* mipsnbsd-nat.c, mn10300-tdep.c, monitor.c, nto-procfs.c: Update.
* objc-lang.c, objfiles.c, objfiles.h, ocd.c, osabi.c: Update.
* parse.c, ppc-bdm.c, ppc-linux-nat.c, ppc-sysv-tdep.c: Update.
* ppcnbsd-nat.c, ppcobsd-nat.c, printcmd.c, procfs.c: Update.
* regcache.c, reggroups.c, remote-e7000.c, remote-mips.c: Update.
* remote-rdp.c, remote-sds.c, remote-sim.c, remote-st.c: Update.
* remote-utils.c, remote.c, rs6000-nat.c, rs6000-tdep.c: Update.
* s390-nat.c, s390-tdep.c, sentinel-frame.c, serial.c: Update.
* sh-tdep.c, sh3-rom.c, sh64-tdep.c, shnbsd-nat.c: Update.
* solib-aix5.c, solib-svr4.c, solib.c, source.c: Update.
* sparc-nat.c, stabsread.c, stack.c, symfile.c, symtab.c: Update.
* symtab.h, target.c, tracepoint.c, ui-file.c, ui-out.c: Update.
* utils.c, valops.c, valprint.c, vax-nat.c, vaxbsd-nat.c: Update.
* win32-nat.c, xcoffread.c, xstormy16-tdep.c: Update.
* cli/cli-cmds.c, cli/cli-logging.c, cli/cli-script.c: Update.
* cli/cli-setshow.c, mi/mi-cmd-break.c, mi/mi-cmds.c: Update.
* mi/mi-console.c, mi/mi-getopt.c, mi/mi-out.c: Update.
* tui/tui-file.c, tui/tui-interp.c: Update.
2005-02-11 19:13:55 +01:00
|
|
|
|
perror_with_name (_("Couldn't get registers"));
|
2004-06-26 12:06:35 +02:00
|
|
|
|
|
|
|
|
|
hppabsd_supply_gregset (regcache, ®s);
|
|
|
|
|
}
|
* hppa-tdep.h (enum hppa_regnum): Add HPPA_FP31R_REGNUM.
* hppabsd-nat.c (hppabsd_fpregset_supplies_p)
(hppabsd_supply_fpregset, hppabsd_collect_fpregset): New
functions.
(hppabsd_fetch_registers, hppabsd_store_registers): Handle
floating-point registers.
print_scalar_formatted (valaddr, type, format, 0, stream);
val_print_type_code_flags (type, valaddr, stream);
print_scalar_formatted (valaddr + embedded_offset, type, format, 0, stream);
val_print_type_code_flags (type, valaddr + embedded_offset, stream);
for (reg = 16; reg < 31; reg++)
/* We may have to apply a StackGhost cookie. */
fs->regs.reg[31].how = DWARF2_FRAME_REG_SAVED_WCOOKIE;
fs->regs.reg[31].loc.offset = 15 * size;
int regnum;
buf, 0, size);
{
ULONGEST wcookie = extract_unsigned_integer (buf, len);
gdb_assert (len == size);
*lvalp = not_lval;
*addrp = 0;
if (valuep)
{
ULONGEST value = extract_unsigned_integer (valuep, size);
store_unsigned_integer (valuep, size, value ^ wcookie);
}
}
apply StackGhost cookie. */
print_scalar_formatted (valaddr, type, format, 0, stream);
val_print_type_code_flags (type, valaddr, stream);
|| (TYPE_CODE (t) == TYPE_CODE_FLAGS)
case TYPE_CODE_FLAGS:
case TYPE_CODE_FLAGS:
void *fpregs, int regnum)
{
regcache_raw_collect (regcache, i, regs);
regcache_raw_collect (regcache, i + 1, regs + 4);
}
(PTRACE_TYPE_ARG3) &fpregs, 0) == -1)
perror_with_name (_("Couldn't get floating point status"));
(PTRACE_TYPE_ARG3) &fpregs, 0) == -1)
perror_with_name (_("Couldn't get floating point status"));
(PTRACE_TYPE_ARG3) &fpregs, 0) == -1)
perror_with_name (_("Couldn't write floating point status"));
print_scalar_formatted (valaddr + embedded_offset, type, format, 0, stream);
val_print_type_code_flags (type, valaddr + embedded_offset, stream);
|| regnum == PC_REGNUM);
|| regnum == tdep->ppc_fpscr_regnum);
regnum, ®s, sizeof regs);
regnum, &fpregs, sizeof fpregs);
regnum, ®s, sizeof regs);
regnum, &fpregs, sizeof fpregs);
const char *sect_name, size_t sect_size)
struct regcache *regcache, gdb_byte *readbuf,
const gdb_byte *writebuf)
if (lr_reg == -1)
{
/* bcl 20,xx,.+4 is used to get the current PC, with or without
prediction bits. If the LR has already been saved, we can
skip it. */
continue;
}
extract_unsigned_integer ((gdb_byte *)&(MEMBER), sizeof (MEMBER))
builtin_type_void_data_ptr);
lmo->r_version_size);
builtin_type_void_data_ptr);
lm = ldsomap = solib_svr4_r_ldsomap ();
|| (X_I (insn) == 1 && X_RS1 (insn) == 0 && (insn & 0x7f) == 0))
{
/* OpenBSD system call. */
ULONGEST number;
regcache_cooked_read_unsigned (current_regcache,
SPARC_G1_REGNUM, &number);
if (number & 0x400)
return sparc_address_from_register (SPARC_G2_REGNUM);
if (number & 0x800)
return sparc_address_from_register (SPARC_G7_REGNUM);
}
gdb_byte *buffer;
gdb_byte *check = xmalloc (len);
(unsigned int *)cache_ovly_table, cache_novlys * 4);
cache_ovly_table[i], 4);
error (_(""%s" exists in this program but is not a function."),
name);
return value_of_variable (sym, NULL);
struct ui_file *stream)
{
if (TYPE_FIELD_NAME (type, bitpos))
fprintf_filtered (stream, "%s ", TYPE_FIELD_NAME (type, bitpos));
else
fprintf_filtered (stream, "#%d ", bitpos);
}
const gdb_byte *valaddr,
struct ui_file *stream);
i386-sol2-tdep.o sol2-tdep.o corelow.o solib.o solib-svr4.o
sol2-tdep.o solib.o solib-svr4.o
2006-01-14 13:24:36 +01:00
|
|
|
|
|
|
|
|
|
if (regnum == -1 || hppabsd_fpregset_supplies_p (regnum))
|
|
|
|
|
{
|
|
|
|
|
struct fpreg fpregs;
|
|
|
|
|
|
2013-09-30 13:50:12 +02:00
|
|
|
|
if (ptrace (PT_GETFPREGS, ptid_get_pid (inferior_ptid),
|
* hppa-tdep.h (enum hppa_regnum): Add HPPA_FP31R_REGNUM.
* hppabsd-nat.c (hppabsd_fpregset_supplies_p)
(hppabsd_supply_fpregset, hppabsd_collect_fpregset): New
functions.
(hppabsd_fetch_registers, hppabsd_store_registers): Handle
floating-point registers.
print_scalar_formatted (valaddr, type, format, 0, stream);
val_print_type_code_flags (type, valaddr, stream);
print_scalar_formatted (valaddr + embedded_offset, type, format, 0, stream);
val_print_type_code_flags (type, valaddr + embedded_offset, stream);
for (reg = 16; reg < 31; reg++)
/* We may have to apply a StackGhost cookie. */
fs->regs.reg[31].how = DWARF2_FRAME_REG_SAVED_WCOOKIE;
fs->regs.reg[31].loc.offset = 15 * size;
int regnum;
buf, 0, size);
{
ULONGEST wcookie = extract_unsigned_integer (buf, len);
gdb_assert (len == size);
*lvalp = not_lval;
*addrp = 0;
if (valuep)
{
ULONGEST value = extract_unsigned_integer (valuep, size);
store_unsigned_integer (valuep, size, value ^ wcookie);
}
}
apply StackGhost cookie. */
print_scalar_formatted (valaddr, type, format, 0, stream);
val_print_type_code_flags (type, valaddr, stream);
|| (TYPE_CODE (t) == TYPE_CODE_FLAGS)
case TYPE_CODE_FLAGS:
case TYPE_CODE_FLAGS:
void *fpregs, int regnum)
{
regcache_raw_collect (regcache, i, regs);
regcache_raw_collect (regcache, i + 1, regs + 4);
}
(PTRACE_TYPE_ARG3) &fpregs, 0) == -1)
perror_with_name (_("Couldn't get floating point status"));
(PTRACE_TYPE_ARG3) &fpregs, 0) == -1)
perror_with_name (_("Couldn't get floating point status"));
(PTRACE_TYPE_ARG3) &fpregs, 0) == -1)
perror_with_name (_("Couldn't write floating point status"));
print_scalar_formatted (valaddr + embedded_offset, type, format, 0, stream);
val_print_type_code_flags (type, valaddr + embedded_offset, stream);
|| regnum == PC_REGNUM);
|| regnum == tdep->ppc_fpscr_regnum);
regnum, ®s, sizeof regs);
regnum, &fpregs, sizeof fpregs);
regnum, ®s, sizeof regs);
regnum, &fpregs, sizeof fpregs);
const char *sect_name, size_t sect_size)
struct regcache *regcache, gdb_byte *readbuf,
const gdb_byte *writebuf)
if (lr_reg == -1)
{
/* bcl 20,xx,.+4 is used to get the current PC, with or without
prediction bits. If the LR has already been saved, we can
skip it. */
continue;
}
extract_unsigned_integer ((gdb_byte *)&(MEMBER), sizeof (MEMBER))
builtin_type_void_data_ptr);
lmo->r_version_size);
builtin_type_void_data_ptr);
lm = ldsomap = solib_svr4_r_ldsomap ();
|| (X_I (insn) == 1 && X_RS1 (insn) == 0 && (insn & 0x7f) == 0))
{
/* OpenBSD system call. */
ULONGEST number;
regcache_cooked_read_unsigned (current_regcache,
SPARC_G1_REGNUM, &number);
if (number & 0x400)
return sparc_address_from_register (SPARC_G2_REGNUM);
if (number & 0x800)
return sparc_address_from_register (SPARC_G7_REGNUM);
}
gdb_byte *buffer;
gdb_byte *check = xmalloc (len);
(unsigned int *)cache_ovly_table, cache_novlys * 4);
cache_ovly_table[i], 4);
error (_(""%s" exists in this program but is not a function."),
name);
return value_of_variable (sym, NULL);
struct ui_file *stream)
{
if (TYPE_FIELD_NAME (type, bitpos))
fprintf_filtered (stream, "%s ", TYPE_FIELD_NAME (type, bitpos));
else
fprintf_filtered (stream, "#%d ", bitpos);
}
const gdb_byte *valaddr,
struct ui_file *stream);
i386-sol2-tdep.o sol2-tdep.o corelow.o solib.o solib-svr4.o
sol2-tdep.o solib.o solib-svr4.o
2006-01-14 13:24:36 +01:00
|
|
|
|
(PTRACE_TYPE_ARG3) &fpregs, 0) == -1)
|
|
|
|
|
perror_with_name (_("Couldn't get floating point status"));
|
|
|
|
|
|
* target.h (struct regcache): Add forward declaration.
(struct target_ops): Add REGCACHE parameter to to_fetch_registers
and to_store_registers target operations.
(target_fetch_registers, target_store_registers): Update.
* regcache.c (regcache_raw_read): Replace register_cached by
regcache_valid_p. Pass regcache to target_fetch_registers.
(regcache_raw_write): Pass regcache to target_store_registers.
* arm-linux-nat.c (store_fpregister, store_fpregs, store_register,
store_regs, store_wmmx_regs): Replace register_cached by
regcache_valid_p.
* bsd-kvm.c (bsd_kvm_open, bsd_kvm_proc_cmd): Pass current_regcache
to target_fetch_registers calls.
* corelow.c (core_open): Likewise.
* linux-nat.c (linux_nat_corefile_thread_callback): Likewise.
* proc-service.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
ps_lsetfpregs): Likewise.
* sol-thread.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
ps_lsetfpregs): Likewise.
* win32-nat.c (win32_resume): Likewise.
* ia64-tdep.c (ia64_store_return_value): Pass current_regcache
to target_store_registers call.
* rs6000-tdep.c (rs6000_push_dummy_call): Likewise.
* inferior.h (store_inferior_registers): Update prototype.
(fetch_inferior_registers): Likewise.
* gnu-nat.c (gnu_store_registers, gnu_fetch_registers): Likewise.
* mips-linux-nat.c (super_fetch_registers, super_store_registers):
Update function pointer signatures.
* aix-thread.c (aix_thread_fetch_registers): Add REGCACHE parameter,
use it instead of current_regcache, update calls.
(aix_thread_store_registers): Likewise.
* alphabsd-nat.c (alphabsd_fetch_inferior_registers): Likewise.
(alphabsd_store_inferior_registers): Likewise.
* amd64bsd-nat.c (amd64bsd_fetch_inferior_registers): Likewise.
(amd64bsd_store_inferior_registers): Likewise.
* amd64-linux-nat.c (amd64_linux_fetch_inferior_registers): Likewise.
(amd64_linux_store_inferior_registers): Likewise.
* arm-linux-nat.c (fetch_fpregister, fetch_fpregs, store_fpregister,
store_fpregs, fetch_register, fetch_regs, store_register, store_regs,
fetch_wmmx_regs, store_wmmx_regs): Likewise.
(arm_linux_fetch_inferior_registers): Likewise.
(arm_linux_store_inferior_registers): Likewise.
* armnbsd-nat.c (fetch_register, fetch_regs, fetch_fp_register,
fetch_fp_regs, armnbsd_fetch_registers): Likewise.
(store_register, store_regs, store_fp_register, store_fp_regs,
armnbsd_store_registers): Likewise.
* bsd-kvm.c (bsd_kvm_fetch_pcb, bsd_kvm_fetch_registers): Likewise.
* bsd-uthread.c (bsd_uthread_fetch_registers): Likewise.
(bsd_uthread_store_registers): Likewise.
* corelow.c (get_core_registers): Likewise.
* go32-nat.c (fetch_register, go32_fetch_registers, store_register,
go32_store_registers): Likewise.
* hppabsd-nat.c (hppabsd_fetch_registers): Likewise.
(hppabsd_store_registers): Likewise.
* hppa-hpux-nat.c (hppa_hpux_fetch_register): Likewise.
(hppa_hpux_fetch_inferior_registers): Likewise.
(hppa_hpux_store_register): Likewise.
(hppa_hpux_store_inferior_registers): Likewise.
* hppa-linux-nat.c (fetch_register, store_register): Likewise.
(hppa_linux_fetch_inferior_registers): Likewise.
(hppa_linux_store_inferior_registers): Likewise.
* hpux-thread.c (hpux_thread_fetch_registers): Likewise.
(hpux_thread_store_registers): Likewise.
* i386bsd-nat.c (i386bsd_fetch_inferior_registers): Likewise.
(i386bsd_store_inferior_registers): Likewise.
* i386gnu-nat.c (fetch_fpregs, gnu_fetch_registers, store_fpregs,
gnu_store_registers): Likewise.
* i386-linux-nat.c (fetch_register, store_register, fetch_regs,
store_regs, fetch_fpregs, store_fpregs, fetch_fpxregs, store_fpxregs):
Likewise.
(i386_linux_fetch_inferior_registers): Likewise.
(i386_linux_store_inferior_registers): Likewise.
* ia64-linux-nat.c (ia64_linux_fetch_register): Likewise.
(ia64_linux_fetch_registers): Likewise.
(ia64_linux_store_register): Likewise.
(ia64_linux_store_registers): Likewise.
* inf-child.c (inf_child_fetch_inferior_registers): Likewise.
(inf_child_store_inferior_registers): Likewise.
* inf-ptrace.c (inf_ptrace_fetch_register): Likewise.
(inf_ptrace_fetch_registers): Likewise.
(inf_ptrace_store_register): Likewise.
(inf_ptrace_store_registers): Likewise.
* infptrace.c (fetch_register, store_register): Likewise.
(fetch_inferior_registers, store_inferior_registers): Likewise.
* m32r-linux-nat.c (fetch_regs, store_regs): Likewise.
(m32r_linux_fetch_inferior_registers): Likewise.
(m32r_linux_store_inferior_registers): Likewise.
* m68kbsd-nat.c (m68kbsd_fetch_inferior_registers): Likewise.
(m68kbsd_store_inferior_registers): Likewise.
* m68klinux-nat.c (fetch_register, old_fetch_inferior_registers,
store_register, old_store_inferior_registers, fetch_regs, store_regs,
fetch_fpregs, store_fpregs): Likewise.
(m68k_linux_fetch_inferior_registers): Likewise.
(m68k_linux_store_inferior_registers): Likewise.
* m88kbsd-nat.c (m88kbsd_fetch_inferior_registers): Likewise.
(m88kbsd_store_inferior_registers): Likewise.
* mips64obsd-nat.c (mips64obsd_fetch_inferior_registers): Likewise.
(mips64obsd_store_inferior_registers): Likewise.
* mips-linux-nat.c (mips64_linux_regsets_fetch_registers): Likewise.
(mips64_linux_regsets_store_registers): Likewise.
(mips64_linux_fetch_registers): Likewise.
(mips64_linux_store_registers): Likewise.
* mipsnbsd-nat.c (mipsnbsd_fetch_inferior_registers): Likewise.
(mipsnbsd_store_inferior_registers): Likewise.
* monitor.c (monitor_fetch_register, monitor_store_register): Likewise.
(monitor_fetch_registers, monitor_store_registers): Likewise.
* nto-procfs.c (procfs_fetch_registers): Likewise.
(procfs_store_registers): Likewise.
* ppc-linux-nat.c (fetch_altivec_register, fetch_spe_register,
fetch_register, supply_vrregset, fetch_altivec_registers,
fetch_ppc_registers, ppc_linux_fetch_inferior_registers): Likewise.
(store_altivec_register, store_spe_register, store_register,
fill_vrregset, store_altivec_registers, store_ppc_registers,
ppc_linux_store_inferior_registers): Likewise.
* ppcnbsd-nat.c (ppcnbsd_fetch_inferior_registers): Likewise.
(ppcnbsd_store_inferior_registers): Likewise.
* ppcobsd-nat.c (ppcobsd_fetch_registers): Likewise.
(ppcobsd_store_registers): Likewise.
* procfs.c (procfs_fetch_registers, procfs_store_registers): Likewise.
* remote.c (fetch_register_using_p, process_g_packet,
fetch_registers_using_g, remote_fetch_registers): Likewise.
(store_register_using_P, store_registers_using_G,
remote_store_registers): Likewise.
* remote-m32r-sdi.c (m32r_fetch_registers, m32r_fetch_register,
m32r_store_register, m32r_store_register): Likewise.
* remote-mips.c (mips_fetch_registers, mips_store_registers): Likewise.
* remote-sim.c (gdbsim_fetch_register): Likewise.
(gdbsim_store_register): Likewise.
* rs6000-nat.c (fetch_register, store_register): Likewise.
(rs6000_fetch_inferior_registers): Likewise.
(rs6000_store_inferior_registers): Likewise.
* s390-nat.c (fetch_regs, store_regs): Likewise.
(fetch_fpregs, store_fpregs): Likewise.
(s390_linux_fetch_inferior_registers): Likewise.
(s390_linux_store_inferior_registers): Likewise.
* shnbsd-nat.c (shnbsd_fetch_inferior_registers): Likewise.
(shnbsd_store_inferior_registers): Likewise.
* sol-thread.c (sol_thread_fetch_registers): Likewise.
(sol_thread_store_registers): Likewise.
* sparc-nat.c (fetch_inferior_registers): Likewise.
(store_inferior_registers): Likewise.
* spu-linux-nat.c (spu_fetch_inferior_registers): Likewise.
(spu_store_inferior_registers): Likewise.
* target.c (debug_print_register): Likewise.
(debug_to_fetch_registers, debug_to_store_registers): Likewise.
* vaxbsd-nat.c (vaxbsd_fetch_inferior_registers): Likewise.
(vaxbsd_store_inferior_registers): Likewise.
* win32-nat.c (do_win32_fetch_inferior_registers): Likewise.
(win32_fetch_inferior_registers): Likewise.
(win32_store_inferior_registers): Likewise.
2007-05-06 16:34:38 +02:00
|
|
|
|
hppabsd_supply_fpregset (regcache, &fpregs);
|
* hppa-tdep.h (enum hppa_regnum): Add HPPA_FP31R_REGNUM.
* hppabsd-nat.c (hppabsd_fpregset_supplies_p)
(hppabsd_supply_fpregset, hppabsd_collect_fpregset): New
functions.
(hppabsd_fetch_registers, hppabsd_store_registers): Handle
floating-point registers.
print_scalar_formatted (valaddr, type, format, 0, stream);
val_print_type_code_flags (type, valaddr, stream);
print_scalar_formatted (valaddr + embedded_offset, type, format, 0, stream);
val_print_type_code_flags (type, valaddr + embedded_offset, stream);
for (reg = 16; reg < 31; reg++)
/* We may have to apply a StackGhost cookie. */
fs->regs.reg[31].how = DWARF2_FRAME_REG_SAVED_WCOOKIE;
fs->regs.reg[31].loc.offset = 15 * size;
int regnum;
buf, 0, size);
{
ULONGEST wcookie = extract_unsigned_integer (buf, len);
gdb_assert (len == size);
*lvalp = not_lval;
*addrp = 0;
if (valuep)
{
ULONGEST value = extract_unsigned_integer (valuep, size);
store_unsigned_integer (valuep, size, value ^ wcookie);
}
}
apply StackGhost cookie. */
print_scalar_formatted (valaddr, type, format, 0, stream);
val_print_type_code_flags (type, valaddr, stream);
|| (TYPE_CODE (t) == TYPE_CODE_FLAGS)
case TYPE_CODE_FLAGS:
case TYPE_CODE_FLAGS:
void *fpregs, int regnum)
{
regcache_raw_collect (regcache, i, regs);
regcache_raw_collect (regcache, i + 1, regs + 4);
}
(PTRACE_TYPE_ARG3) &fpregs, 0) == -1)
perror_with_name (_("Couldn't get floating point status"));
(PTRACE_TYPE_ARG3) &fpregs, 0) == -1)
perror_with_name (_("Couldn't get floating point status"));
(PTRACE_TYPE_ARG3) &fpregs, 0) == -1)
perror_with_name (_("Couldn't write floating point status"));
print_scalar_formatted (valaddr + embedded_offset, type, format, 0, stream);
val_print_type_code_flags (type, valaddr + embedded_offset, stream);
|| regnum == PC_REGNUM);
|| regnum == tdep->ppc_fpscr_regnum);
regnum, ®s, sizeof regs);
regnum, &fpregs, sizeof fpregs);
regnum, ®s, sizeof regs);
regnum, &fpregs, sizeof fpregs);
const char *sect_name, size_t sect_size)
struct regcache *regcache, gdb_byte *readbuf,
const gdb_byte *writebuf)
if (lr_reg == -1)
{
/* bcl 20,xx,.+4 is used to get the current PC, with or without
prediction bits. If the LR has already been saved, we can
skip it. */
continue;
}
extract_unsigned_integer ((gdb_byte *)&(MEMBER), sizeof (MEMBER))
builtin_type_void_data_ptr);
lmo->r_version_size);
builtin_type_void_data_ptr);
lm = ldsomap = solib_svr4_r_ldsomap ();
|| (X_I (insn) == 1 && X_RS1 (insn) == 0 && (insn & 0x7f) == 0))
{
/* OpenBSD system call. */
ULONGEST number;
regcache_cooked_read_unsigned (current_regcache,
SPARC_G1_REGNUM, &number);
if (number & 0x400)
return sparc_address_from_register (SPARC_G2_REGNUM);
if (number & 0x800)
return sparc_address_from_register (SPARC_G7_REGNUM);
}
gdb_byte *buffer;
gdb_byte *check = xmalloc (len);
(unsigned int *)cache_ovly_table, cache_novlys * 4);
cache_ovly_table[i], 4);
error (_(""%s" exists in this program but is not a function."),
name);
return value_of_variable (sym, NULL);
struct ui_file *stream)
{
if (TYPE_FIELD_NAME (type, bitpos))
fprintf_filtered (stream, "%s ", TYPE_FIELD_NAME (type, bitpos));
else
fprintf_filtered (stream, "#%d ", bitpos);
}
const gdb_byte *valaddr,
struct ui_file *stream);
i386-sol2-tdep.o sol2-tdep.o corelow.o solib.o solib-svr4.o
sol2-tdep.o solib.o solib-svr4.o
2006-01-14 13:24:36 +01:00
|
|
|
|
}
|
2004-06-26 12:06:35 +02:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/* Store register REGNUM back into the inferior. If REGNUM is -1, do
|
|
|
|
|
this for all registers (including the floating-point registers). */
|
|
|
|
|
|
2005-04-18 00:20:20 +02:00
|
|
|
|
static void
|
* corelow.c (get_core_registers): Adjust.
(core_file_thread_alive): Rename to...
(core_thread_alive): ... this.
(core_pid_to_str): Try gdbarch_core_pid_to_str first.
(init_core_ops): Adjust.
(coreops_suppress_target): Delete.
(_initialize_corelow): Unconditionally add core_ops.
* procfs.c: Include "inf-child.h".
(procfs_ops): Delete.
(init_procfs_ops): Delete. Reimplement as...
(procfs_target): ... this, inheriting from inf-child.
(procfs_attach, procfs_detach, procfs_fetch_registers): Adjust.
(procfs_prepare_to_store): Delete.
(procfs_store_registers, procfs_resume): Adjust.
(procfs_open): Delete.
(procfs_suppress_run): Delete.
(procfs_can_run): Delete.
(procfs_mourn_inferior): Adjust.
(procfs_init_inferior): Add target_ops parameter. Adjust.
(procfs_create_inferior): Don't pass procfs_init_inferior to
fork_inferior. Instead call it after fork_inferior returns.
(procfs_find_new_threads): Adjust.
(_initialize_procfs): Adjust to use procfs_target instead of
init_procfs_ops.
* sol-thread.c (orig_core_ops, sol_core_ops): Delete.
(lwp_to_thread): Use target_thread_alive.
(sol_thread_open): Delete.
(sol_thread_attach): Delete.
(sol_thread_detach, sol_thread_resume, sol_thread_wait)
(sol_thread_fetch_registers, sol_thread_store_registers): Adjust
to use find_target_beneath.
(sol_thread_prepare_to_store, sol_thread_xfer_memory): Delete.
(sol_thread_xfer_partial): Adjust to use find_target_beneath.
(sol_thread_files_info, sol_thread_kill_inferior): Delete.
(check_for_thread_db): New.
(sol_thread_notice_signals, sol_thread_create_inferior): Delete.
(sol_thread_new_objfile): Call check_for_thread_db.
(sol_thread_mourn_inferior): Adjust to use find_target_beneath.
(sol_thread_can_run): Delete.
(sol_thread_alive): Adjust to use find_target_beneath.
(sol_thread_stop): Delete.
(rw_common): Use target_write_memory or target_read_memory.
(ps_lgetregs, ps_lgetfpregs): Use target_fetch_registers.
(ps_lsetregs, ps_lsetfpregs): Use target_store_registers.
(solaris_pid_to_str): Remove check for libthread_db initialization
failing.
(sol_find_new_threads): Remove check for libthread_db
initialization failing, or for an invalid inferior_ptid. Adjust
to use find_target_beneath.
(sol_core_open, sol_core_close, sol_core_detach,
sol_core_files_info, sol_find_memory_regions,
sol_make_note_section, ignore): Delete.
(init_sol_thread_ops): Make it a thread_stratum target. Remove
unneeded callback settings.
(init_sol_core_ops): Delete.
(_initialize_sol_thread): No longer call init_sol_core_ops, set
procfs_suppress_run, or hack with core_ops.
* target.h (struct target_ops): Add a target_ops * parameter to
to_resume, to_fetch_registers, to_store_registers, to_thread_alive
and to_find_new_threads.
(target_fetch_registers, target_store_registers)
(target_thread_alive, target_find_new_threads): Redeclare as
function.
* target.c (update_current_target): Do not inherit or de_fault
to_resume, to_fetch_registers, to_store_registers,
to_thread_alive, to_find_new_threads.
(target_resume): Adjust.
(target_thread_alive, target_find_new_threads): New.
(debug_to_resume, debug_to_fetch_registers): Delete.
(target_fetch_registers): New.
(debug_to_store_registers): Delete.
(target_store_registers): New.
(debug_to_thread_alive, debug_to_find_new_threads): Delete.
(setup_target_debug): Adjust.
* gdbcore.h (core_ops): Delete declaration.
* inf-ptrace.c, linux-nat.c, remote.c, amd64-linux-nat.c,
inf-child.c, linux-thread-db.c, bsd-uthread.c, inf-ttrace.c,
i386-sol2-tdep.c, darwin-nat.c, gnu-nat.c, go32-nat.c,
hpux-thread.c, i386-linux-nat.c, i386fbsd-nat.c, monitor.c,
nto-procfs.c, remote-m32r-sdi.c, remote-mips.c, windows-nat.c,
alphabsd-nat.c, amd64bsd-nat.c, arm-linux-nat.c, armnbsd-nat.c,
bsd-kvm.c, hppa-hpux-nat.c, hppa-linux-nat.c, hppabsd-nat.c,
hppanbsd-nat.c, i386-darwin-nat.c, i386bsd-nat.c,
ia64-linux-nat.c, m32r-linux-nat.c, m68kbsd-nat.c,
m68klinux-nat.c, m88kbsd-nat.c, mips-linux-nat.c,
mips64obsd-nat.c, mipsnbsd-nat.c, ppc-linux-nat.c, ppcnbsd-nat.c,
ppcobsd-nat.c, remote-sim.c, rs6000-nat.c, s390-nat.c,
shnbsd-nat.c, sparc-nat.c, sparc-nat.h, spu-linux-nat.c,
vaxbsd-nat.c, xtensa-linux-nat.c: Adjust to target_ops changes.
* gdbarch.sh (core_pid_to_str): New gdbarch callback.
* gdbarch.h, gdbarch.c: Regenerate.
* sol2-tdep.c: Include "inferior.h".
(sol2_core_pid_to_str): New.
* sol2-tdep.h (sol2_core_pid_to_str): Declare.
* amd64-sol2-tdep.c (amd64_sol2_init_abi): Set it.
* sparc-sol2-tdep.c (sparc32_sol2_init_abi): Set it.
* sparc64-sol2-tdep.c (sparc64_sol2_init_abi): Set it.
* i386-sol2-tdep.c (i386_sol2_init_abi): Set it.
2009-02-23 01:03:50 +01:00
|
|
|
|
hppabsd_store_registers (struct target_ops *ops,
|
|
|
|
|
struct regcache *regcache, int regnum)
|
2004-06-26 12:06:35 +02:00
|
|
|
|
{
|
|
|
|
|
if (regnum == -1 || hppabsd_gregset_supplies_p (regnum))
|
|
|
|
|
{
|
|
|
|
|
struct reg regs;
|
|
|
|
|
|
2013-09-30 13:50:12 +02:00
|
|
|
|
if (ptrace (PT_GETREGS, ptid_get_pid (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-02-11 Andrew Cagney <cagney@gnu.org>
Mark up error_no_arg, query, perror_with_name, complaint, and
internal_error.
* breakpoint.c, cp-abi.c, cp-namespace.c, cp-support.c: Update.
* cris-tdep.c, dbxread.c, dictionary.c, dsrec.c: Update.
* dummy-frame.c, dve3900-rom.c, dwarf2-frame.c, dwarf2expr.c: Update.
* dwarf2read.c, dwarfread.c, elfread.c, event-loop.c: Update.
* exceptions.c, exec.c, f-lang.c, findvar.c, fork-child.c: Update.
* frame-unwind.c, frame.c, frv-linux-tdep.c, frv-tdep.c: Update.
* gdb_assert.h, gdbarch.c, gdbtypes.c, gnu-nat.c: Update.
* go32-nat.c, hppa-tdep.c, hppabsd-nat.c, hpread.c: Update.
* i386-linux-nat.c, i386-nat.c, i386-tdep.c, i386bsd-nat.c: Update.
* i386fbsd-nat.c, inf-ptrace.c, inf-ttrace.c, infcall.c: Update.
* infcmd.c, inflow.c, infptrace.c, infrun.c, inftarg.c: Update.
* interps.c, language.c, linespec.c, linux-nat.c: Update.
* m32r-linux-nat.c, m68k-tdep.c, m68kbsd-nat.c: Update.
* m68klinux-nat.c, m88kbsd-nat.c, macroexp.c, macroscope.c: Update.
* macrotab.c, maint.c, mdebugread.c, memattr.c: Update.
* mips-linux-tdep.c, mips-tdep.c, mips64obsd-nat.c: Update.
* mipsnbsd-nat.c, mn10300-tdep.c, monitor.c, nto-procfs.c: Update.
* objc-lang.c, objfiles.c, objfiles.h, ocd.c, osabi.c: Update.
* parse.c, ppc-bdm.c, ppc-linux-nat.c, ppc-sysv-tdep.c: Update.
* ppcnbsd-nat.c, ppcobsd-nat.c, printcmd.c, procfs.c: Update.
* regcache.c, reggroups.c, remote-e7000.c, remote-mips.c: Update.
* remote-rdp.c, remote-sds.c, remote-sim.c, remote-st.c: Update.
* remote-utils.c, remote.c, rs6000-nat.c, rs6000-tdep.c: Update.
* s390-nat.c, s390-tdep.c, sentinel-frame.c, serial.c: Update.
* sh-tdep.c, sh3-rom.c, sh64-tdep.c, shnbsd-nat.c: Update.
* solib-aix5.c, solib-svr4.c, solib.c, source.c: Update.
* sparc-nat.c, stabsread.c, stack.c, symfile.c, symtab.c: Update.
* symtab.h, target.c, tracepoint.c, ui-file.c, ui-out.c: Update.
* utils.c, valops.c, valprint.c, vax-nat.c, vaxbsd-nat.c: Update.
* win32-nat.c, xcoffread.c, xstormy16-tdep.c: Update.
* cli/cli-cmds.c, cli/cli-logging.c, cli/cli-script.c: Update.
* cli/cli-setshow.c, mi/mi-cmd-break.c, mi/mi-cmds.c: Update.
* mi/mi-console.c, mi/mi-getopt.c, mi/mi-out.c: Update.
* tui/tui-file.c, tui/tui-interp.c: Update.
2005-02-11 19:13:55 +01:00
|
|
|
|
perror_with_name (_("Couldn't get registers"));
|
2004-06-26 12:06:35 +02:00
|
|
|
|
|
* target.h (struct regcache): Add forward declaration.
(struct target_ops): Add REGCACHE parameter to to_fetch_registers
and to_store_registers target operations.
(target_fetch_registers, target_store_registers): Update.
* regcache.c (regcache_raw_read): Replace register_cached by
regcache_valid_p. Pass regcache to target_fetch_registers.
(regcache_raw_write): Pass regcache to target_store_registers.
* arm-linux-nat.c (store_fpregister, store_fpregs, store_register,
store_regs, store_wmmx_regs): Replace register_cached by
regcache_valid_p.
* bsd-kvm.c (bsd_kvm_open, bsd_kvm_proc_cmd): Pass current_regcache
to target_fetch_registers calls.
* corelow.c (core_open): Likewise.
* linux-nat.c (linux_nat_corefile_thread_callback): Likewise.
* proc-service.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
ps_lsetfpregs): Likewise.
* sol-thread.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
ps_lsetfpregs): Likewise.
* win32-nat.c (win32_resume): Likewise.
* ia64-tdep.c (ia64_store_return_value): Pass current_regcache
to target_store_registers call.
* rs6000-tdep.c (rs6000_push_dummy_call): Likewise.
* inferior.h (store_inferior_registers): Update prototype.
(fetch_inferior_registers): Likewise.
* gnu-nat.c (gnu_store_registers, gnu_fetch_registers): Likewise.
* mips-linux-nat.c (super_fetch_registers, super_store_registers):
Update function pointer signatures.
* aix-thread.c (aix_thread_fetch_registers): Add REGCACHE parameter,
use it instead of current_regcache, update calls.
(aix_thread_store_registers): Likewise.
* alphabsd-nat.c (alphabsd_fetch_inferior_registers): Likewise.
(alphabsd_store_inferior_registers): Likewise.
* amd64bsd-nat.c (amd64bsd_fetch_inferior_registers): Likewise.
(amd64bsd_store_inferior_registers): Likewise.
* amd64-linux-nat.c (amd64_linux_fetch_inferior_registers): Likewise.
(amd64_linux_store_inferior_registers): Likewise.
* arm-linux-nat.c (fetch_fpregister, fetch_fpregs, store_fpregister,
store_fpregs, fetch_register, fetch_regs, store_register, store_regs,
fetch_wmmx_regs, store_wmmx_regs): Likewise.
(arm_linux_fetch_inferior_registers): Likewise.
(arm_linux_store_inferior_registers): Likewise.
* armnbsd-nat.c (fetch_register, fetch_regs, fetch_fp_register,
fetch_fp_regs, armnbsd_fetch_registers): Likewise.
(store_register, store_regs, store_fp_register, store_fp_regs,
armnbsd_store_registers): Likewise.
* bsd-kvm.c (bsd_kvm_fetch_pcb, bsd_kvm_fetch_registers): Likewise.
* bsd-uthread.c (bsd_uthread_fetch_registers): Likewise.
(bsd_uthread_store_registers): Likewise.
* corelow.c (get_core_registers): Likewise.
* go32-nat.c (fetch_register, go32_fetch_registers, store_register,
go32_store_registers): Likewise.
* hppabsd-nat.c (hppabsd_fetch_registers): Likewise.
(hppabsd_store_registers): Likewise.
* hppa-hpux-nat.c (hppa_hpux_fetch_register): Likewise.
(hppa_hpux_fetch_inferior_registers): Likewise.
(hppa_hpux_store_register): Likewise.
(hppa_hpux_store_inferior_registers): Likewise.
* hppa-linux-nat.c (fetch_register, store_register): Likewise.
(hppa_linux_fetch_inferior_registers): Likewise.
(hppa_linux_store_inferior_registers): Likewise.
* hpux-thread.c (hpux_thread_fetch_registers): Likewise.
(hpux_thread_store_registers): Likewise.
* i386bsd-nat.c (i386bsd_fetch_inferior_registers): Likewise.
(i386bsd_store_inferior_registers): Likewise.
* i386gnu-nat.c (fetch_fpregs, gnu_fetch_registers, store_fpregs,
gnu_store_registers): Likewise.
* i386-linux-nat.c (fetch_register, store_register, fetch_regs,
store_regs, fetch_fpregs, store_fpregs, fetch_fpxregs, store_fpxregs):
Likewise.
(i386_linux_fetch_inferior_registers): Likewise.
(i386_linux_store_inferior_registers): Likewise.
* ia64-linux-nat.c (ia64_linux_fetch_register): Likewise.
(ia64_linux_fetch_registers): Likewise.
(ia64_linux_store_register): Likewise.
(ia64_linux_store_registers): Likewise.
* inf-child.c (inf_child_fetch_inferior_registers): Likewise.
(inf_child_store_inferior_registers): Likewise.
* inf-ptrace.c (inf_ptrace_fetch_register): Likewise.
(inf_ptrace_fetch_registers): Likewise.
(inf_ptrace_store_register): Likewise.
(inf_ptrace_store_registers): Likewise.
* infptrace.c (fetch_register, store_register): Likewise.
(fetch_inferior_registers, store_inferior_registers): Likewise.
* m32r-linux-nat.c (fetch_regs, store_regs): Likewise.
(m32r_linux_fetch_inferior_registers): Likewise.
(m32r_linux_store_inferior_registers): Likewise.
* m68kbsd-nat.c (m68kbsd_fetch_inferior_registers): Likewise.
(m68kbsd_store_inferior_registers): Likewise.
* m68klinux-nat.c (fetch_register, old_fetch_inferior_registers,
store_register, old_store_inferior_registers, fetch_regs, store_regs,
fetch_fpregs, store_fpregs): Likewise.
(m68k_linux_fetch_inferior_registers): Likewise.
(m68k_linux_store_inferior_registers): Likewise.
* m88kbsd-nat.c (m88kbsd_fetch_inferior_registers): Likewise.
(m88kbsd_store_inferior_registers): Likewise.
* mips64obsd-nat.c (mips64obsd_fetch_inferior_registers): Likewise.
(mips64obsd_store_inferior_registers): Likewise.
* mips-linux-nat.c (mips64_linux_regsets_fetch_registers): Likewise.
(mips64_linux_regsets_store_registers): Likewise.
(mips64_linux_fetch_registers): Likewise.
(mips64_linux_store_registers): Likewise.
* mipsnbsd-nat.c (mipsnbsd_fetch_inferior_registers): Likewise.
(mipsnbsd_store_inferior_registers): Likewise.
* monitor.c (monitor_fetch_register, monitor_store_register): Likewise.
(monitor_fetch_registers, monitor_store_registers): Likewise.
* nto-procfs.c (procfs_fetch_registers): Likewise.
(procfs_store_registers): Likewise.
* ppc-linux-nat.c (fetch_altivec_register, fetch_spe_register,
fetch_register, supply_vrregset, fetch_altivec_registers,
fetch_ppc_registers, ppc_linux_fetch_inferior_registers): Likewise.
(store_altivec_register, store_spe_register, store_register,
fill_vrregset, store_altivec_registers, store_ppc_registers,
ppc_linux_store_inferior_registers): Likewise.
* ppcnbsd-nat.c (ppcnbsd_fetch_inferior_registers): Likewise.
(ppcnbsd_store_inferior_registers): Likewise.
* ppcobsd-nat.c (ppcobsd_fetch_registers): Likewise.
(ppcobsd_store_registers): Likewise.
* procfs.c (procfs_fetch_registers, procfs_store_registers): Likewise.
* remote.c (fetch_register_using_p, process_g_packet,
fetch_registers_using_g, remote_fetch_registers): Likewise.
(store_register_using_P, store_registers_using_G,
remote_store_registers): Likewise.
* remote-m32r-sdi.c (m32r_fetch_registers, m32r_fetch_register,
m32r_store_register, m32r_store_register): Likewise.
* remote-mips.c (mips_fetch_registers, mips_store_registers): Likewise.
* remote-sim.c (gdbsim_fetch_register): Likewise.
(gdbsim_store_register): Likewise.
* rs6000-nat.c (fetch_register, store_register): Likewise.
(rs6000_fetch_inferior_registers): Likewise.
(rs6000_store_inferior_registers): Likewise.
* s390-nat.c (fetch_regs, store_regs): Likewise.
(fetch_fpregs, store_fpregs): Likewise.
(s390_linux_fetch_inferior_registers): Likewise.
(s390_linux_store_inferior_registers): Likewise.
* shnbsd-nat.c (shnbsd_fetch_inferior_registers): Likewise.
(shnbsd_store_inferior_registers): Likewise.
* sol-thread.c (sol_thread_fetch_registers): Likewise.
(sol_thread_store_registers): Likewise.
* sparc-nat.c (fetch_inferior_registers): Likewise.
(store_inferior_registers): Likewise.
* spu-linux-nat.c (spu_fetch_inferior_registers): Likewise.
(spu_store_inferior_registers): Likewise.
* target.c (debug_print_register): Likewise.
(debug_to_fetch_registers, debug_to_store_registers): Likewise.
* vaxbsd-nat.c (vaxbsd_fetch_inferior_registers): Likewise.
(vaxbsd_store_inferior_registers): Likewise.
* win32-nat.c (do_win32_fetch_inferior_registers): Likewise.
(win32_fetch_inferior_registers): Likewise.
(win32_store_inferior_registers): Likewise.
2007-05-06 16:34:38 +02:00
|
|
|
|
hppabsd_collect_gregset (regcache, ®s, regnum);
|
2004-06-26 12:06:35 +02:00
|
|
|
|
|
2013-09-30 13:50:12 +02:00
|
|
|
|
if (ptrace (PT_SETREGS, ptid_get_pid (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-02-11 Andrew Cagney <cagney@gnu.org>
Mark up error_no_arg, query, perror_with_name, complaint, and
internal_error.
* breakpoint.c, cp-abi.c, cp-namespace.c, cp-support.c: Update.
* cris-tdep.c, dbxread.c, dictionary.c, dsrec.c: Update.
* dummy-frame.c, dve3900-rom.c, dwarf2-frame.c, dwarf2expr.c: Update.
* dwarf2read.c, dwarfread.c, elfread.c, event-loop.c: Update.
* exceptions.c, exec.c, f-lang.c, findvar.c, fork-child.c: Update.
* frame-unwind.c, frame.c, frv-linux-tdep.c, frv-tdep.c: Update.
* gdb_assert.h, gdbarch.c, gdbtypes.c, gnu-nat.c: Update.
* go32-nat.c, hppa-tdep.c, hppabsd-nat.c, hpread.c: Update.
* i386-linux-nat.c, i386-nat.c, i386-tdep.c, i386bsd-nat.c: Update.
* i386fbsd-nat.c, inf-ptrace.c, inf-ttrace.c, infcall.c: Update.
* infcmd.c, inflow.c, infptrace.c, infrun.c, inftarg.c: Update.
* interps.c, language.c, linespec.c, linux-nat.c: Update.
* m32r-linux-nat.c, m68k-tdep.c, m68kbsd-nat.c: Update.
* m68klinux-nat.c, m88kbsd-nat.c, macroexp.c, macroscope.c: Update.
* macrotab.c, maint.c, mdebugread.c, memattr.c: Update.
* mips-linux-tdep.c, mips-tdep.c, mips64obsd-nat.c: Update.
* mipsnbsd-nat.c, mn10300-tdep.c, monitor.c, nto-procfs.c: Update.
* objc-lang.c, objfiles.c, objfiles.h, ocd.c, osabi.c: Update.
* parse.c, ppc-bdm.c, ppc-linux-nat.c, ppc-sysv-tdep.c: Update.
* ppcnbsd-nat.c, ppcobsd-nat.c, printcmd.c, procfs.c: Update.
* regcache.c, reggroups.c, remote-e7000.c, remote-mips.c: Update.
* remote-rdp.c, remote-sds.c, remote-sim.c, remote-st.c: Update.
* remote-utils.c, remote.c, rs6000-nat.c, rs6000-tdep.c: Update.
* s390-nat.c, s390-tdep.c, sentinel-frame.c, serial.c: Update.
* sh-tdep.c, sh3-rom.c, sh64-tdep.c, shnbsd-nat.c: Update.
* solib-aix5.c, solib-svr4.c, solib.c, source.c: Update.
* sparc-nat.c, stabsread.c, stack.c, symfile.c, symtab.c: Update.
* symtab.h, target.c, tracepoint.c, ui-file.c, ui-out.c: Update.
* utils.c, valops.c, valprint.c, vax-nat.c, vaxbsd-nat.c: Update.
* win32-nat.c, xcoffread.c, xstormy16-tdep.c: Update.
* cli/cli-cmds.c, cli/cli-logging.c, cli/cli-script.c: Update.
* cli/cli-setshow.c, mi/mi-cmd-break.c, mi/mi-cmds.c: Update.
* mi/mi-console.c, mi/mi-getopt.c, mi/mi-out.c: Update.
* tui/tui-file.c, tui/tui-interp.c: Update.
2005-02-11 19:13:55 +01:00
|
|
|
|
perror_with_name (_("Couldn't write registers"));
|
2004-06-26 12:06:35 +02:00
|
|
|
|
}
|
* hppa-tdep.h (enum hppa_regnum): Add HPPA_FP31R_REGNUM.
* hppabsd-nat.c (hppabsd_fpregset_supplies_p)
(hppabsd_supply_fpregset, hppabsd_collect_fpregset): New
functions.
(hppabsd_fetch_registers, hppabsd_store_registers): Handle
floating-point registers.
print_scalar_formatted (valaddr, type, format, 0, stream);
val_print_type_code_flags (type, valaddr, stream);
print_scalar_formatted (valaddr + embedded_offset, type, format, 0, stream);
val_print_type_code_flags (type, valaddr + embedded_offset, stream);
for (reg = 16; reg < 31; reg++)
/* We may have to apply a StackGhost cookie. */
fs->regs.reg[31].how = DWARF2_FRAME_REG_SAVED_WCOOKIE;
fs->regs.reg[31].loc.offset = 15 * size;
int regnum;
buf, 0, size);
{
ULONGEST wcookie = extract_unsigned_integer (buf, len);
gdb_assert (len == size);
*lvalp = not_lval;
*addrp = 0;
if (valuep)
{
ULONGEST value = extract_unsigned_integer (valuep, size);
store_unsigned_integer (valuep, size, value ^ wcookie);
}
}
apply StackGhost cookie. */
print_scalar_formatted (valaddr, type, format, 0, stream);
val_print_type_code_flags (type, valaddr, stream);
|| (TYPE_CODE (t) == TYPE_CODE_FLAGS)
case TYPE_CODE_FLAGS:
case TYPE_CODE_FLAGS:
void *fpregs, int regnum)
{
regcache_raw_collect (regcache, i, regs);
regcache_raw_collect (regcache, i + 1, regs + 4);
}
(PTRACE_TYPE_ARG3) &fpregs, 0) == -1)
perror_with_name (_("Couldn't get floating point status"));
(PTRACE_TYPE_ARG3) &fpregs, 0) == -1)
perror_with_name (_("Couldn't get floating point status"));
(PTRACE_TYPE_ARG3) &fpregs, 0) == -1)
perror_with_name (_("Couldn't write floating point status"));
print_scalar_formatted (valaddr + embedded_offset, type, format, 0, stream);
val_print_type_code_flags (type, valaddr + embedded_offset, stream);
|| regnum == PC_REGNUM);
|| regnum == tdep->ppc_fpscr_regnum);
regnum, ®s, sizeof regs);
regnum, &fpregs, sizeof fpregs);
regnum, ®s, sizeof regs);
regnum, &fpregs, sizeof fpregs);
const char *sect_name, size_t sect_size)
struct regcache *regcache, gdb_byte *readbuf,
const gdb_byte *writebuf)
if (lr_reg == -1)
{
/* bcl 20,xx,.+4 is used to get the current PC, with or without
prediction bits. If the LR has already been saved, we can
skip it. */
continue;
}
extract_unsigned_integer ((gdb_byte *)&(MEMBER), sizeof (MEMBER))
builtin_type_void_data_ptr);
lmo->r_version_size);
builtin_type_void_data_ptr);
lm = ldsomap = solib_svr4_r_ldsomap ();
|| (X_I (insn) == 1 && X_RS1 (insn) == 0 && (insn & 0x7f) == 0))
{
/* OpenBSD system call. */
ULONGEST number;
regcache_cooked_read_unsigned (current_regcache,
SPARC_G1_REGNUM, &number);
if (number & 0x400)
return sparc_address_from_register (SPARC_G2_REGNUM);
if (number & 0x800)
return sparc_address_from_register (SPARC_G7_REGNUM);
}
gdb_byte *buffer;
gdb_byte *check = xmalloc (len);
(unsigned int *)cache_ovly_table, cache_novlys * 4);
cache_ovly_table[i], 4);
error (_(""%s" exists in this program but is not a function."),
name);
return value_of_variable (sym, NULL);
struct ui_file *stream)
{
if (TYPE_FIELD_NAME (type, bitpos))
fprintf_filtered (stream, "%s ", TYPE_FIELD_NAME (type, bitpos));
else
fprintf_filtered (stream, "#%d ", bitpos);
}
const gdb_byte *valaddr,
struct ui_file *stream);
i386-sol2-tdep.o sol2-tdep.o corelow.o solib.o solib-svr4.o
sol2-tdep.o solib.o solib-svr4.o
2006-01-14 13:24:36 +01:00
|
|
|
|
|
|
|
|
|
if (regnum == -1 || hppabsd_fpregset_supplies_p (regnum))
|
|
|
|
|
{
|
|
|
|
|
struct fpreg fpregs;
|
|
|
|
|
|
2013-09-30 13:50:12 +02:00
|
|
|
|
if (ptrace (PT_GETFPREGS, ptid_get_pid (inferior_ptid),
|
* hppa-tdep.h (enum hppa_regnum): Add HPPA_FP31R_REGNUM.
* hppabsd-nat.c (hppabsd_fpregset_supplies_p)
(hppabsd_supply_fpregset, hppabsd_collect_fpregset): New
functions.
(hppabsd_fetch_registers, hppabsd_store_registers): Handle
floating-point registers.
print_scalar_formatted (valaddr, type, format, 0, stream);
val_print_type_code_flags (type, valaddr, stream);
print_scalar_formatted (valaddr + embedded_offset, type, format, 0, stream);
val_print_type_code_flags (type, valaddr + embedded_offset, stream);
for (reg = 16; reg < 31; reg++)
/* We may have to apply a StackGhost cookie. */
fs->regs.reg[31].how = DWARF2_FRAME_REG_SAVED_WCOOKIE;
fs->regs.reg[31].loc.offset = 15 * size;
int regnum;
buf, 0, size);
{
ULONGEST wcookie = extract_unsigned_integer (buf, len);
gdb_assert (len == size);
*lvalp = not_lval;
*addrp = 0;
if (valuep)
{
ULONGEST value = extract_unsigned_integer (valuep, size);
store_unsigned_integer (valuep, size, value ^ wcookie);
}
}
apply StackGhost cookie. */
print_scalar_formatted (valaddr, type, format, 0, stream);
val_print_type_code_flags (type, valaddr, stream);
|| (TYPE_CODE (t) == TYPE_CODE_FLAGS)
case TYPE_CODE_FLAGS:
case TYPE_CODE_FLAGS:
void *fpregs, int regnum)
{
regcache_raw_collect (regcache, i, regs);
regcache_raw_collect (regcache, i + 1, regs + 4);
}
(PTRACE_TYPE_ARG3) &fpregs, 0) == -1)
perror_with_name (_("Couldn't get floating point status"));
(PTRACE_TYPE_ARG3) &fpregs, 0) == -1)
perror_with_name (_("Couldn't get floating point status"));
(PTRACE_TYPE_ARG3) &fpregs, 0) == -1)
perror_with_name (_("Couldn't write floating point status"));
print_scalar_formatted (valaddr + embedded_offset, type, format, 0, stream);
val_print_type_code_flags (type, valaddr + embedded_offset, stream);
|| regnum == PC_REGNUM);
|| regnum == tdep->ppc_fpscr_regnum);
regnum, ®s, sizeof regs);
regnum, &fpregs, sizeof fpregs);
regnum, ®s, sizeof regs);
regnum, &fpregs, sizeof fpregs);
const char *sect_name, size_t sect_size)
struct regcache *regcache, gdb_byte *readbuf,
const gdb_byte *writebuf)
if (lr_reg == -1)
{
/* bcl 20,xx,.+4 is used to get the current PC, with or without
prediction bits. If the LR has already been saved, we can
skip it. */
continue;
}
extract_unsigned_integer ((gdb_byte *)&(MEMBER), sizeof (MEMBER))
builtin_type_void_data_ptr);
lmo->r_version_size);
builtin_type_void_data_ptr);
lm = ldsomap = solib_svr4_r_ldsomap ();
|| (X_I (insn) == 1 && X_RS1 (insn) == 0 && (insn & 0x7f) == 0))
{
/* OpenBSD system call. */
ULONGEST number;
regcache_cooked_read_unsigned (current_regcache,
SPARC_G1_REGNUM, &number);
if (number & 0x400)
return sparc_address_from_register (SPARC_G2_REGNUM);
if (number & 0x800)
return sparc_address_from_register (SPARC_G7_REGNUM);
}
gdb_byte *buffer;
gdb_byte *check = xmalloc (len);
(unsigned int *)cache_ovly_table, cache_novlys * 4);
cache_ovly_table[i], 4);
error (_(""%s" exists in this program but is not a function."),
name);
return value_of_variable (sym, NULL);
struct ui_file *stream)
{
if (TYPE_FIELD_NAME (type, bitpos))
fprintf_filtered (stream, "%s ", TYPE_FIELD_NAME (type, bitpos));
else
fprintf_filtered (stream, "#%d ", bitpos);
}
const gdb_byte *valaddr,
struct ui_file *stream);
i386-sol2-tdep.o sol2-tdep.o corelow.o solib.o solib-svr4.o
sol2-tdep.o solib.o solib-svr4.o
2006-01-14 13:24:36 +01:00
|
|
|
|
(PTRACE_TYPE_ARG3) &fpregs, 0) == -1)
|
|
|
|
|
perror_with_name (_("Couldn't get floating point status"));
|
|
|
|
|
|
* target.h (struct regcache): Add forward declaration.
(struct target_ops): Add REGCACHE parameter to to_fetch_registers
and to_store_registers target operations.
(target_fetch_registers, target_store_registers): Update.
* regcache.c (regcache_raw_read): Replace register_cached by
regcache_valid_p. Pass regcache to target_fetch_registers.
(regcache_raw_write): Pass regcache to target_store_registers.
* arm-linux-nat.c (store_fpregister, store_fpregs, store_register,
store_regs, store_wmmx_regs): Replace register_cached by
regcache_valid_p.
* bsd-kvm.c (bsd_kvm_open, bsd_kvm_proc_cmd): Pass current_regcache
to target_fetch_registers calls.
* corelow.c (core_open): Likewise.
* linux-nat.c (linux_nat_corefile_thread_callback): Likewise.
* proc-service.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
ps_lsetfpregs): Likewise.
* sol-thread.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
ps_lsetfpregs): Likewise.
* win32-nat.c (win32_resume): Likewise.
* ia64-tdep.c (ia64_store_return_value): Pass current_regcache
to target_store_registers call.
* rs6000-tdep.c (rs6000_push_dummy_call): Likewise.
* inferior.h (store_inferior_registers): Update prototype.
(fetch_inferior_registers): Likewise.
* gnu-nat.c (gnu_store_registers, gnu_fetch_registers): Likewise.
* mips-linux-nat.c (super_fetch_registers, super_store_registers):
Update function pointer signatures.
* aix-thread.c (aix_thread_fetch_registers): Add REGCACHE parameter,
use it instead of current_regcache, update calls.
(aix_thread_store_registers): Likewise.
* alphabsd-nat.c (alphabsd_fetch_inferior_registers): Likewise.
(alphabsd_store_inferior_registers): Likewise.
* amd64bsd-nat.c (amd64bsd_fetch_inferior_registers): Likewise.
(amd64bsd_store_inferior_registers): Likewise.
* amd64-linux-nat.c (amd64_linux_fetch_inferior_registers): Likewise.
(amd64_linux_store_inferior_registers): Likewise.
* arm-linux-nat.c (fetch_fpregister, fetch_fpregs, store_fpregister,
store_fpregs, fetch_register, fetch_regs, store_register, store_regs,
fetch_wmmx_regs, store_wmmx_regs): Likewise.
(arm_linux_fetch_inferior_registers): Likewise.
(arm_linux_store_inferior_registers): Likewise.
* armnbsd-nat.c (fetch_register, fetch_regs, fetch_fp_register,
fetch_fp_regs, armnbsd_fetch_registers): Likewise.
(store_register, store_regs, store_fp_register, store_fp_regs,
armnbsd_store_registers): Likewise.
* bsd-kvm.c (bsd_kvm_fetch_pcb, bsd_kvm_fetch_registers): Likewise.
* bsd-uthread.c (bsd_uthread_fetch_registers): Likewise.
(bsd_uthread_store_registers): Likewise.
* corelow.c (get_core_registers): Likewise.
* go32-nat.c (fetch_register, go32_fetch_registers, store_register,
go32_store_registers): Likewise.
* hppabsd-nat.c (hppabsd_fetch_registers): Likewise.
(hppabsd_store_registers): Likewise.
* hppa-hpux-nat.c (hppa_hpux_fetch_register): Likewise.
(hppa_hpux_fetch_inferior_registers): Likewise.
(hppa_hpux_store_register): Likewise.
(hppa_hpux_store_inferior_registers): Likewise.
* hppa-linux-nat.c (fetch_register, store_register): Likewise.
(hppa_linux_fetch_inferior_registers): Likewise.
(hppa_linux_store_inferior_registers): Likewise.
* hpux-thread.c (hpux_thread_fetch_registers): Likewise.
(hpux_thread_store_registers): Likewise.
* i386bsd-nat.c (i386bsd_fetch_inferior_registers): Likewise.
(i386bsd_store_inferior_registers): Likewise.
* i386gnu-nat.c (fetch_fpregs, gnu_fetch_registers, store_fpregs,
gnu_store_registers): Likewise.
* i386-linux-nat.c (fetch_register, store_register, fetch_regs,
store_regs, fetch_fpregs, store_fpregs, fetch_fpxregs, store_fpxregs):
Likewise.
(i386_linux_fetch_inferior_registers): Likewise.
(i386_linux_store_inferior_registers): Likewise.
* ia64-linux-nat.c (ia64_linux_fetch_register): Likewise.
(ia64_linux_fetch_registers): Likewise.
(ia64_linux_store_register): Likewise.
(ia64_linux_store_registers): Likewise.
* inf-child.c (inf_child_fetch_inferior_registers): Likewise.
(inf_child_store_inferior_registers): Likewise.
* inf-ptrace.c (inf_ptrace_fetch_register): Likewise.
(inf_ptrace_fetch_registers): Likewise.
(inf_ptrace_store_register): Likewise.
(inf_ptrace_store_registers): Likewise.
* infptrace.c (fetch_register, store_register): Likewise.
(fetch_inferior_registers, store_inferior_registers): Likewise.
* m32r-linux-nat.c (fetch_regs, store_regs): Likewise.
(m32r_linux_fetch_inferior_registers): Likewise.
(m32r_linux_store_inferior_registers): Likewise.
* m68kbsd-nat.c (m68kbsd_fetch_inferior_registers): Likewise.
(m68kbsd_store_inferior_registers): Likewise.
* m68klinux-nat.c (fetch_register, old_fetch_inferior_registers,
store_register, old_store_inferior_registers, fetch_regs, store_regs,
fetch_fpregs, store_fpregs): Likewise.
(m68k_linux_fetch_inferior_registers): Likewise.
(m68k_linux_store_inferior_registers): Likewise.
* m88kbsd-nat.c (m88kbsd_fetch_inferior_registers): Likewise.
(m88kbsd_store_inferior_registers): Likewise.
* mips64obsd-nat.c (mips64obsd_fetch_inferior_registers): Likewise.
(mips64obsd_store_inferior_registers): Likewise.
* mips-linux-nat.c (mips64_linux_regsets_fetch_registers): Likewise.
(mips64_linux_regsets_store_registers): Likewise.
(mips64_linux_fetch_registers): Likewise.
(mips64_linux_store_registers): Likewise.
* mipsnbsd-nat.c (mipsnbsd_fetch_inferior_registers): Likewise.
(mipsnbsd_store_inferior_registers): Likewise.
* monitor.c (monitor_fetch_register, monitor_store_register): Likewise.
(monitor_fetch_registers, monitor_store_registers): Likewise.
* nto-procfs.c (procfs_fetch_registers): Likewise.
(procfs_store_registers): Likewise.
* ppc-linux-nat.c (fetch_altivec_register, fetch_spe_register,
fetch_register, supply_vrregset, fetch_altivec_registers,
fetch_ppc_registers, ppc_linux_fetch_inferior_registers): Likewise.
(store_altivec_register, store_spe_register, store_register,
fill_vrregset, store_altivec_registers, store_ppc_registers,
ppc_linux_store_inferior_registers): Likewise.
* ppcnbsd-nat.c (ppcnbsd_fetch_inferior_registers): Likewise.
(ppcnbsd_store_inferior_registers): Likewise.
* ppcobsd-nat.c (ppcobsd_fetch_registers): Likewise.
(ppcobsd_store_registers): Likewise.
* procfs.c (procfs_fetch_registers, procfs_store_registers): Likewise.
* remote.c (fetch_register_using_p, process_g_packet,
fetch_registers_using_g, remote_fetch_registers): Likewise.
(store_register_using_P, store_registers_using_G,
remote_store_registers): Likewise.
* remote-m32r-sdi.c (m32r_fetch_registers, m32r_fetch_register,
m32r_store_register, m32r_store_register): Likewise.
* remote-mips.c (mips_fetch_registers, mips_store_registers): Likewise.
* remote-sim.c (gdbsim_fetch_register): Likewise.
(gdbsim_store_register): Likewise.
* rs6000-nat.c (fetch_register, store_register): Likewise.
(rs6000_fetch_inferior_registers): Likewise.
(rs6000_store_inferior_registers): Likewise.
* s390-nat.c (fetch_regs, store_regs): Likewise.
(fetch_fpregs, store_fpregs): Likewise.
(s390_linux_fetch_inferior_registers): Likewise.
(s390_linux_store_inferior_registers): Likewise.
* shnbsd-nat.c (shnbsd_fetch_inferior_registers): Likewise.
(shnbsd_store_inferior_registers): Likewise.
* sol-thread.c (sol_thread_fetch_registers): Likewise.
(sol_thread_store_registers): Likewise.
* sparc-nat.c (fetch_inferior_registers): Likewise.
(store_inferior_registers): Likewise.
* spu-linux-nat.c (spu_fetch_inferior_registers): Likewise.
(spu_store_inferior_registers): Likewise.
* target.c (debug_print_register): Likewise.
(debug_to_fetch_registers, debug_to_store_registers): Likewise.
* vaxbsd-nat.c (vaxbsd_fetch_inferior_registers): Likewise.
(vaxbsd_store_inferior_registers): Likewise.
* win32-nat.c (do_win32_fetch_inferior_registers): Likewise.
(win32_fetch_inferior_registers): Likewise.
(win32_store_inferior_registers): Likewise.
2007-05-06 16:34:38 +02:00
|
|
|
|
hppabsd_collect_fpregset (regcache, &fpregs, regnum);
|
* hppa-tdep.h (enum hppa_regnum): Add HPPA_FP31R_REGNUM.
* hppabsd-nat.c (hppabsd_fpregset_supplies_p)
(hppabsd_supply_fpregset, hppabsd_collect_fpregset): New
functions.
(hppabsd_fetch_registers, hppabsd_store_registers): Handle
floating-point registers.
print_scalar_formatted (valaddr, type, format, 0, stream);
val_print_type_code_flags (type, valaddr, stream);
print_scalar_formatted (valaddr + embedded_offset, type, format, 0, stream);
val_print_type_code_flags (type, valaddr + embedded_offset, stream);
for (reg = 16; reg < 31; reg++)
/* We may have to apply a StackGhost cookie. */
fs->regs.reg[31].how = DWARF2_FRAME_REG_SAVED_WCOOKIE;
fs->regs.reg[31].loc.offset = 15 * size;
int regnum;
buf, 0, size);
{
ULONGEST wcookie = extract_unsigned_integer (buf, len);
gdb_assert (len == size);
*lvalp = not_lval;
*addrp = 0;
if (valuep)
{
ULONGEST value = extract_unsigned_integer (valuep, size);
store_unsigned_integer (valuep, size, value ^ wcookie);
}
}
apply StackGhost cookie. */
print_scalar_formatted (valaddr, type, format, 0, stream);
val_print_type_code_flags (type, valaddr, stream);
|| (TYPE_CODE (t) == TYPE_CODE_FLAGS)
case TYPE_CODE_FLAGS:
case TYPE_CODE_FLAGS:
void *fpregs, int regnum)
{
regcache_raw_collect (regcache, i, regs);
regcache_raw_collect (regcache, i + 1, regs + 4);
}
(PTRACE_TYPE_ARG3) &fpregs, 0) == -1)
perror_with_name (_("Couldn't get floating point status"));
(PTRACE_TYPE_ARG3) &fpregs, 0) == -1)
perror_with_name (_("Couldn't get floating point status"));
(PTRACE_TYPE_ARG3) &fpregs, 0) == -1)
perror_with_name (_("Couldn't write floating point status"));
print_scalar_formatted (valaddr + embedded_offset, type, format, 0, stream);
val_print_type_code_flags (type, valaddr + embedded_offset, stream);
|| regnum == PC_REGNUM);
|| regnum == tdep->ppc_fpscr_regnum);
regnum, ®s, sizeof regs);
regnum, &fpregs, sizeof fpregs);
regnum, ®s, sizeof regs);
regnum, &fpregs, sizeof fpregs);
const char *sect_name, size_t sect_size)
struct regcache *regcache, gdb_byte *readbuf,
const gdb_byte *writebuf)
if (lr_reg == -1)
{
/* bcl 20,xx,.+4 is used to get the current PC, with or without
prediction bits. If the LR has already been saved, we can
skip it. */
continue;
}
extract_unsigned_integer ((gdb_byte *)&(MEMBER), sizeof (MEMBER))
builtin_type_void_data_ptr);
lmo->r_version_size);
builtin_type_void_data_ptr);
lm = ldsomap = solib_svr4_r_ldsomap ();
|| (X_I (insn) == 1 && X_RS1 (insn) == 0 && (insn & 0x7f) == 0))
{
/* OpenBSD system call. */
ULONGEST number;
regcache_cooked_read_unsigned (current_regcache,
SPARC_G1_REGNUM, &number);
if (number & 0x400)
return sparc_address_from_register (SPARC_G2_REGNUM);
if (number & 0x800)
return sparc_address_from_register (SPARC_G7_REGNUM);
}
gdb_byte *buffer;
gdb_byte *check = xmalloc (len);
(unsigned int *)cache_ovly_table, cache_novlys * 4);
cache_ovly_table[i], 4);
error (_(""%s" exists in this program but is not a function."),
name);
return value_of_variable (sym, NULL);
struct ui_file *stream)
{
if (TYPE_FIELD_NAME (type, bitpos))
fprintf_filtered (stream, "%s ", TYPE_FIELD_NAME (type, bitpos));
else
fprintf_filtered (stream, "#%d ", bitpos);
}
const gdb_byte *valaddr,
struct ui_file *stream);
i386-sol2-tdep.o sol2-tdep.o corelow.o solib.o solib-svr4.o
sol2-tdep.o solib.o solib-svr4.o
2006-01-14 13:24:36 +01:00
|
|
|
|
|
2013-09-30 13:50:12 +02:00
|
|
|
|
if (ptrace (PT_SETFPREGS, ptid_get_pid (inferior_ptid),
|
* hppa-tdep.h (enum hppa_regnum): Add HPPA_FP31R_REGNUM.
* hppabsd-nat.c (hppabsd_fpregset_supplies_p)
(hppabsd_supply_fpregset, hppabsd_collect_fpregset): New
functions.
(hppabsd_fetch_registers, hppabsd_store_registers): Handle
floating-point registers.
print_scalar_formatted (valaddr, type, format, 0, stream);
val_print_type_code_flags (type, valaddr, stream);
print_scalar_formatted (valaddr + embedded_offset, type, format, 0, stream);
val_print_type_code_flags (type, valaddr + embedded_offset, stream);
for (reg = 16; reg < 31; reg++)
/* We may have to apply a StackGhost cookie. */
fs->regs.reg[31].how = DWARF2_FRAME_REG_SAVED_WCOOKIE;
fs->regs.reg[31].loc.offset = 15 * size;
int regnum;
buf, 0, size);
{
ULONGEST wcookie = extract_unsigned_integer (buf, len);
gdb_assert (len == size);
*lvalp = not_lval;
*addrp = 0;
if (valuep)
{
ULONGEST value = extract_unsigned_integer (valuep, size);
store_unsigned_integer (valuep, size, value ^ wcookie);
}
}
apply StackGhost cookie. */
print_scalar_formatted (valaddr, type, format, 0, stream);
val_print_type_code_flags (type, valaddr, stream);
|| (TYPE_CODE (t) == TYPE_CODE_FLAGS)
case TYPE_CODE_FLAGS:
case TYPE_CODE_FLAGS:
void *fpregs, int regnum)
{
regcache_raw_collect (regcache, i, regs);
regcache_raw_collect (regcache, i + 1, regs + 4);
}
(PTRACE_TYPE_ARG3) &fpregs, 0) == -1)
perror_with_name (_("Couldn't get floating point status"));
(PTRACE_TYPE_ARG3) &fpregs, 0) == -1)
perror_with_name (_("Couldn't get floating point status"));
(PTRACE_TYPE_ARG3) &fpregs, 0) == -1)
perror_with_name (_("Couldn't write floating point status"));
print_scalar_formatted (valaddr + embedded_offset, type, format, 0, stream);
val_print_type_code_flags (type, valaddr + embedded_offset, stream);
|| regnum == PC_REGNUM);
|| regnum == tdep->ppc_fpscr_regnum);
regnum, ®s, sizeof regs);
regnum, &fpregs, sizeof fpregs);
regnum, ®s, sizeof regs);
regnum, &fpregs, sizeof fpregs);
const char *sect_name, size_t sect_size)
struct regcache *regcache, gdb_byte *readbuf,
const gdb_byte *writebuf)
if (lr_reg == -1)
{
/* bcl 20,xx,.+4 is used to get the current PC, with or without
prediction bits. If the LR has already been saved, we can
skip it. */
continue;
}
extract_unsigned_integer ((gdb_byte *)&(MEMBER), sizeof (MEMBER))
builtin_type_void_data_ptr);
lmo->r_version_size);
builtin_type_void_data_ptr);
lm = ldsomap = solib_svr4_r_ldsomap ();
|| (X_I (insn) == 1 && X_RS1 (insn) == 0 && (insn & 0x7f) == 0))
{
/* OpenBSD system call. */
ULONGEST number;
regcache_cooked_read_unsigned (current_regcache,
SPARC_G1_REGNUM, &number);
if (number & 0x400)
return sparc_address_from_register (SPARC_G2_REGNUM);
if (number & 0x800)
return sparc_address_from_register (SPARC_G7_REGNUM);
}
gdb_byte *buffer;
gdb_byte *check = xmalloc (len);
(unsigned int *)cache_ovly_table, cache_novlys * 4);
cache_ovly_table[i], 4);
error (_(""%s" exists in this program but is not a function."),
name);
return value_of_variable (sym, NULL);
struct ui_file *stream)
{
if (TYPE_FIELD_NAME (type, bitpos))
fprintf_filtered (stream, "%s ", TYPE_FIELD_NAME (type, bitpos));
else
fprintf_filtered (stream, "#%d ", bitpos);
}
const gdb_byte *valaddr,
struct ui_file *stream);
i386-sol2-tdep.o sol2-tdep.o corelow.o solib.o solib-svr4.o
sol2-tdep.o solib.o solib-svr4.o
2006-01-14 13:24:36 +01:00
|
|
|
|
(PTRACE_TYPE_ARG3) &fpregs, 0) == -1)
|
|
|
|
|
perror_with_name (_("Couldn't write floating point status"));
|
|
|
|
|
}
|
2004-06-26 12:06:35 +02:00
|
|
|
|
}
|
2005-04-18 00:20:20 +02:00
|
|
|
|
|
|
|
|
|
/* Provide a prototype to silence -Wmissing-prototypes. */
|
|
|
|
|
void _initialize_hppabsd_nat (void);
|
|
|
|
|
|
|
|
|
|
void
|
|
|
|
|
_initialize_hppabsd_nat (void)
|
|
|
|
|
{
|
|
|
|
|
struct target_ops *t;
|
|
|
|
|
|
|
|
|
|
/* Add in local overrides. */
|
|
|
|
|
t = inf_ptrace_target ();
|
|
|
|
|
t->to_fetch_registers = hppabsd_fetch_registers;
|
|
|
|
|
t->to_store_registers = hppabsd_store_registers;
|
|
|
|
|
add_target (t);
|
|
|
|
|
}
|