1999-04-16 03:35:26 +02:00
|
|
|
|
/* Low level DECstation interface to ptrace, for GDB when running native.
|
2001-03-06 09:22:02 +01:00
|
|
|
|
Copyright 1988, 1989, 1991, 1992, 1993, 1995, 1996, 1999, 2000, 2001
|
|
|
|
|
Free Software Foundation, Inc.
|
1999-04-16 03:35:26 +02:00
|
|
|
|
Contributed by Alessandro Forin(af@cs.cmu.edu) at CMU
|
|
|
|
|
and by Per Bothner(bothner@cs.wisc.edu) at U.Wisconsin.
|
|
|
|
|
|
1999-07-07 22:19:36 +02:00
|
|
|
|
This file is part of GDB.
|
1999-04-16 03:35:26 +02:00
|
|
|
|
|
1999-07-07 22:19:36 +02:00
|
|
|
|
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.
|
1999-04-16 03:35:26 +02:00
|
|
|
|
|
1999-07-07 22:19:36 +02:00
|
|
|
|
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.
|
1999-04-16 03:35:26 +02:00
|
|
|
|
|
1999-07-07 22:19:36 +02:00
|
|
|
|
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. */
|
1999-04-16 03:35:26 +02:00
|
|
|
|
|
|
|
|
|
#include "defs.h"
|
|
|
|
|
#include "inferior.h"
|
|
|
|
|
#include "gdbcore.h"
|
2001-03-01 02:39:22 +01:00
|
|
|
|
#include "regcache.h"
|
1999-04-16 03:35:26 +02:00
|
|
|
|
#include <sys/ptrace.h>
|
|
|
|
|
#include <sys/types.h>
|
|
|
|
|
#include <sys/param.h>
|
|
|
|
|
#include <sys/user.h>
|
|
|
|
|
#undef JB_S0
|
|
|
|
|
#undef JB_S1
|
|
|
|
|
#undef JB_S2
|
|
|
|
|
#undef JB_S3
|
|
|
|
|
#undef JB_S4
|
|
|
|
|
#undef JB_S5
|
|
|
|
|
#undef JB_S6
|
|
|
|
|
#undef JB_S7
|
|
|
|
|
#undef JB_SP
|
|
|
|
|
#undef JB_S8
|
|
|
|
|
#undef JB_PC
|
|
|
|
|
#undef JB_SR
|
|
|
|
|
#undef NJBREGS
|
|
|
|
|
#include <setjmp.h> /* For JB_XXX. */
|
|
|
|
|
|
|
|
|
|
/* Size of elements in jmpbuf */
|
|
|
|
|
|
|
|
|
|
#define JB_ELEMENT_SIZE 4
|
|
|
|
|
|
|
|
|
|
/* Map gdb internal register number to ptrace ``address''.
|
|
|
|
|
These ``addresses'' are defined in DECstation <sys/ptrace.h> */
|
|
|
|
|
|
2003-05-21 01:54:34 +02:00
|
|
|
|
static int
|
|
|
|
|
register_ptrace_addr (int regno)
|
|
|
|
|
{
|
|
|
|
|
return (regno < 32 ? GPR_BASE + regno
|
2003-11-16 Andrew Cagney <cagney@redhat.com>
* mips-tdep.c (struct gdbarch_tdep): Add field "regnum".
(mips_fpa0_regnum, mips_regnum): New function.
(mips_gdbarch_init): Fill in the "regnum" fields.
* mips-tdep.h (struct mips_regnum): Define.
(mips_regnum): Declare.
* config/mips/tm-mips.h (BADVADDR_REGNUM): Delete macro.
(LO_REGNUM, HI_REGNUM, BADVADDR_REGNUM): Ditto.
(CAUSE_REGNUM, PC_REGNUM, FP0_REGNUM): Ditto.
(FCRCS_REGNUM, FCRIR_REGNUM, FPA0_REGNUM): Ditto.
* config/mips/tm-irix6.h (FP0_REGNUM): Delete macro.
(PC_REGNUM, CAUSE_REGNUM, BADVADDR_REGNUM): Ditto.
(HI_REGNUM, LO_REGNUM, FCRCS_REGNUM, FCRIR_REGNUM): Ditto.
* config/mips/tm-irix5.h (FP0_REGNUM): Delete macro.
(PC_REGNUM, CAUSE_REGNUM, BADVADDR_REGNUM): Ditto.
(HI_REGNUM, LO_REGNUM, FCRCS_REGNUM, FCRIR_REGNUM): Ditto.
* remote-mips.c: Include "mips-tdep.h". Update.
* mipsnbsd-tdep.c: Update.
* mipsv4-nat.c: Update.
* mips-tdep.c: Update.
* mips-nat.c: Update.
* mips-linux-tdep.c: Update.
* mips-linux-nat.c: Update.
* irix5-nat.c: Update.
* dve3900-rom.c: Include "mips-tdep.h". Update.
(ignore_packet): Supress GCC warning.
* config/mips/nm-riscos.h: Update.
* Makefile.in (dve3900-rom.o, remote-mips.o): Update dependencies.
2003-11-16 20:24:05 +01:00
|
|
|
|
: regno == mips_regnum (current_gdbarch)->pc ? PC
|
|
|
|
|
: regno == mips_regnum (current_gdbarch)->cause ? CAUSE
|
|
|
|
|
: regno == mips_regnum (current_gdbarch)->hi ? MMHI
|
|
|
|
|
: regno == mips_regnum (current_gdbarch)->lo ? MMLO
|
|
|
|
|
: regno == mips_regnum (current_gdbarch)->fp_control_status ? FPC_CSR
|
|
|
|
|
: regno == mips_regnum (current_gdbarch)->fp_implementation_revision ? FPC_EIR
|
2003-05-21 01:54:34 +02:00
|
|
|
|
: regno >= FP0_REGNUM ? FPR_BASE + (regno - FP0_REGNUM)
|
|
|
|
|
: 0);
|
|
|
|
|
}
|
1999-04-16 03:35:26 +02:00
|
|
|
|
|
2000-05-28 03:12:42 +02:00
|
|
|
|
static void fetch_core_registers (char *, unsigned, int, CORE_ADDR);
|
1999-04-16 03:35:26 +02:00
|
|
|
|
|
|
|
|
|
/* Get all registers from the inferior */
|
|
|
|
|
|
|
|
|
|
void
|
2000-07-30 03:48:28 +02:00
|
|
|
|
fetch_inferior_registers (int regno)
|
1999-04-16 03:35:26 +02:00
|
|
|
|
{
|
2003-09-14 Andrew Cagney <cagney@redhat.com>
* alpha-nat.c: Remove some occurances of "register".
* alpha-tdep.c, arm-tdep.c, blockframe.c, breakpoint.c: Ditto.
* buildsym.c, c-typeprint.c, c-valprint.c, coffread.c: Ditto.
* corefile.c, cp-support.c, cp-valprint.c, cris-tdep.c: Ditto.
* dbxread.c, dcache.c, dwarf2read.c, elfread.c: Ditto.
* environ.c, eval.c, event-top.c, f-typeprint.c: Ditto.
* f-valprint.c, findvar.c, frame.c, gdbtypes.c: Ditto.
* h8300-tdep.c, hppa-tdep.c, hppab-nat.c, hppah-nat.c: Ditto.
* hppam3-nat.c, hpread.c, ia64-aix-nat.c, ia64-linux-nat.c: Ditto.
* infcall.c, infcmd.c, inflow.c, infptrace.c, infrun.c: Ditto.
* infttrace.c, irix5-nat.c, jv-typeprint.c: Ditto.
* jv-valprint.c, m68k-tdep.c, m68klinux-nat.c, main.c: Ditto.
* mdebugread.c, minsyms.c, mips-linux-tdep.c: Ditto.
* mips-nat.c, mips-tdep.c, mipsread.c, mipsv4-nat.c: Ditto.
* ns32k-tdep.c, objfiles.c, p-typeprint.c: Ditto.
* p-valprint.c, ppc-linux-nat.c, printcmd.c: Ditto.
* remote-mips.c, remote-vx.c, rs6000-nat.c: Ditto.
* rs6000-tdep.c, scm-exp.c, sh-tdep.c, sh64-tdep.c: Ditto.
* solib.c, somread.c, source.c, sparc-tdep.c: Ditto.
* stabsread.c, stack.c, standalone.c, symfile.c: Ditto.
* symmisc.c, symtab.c, top.c, tracepoint.c: Ditto.
* typeprint.c, utils.c, valarith.c, valops.c: Ditto.
* values.c, vax-tdep.c, xcoffread.c: Ditto.
2003-09-14 18:32:14 +02:00
|
|
|
|
unsigned int regaddr;
|
2003-05-08 Andrew Cagney <cagney@redhat.com>
* regcache.h (max_register_size): Delete declaration.
* regcache.c (max_register_size): Delete function.
(struct regcache_descr): Delete field "max_register_size".
(init_regcache_descr, init_legacy_regcache_descr): Assert that all
registers fit in MAX_REGISTER_SIZE.
(regcache_save): Replace max_register_size with MAX_REGISTER_SIZE.
(regcache_restore, regcache_xfer_part, regcache_dump): Ditto.
* thread-db.c: Replace max_register_size with MAX_REGISTER_SIZE.
* sh-tdep.c, rom68k-rom.c, remote-sim.c, remote-mips.c: Ditto.
* remote-e7000.c, monitor.c, mipsv4-nat.c, mips-nat.c: Ditto.
* m68klinux-nat.c, lynx-nat.c, irix4-nat.c: Ditto.
* hpux-thread.c, hppah-nat.c, hppab-nat.c, hppa-tdep.c: Ditto.
* dve3900-rom.c, hppa-tdep.c: Ditto.
2003-05-09 00:33:14 +02:00
|
|
|
|
char buf[MAX_REGISTER_SIZE];
|
2003-09-14 Andrew Cagney <cagney@redhat.com>
* alpha-nat.c: Remove some occurances of "register".
* alpha-tdep.c, arm-tdep.c, blockframe.c, breakpoint.c: Ditto.
* buildsym.c, c-typeprint.c, c-valprint.c, coffread.c: Ditto.
* corefile.c, cp-support.c, cp-valprint.c, cris-tdep.c: Ditto.
* dbxread.c, dcache.c, dwarf2read.c, elfread.c: Ditto.
* environ.c, eval.c, event-top.c, f-typeprint.c: Ditto.
* f-valprint.c, findvar.c, frame.c, gdbtypes.c: Ditto.
* h8300-tdep.c, hppa-tdep.c, hppab-nat.c, hppah-nat.c: Ditto.
* hppam3-nat.c, hpread.c, ia64-aix-nat.c, ia64-linux-nat.c: Ditto.
* infcall.c, infcmd.c, inflow.c, infptrace.c, infrun.c: Ditto.
* infttrace.c, irix5-nat.c, jv-typeprint.c: Ditto.
* jv-valprint.c, m68k-tdep.c, m68klinux-nat.c, main.c: Ditto.
* mdebugread.c, minsyms.c, mips-linux-tdep.c: Ditto.
* mips-nat.c, mips-tdep.c, mipsread.c, mipsv4-nat.c: Ditto.
* ns32k-tdep.c, objfiles.c, p-typeprint.c: Ditto.
* p-valprint.c, ppc-linux-nat.c, printcmd.c: Ditto.
* remote-mips.c, remote-vx.c, rs6000-nat.c: Ditto.
* rs6000-tdep.c, scm-exp.c, sh-tdep.c, sh64-tdep.c: Ditto.
* solib.c, somread.c, source.c, sparc-tdep.c: Ditto.
* stabsread.c, stack.c, standalone.c, symfile.c: Ditto.
* symmisc.c, symtab.c, top.c, tracepoint.c: Ditto.
* typeprint.c, utils.c, valarith.c, valops.c: Ditto.
* values.c, vax-tdep.c, xcoffread.c: Ditto.
2003-09-14 18:32:14 +02:00
|
|
|
|
int i;
|
2003-05-08 Andrew Cagney <cagney@redhat.com>
* regcache.h (max_register_size): Delete declaration.
* regcache.c (max_register_size): Delete function.
(struct regcache_descr): Delete field "max_register_size".
(init_regcache_descr, init_legacy_regcache_descr): Assert that all
registers fit in MAX_REGISTER_SIZE.
(regcache_save): Replace max_register_size with MAX_REGISTER_SIZE.
(regcache_restore, regcache_xfer_part, regcache_dump): Ditto.
* thread-db.c: Replace max_register_size with MAX_REGISTER_SIZE.
* sh-tdep.c, rom68k-rom.c, remote-sim.c, remote-mips.c: Ditto.
* remote-e7000.c, monitor.c, mipsv4-nat.c, mips-nat.c: Ditto.
* m68klinux-nat.c, lynx-nat.c, irix4-nat.c: Ditto.
* hpux-thread.c, hppah-nat.c, hppab-nat.c, hppa-tdep.c: Ditto.
* dve3900-rom.c, hppa-tdep.c: Ditto.
2003-05-09 00:33:14 +02:00
|
|
|
|
char zerobuf[MAX_REGISTER_SIZE];
|
|
|
|
|
memset (zerobuf, 0, MAX_REGISTER_SIZE);
|
1999-04-16 03:35:26 +02:00
|
|
|
|
|
2002-11-07 16:31:31 +01:00
|
|
|
|
deprecated_registers_fetched ();
|
1999-04-16 03:35:26 +02:00
|
|
|
|
|
|
|
|
|
for (regno = 1; regno < NUM_REGS; regno++)
|
|
|
|
|
{
|
2003-05-21 01:54:34 +02:00
|
|
|
|
regaddr = register_ptrace_addr (regno);
|
2003-10-02 Andrew Cagney <cagney@redhat.com>
* gdbarch.sh (DEPRECATED_REGISTER_RAW_SIZE): Rename
REGISTER_RAW_SIZE.
* gdbarch.h, gdbarch.c: Re-generate.
* aix-thread.c, alpha-tdep.h, arm-tdep.c, core-sol2.c: Update.
* cris-tdep.c, dve3900-rom.c, findvar.c, frame.c: Update.
* hppa-tdep.c, hppab-nat.c, hppah-nat.c, hppam3-nat.c: Update.
* hpux-thread.c, i386gnu-nat.c, ia64-aix-nat.c: Update.
* ia64-linux-nat.c, ia64-tdep.c, infcmd.c, infptrace.c: Update.
* infrun.c, irix5-nat.c, lynx-nat.c, mips-linux-tdep.c: Update.
* mips-nat.c, mips-tdep.c, mipsv4-nat.c, mn10300-tdep.c: Update.
* monitor.c, ns32k-tdep.c, ppc-linux-nat.c, regcache.c: Update.
* remote-e7000.c, remote-mips.c, remote-sim.c: Update.
* remote-vxmips.c, remote-vxsparc.c, remote.c: Update.
* rom68k-rom.c, rs6000-nat.c, rs6000-tdep.c, s390-tdep.c: Update.
* sh64-tdep.c, sparc-nat.c, sparc-tdep.c, stack.c: Update.
* target.c, tracepoint.c, v850-tdep.c, v850ice.c, valops.c: Update.
* vax-tdep.c, vax-tdep.h, x86-64-tdep.c, xstormy16-tdep.c: Update.
* config/m68k/tm-delta68.h, config/m68k/tm-vx68.h: Update.
* config/sparc/tm-sparc.h, config/sparc/tm-sparclynx.h: Update.
2003-10-02 Andrew Cagney <cagney@redhat.com>
* gdbint.texinfo (Target Architecture Definition): Rename
REGISTER_RAW_SIZE to DEPRECATED_REGISTER_RAW_SIZE.
* gdb.texinfo (Packets, Stop Reply Packets): Ditto.
* gdbint.texinfo (Target Architecture Definition): Rename
2003-10-02 Andrew Cagney <cagney@redhat.com>
* mi-main.c: Rename REGISTER_RAW_SIZE to
DEPRECATED_REGISTER_RAW_SIZE.
2003-10-02 22:28:31 +02:00
|
|
|
|
for (i = 0; i < DEPRECATED_REGISTER_RAW_SIZE (regno); i += sizeof (int))
|
1999-07-07 22:19:36 +02:00
|
|
|
|
{
|
2001-05-04 06:15:33 +02:00
|
|
|
|
*(int *) &buf[i] = ptrace (PT_READ_U, PIDGET (inferior_ptid),
|
1999-04-16 03:35:26 +02:00
|
|
|
|
(PTRACE_ARG3_TYPE) regaddr, 0);
|
1999-07-07 22:19:36 +02:00
|
|
|
|
regaddr += sizeof (int);
|
|
|
|
|
}
|
1999-04-16 03:35:26 +02:00
|
|
|
|
supply_register (regno, buf);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
supply_register (ZERO_REGNUM, zerobuf);
|
|
|
|
|
/* Frame ptr reg must appear to be 0; it is faked by stack handling code. */
|
2003-04-28 Andrew Cagney <cagney@redhat.com>
* gdbarch.sh (DEPRECATED_TARGET_READ_FP): Replace TARGET_READ_FP.
(DEPRECATED_FP_REGNUM): Replace FP_REGNUM.
* gdbarch.h, gdbarch.c: Re-generate.
* infcall.c (call_function_by_hand): Use DEPRECATED_FP_REGNUM,
DEPRECATED_TARGET_READ_FP, or "sp" to create the dummy frame ID.
* inferior.h (deprecated_read_fp): Rename read_fp.
(generic_target_read_fp): Delete declaration.
* regcache.c (generic_target_read_fp): Delete function.
(deprecated_read_fp): Replace read_fp, use
DEPRECATED_TARGET_READ_FP or DEPRECATED_FP_REGNUM.
* d10v-tdep.c (d10v_read_fp): Delete function.
(d10v_gdbarch_init): Do not set deprecated_read_fp.
* sparc-tdep.c (sparc_gdbarch_init): Do not set
deprecated_target_read_fp to generic_target_read_fp.
* sh-tdep.c (sh_gdbarch_init): Ditto.
* rs6000-tdep.c (rs6000_gdbarch_init): Ditto.
* m68hc11-tdep.c (m68hc11_gdbarch_init): Ditto.
* frv-tdep.c (frv_gdbarch_init): Ditto.
* xstormy16-tdep.c (xstormy16_gdbarch_init): Set
deprecated_fp_regnum.
* x86-64-tdep.c (x86_64_init_abi): Ditto.
* vax-tdep.c (vax_gdbarch_init): Ditto.
* v850-tdep.c (v850_gdbarch_init): Ditto.
* sparc-tdep.c (sparc_gdbarch_init): Ditto.
* sh-tdep.c (sh_gdbarch_init): Ditto.
* s390-tdep.c (s390_gdbarch_init): Ditto.
* rs6000-tdep.c (rs6000_gdbarch_init): Ditto.
* mn10300-tdep.c (mn10300_gdbarch_init): Ditto.
* mcore-tdep.c (mcore_gdbarch_init): Ditto.
* m68k-tdep.c (m68k_gdbarch_init): Ditto.
* m68hc11-tdep.c (m68hc11_gdbarch_init): Ditto.
* ia64-tdep.c (ia64_gdbarch_init): Ditto.
* i386-tdep.c (i386_gdbarch_init): Ditto.
* hppa-tdep.c (hppa_gdbarch_init): Ditto.
* h8300-tdep.c (h8300_gdbarch_init): Ditto.
* frv-tdep.c (frv_gdbarch_init): Ditto.
* cris-tdep.c (cris_gdbarch_init): Ditto.
* avr-tdep.c (avr_gdbarch_init): Ditto.
* arm-tdep.c (arm_gdbarch_init): Ditto.
* alpha-tdep.c (alpha_gdbarch_init): Ditto.
* x86-64-tdep.c (x86_64_init_abi): Set deprecated_target_read_fp.
* v850-tdep.c (v850_gdbarch_init): Ditto.
* sparc-tdep.c (sparc_gdbarch_init): Ditto.
* sh-tdep.c (sh_gdbarch_init): Ditto.
* s390-tdep.c (s390_gdbarch_init): Ditto.
* rs6000-tdep.c (rs6000_gdbarch_init): Ditto.
* mn10300-tdep.c (mn10300_gdbarch_init): Ditto.
* mips-tdep.c (mips_gdbarch_init): Ditto.
* m68hc11-tdep.c (m68hc11_gdbarch_init): Ditto.
* ia64-tdep.c (ia64_gdbarch_init): Ditto.
* hppa-tdep.c (hppa_gdbarch_init): Ditto.
* frv-tdep.c (frv_gdbarch_init): Ditto.
* avr-tdep.c (avr_gdbarch_init): Ditto.
* arm-tdep.c (arm_gdbarch_init): Ditto.
* vax-tdep.c (vax_frame_init_saved_regs): Replace FP_REGNUM with
DEPRECATED_FP_REGNUM.
(vax_push_dummy_frame, vax_pop_frame): Ditto.
* std-regs.c (value_of_builtin_frame_fp_reg): Ditto.
* sparc-tdep.c (sparc_init_extra_frame_info): Ditto.
(sparc_push_dummy_frame, sparc64_read_fp): Ditto.
(sparc32_register_virtual_type): Ditto.
* sh-tdep.c (sh64_frame_chain): Ditto.
(sh64_get_saved_register, sh64_pop_frame): Ditto.
(sh_nofp_frame_init_saved_regs): Ditto.
(sh64_nofp_frame_init_saved_regs): Ditto.
(sh_fp_frame_init_saved_regs): Ditto.
* remote-mips.c (mips_wait, mips_fetch_registers): Ditto.
* remote-e7000.c (fetch_regs_from_dump): Ditto.
* procfs.c (procfs_fetch_registers): Ditto.
(procfs_store_registers): Ditto.
* ns32knbsd-nat.c (fetch_inferior_registers): Ditto.
(store_inferior_registers, fetch_core_registers): Ditto.
(fetch_kcore_registers, clear_regs): Ditto.
* ns32k-tdep.c (ns32k_frame_init_saved_regs): Ditto.
(ns32k_push_dummy_frame, ns32k_pop_frame): Ditto.
* nlm/i386.h (DEPRECATED_FP_REGNUM): Ditto.
* nlm/i386.c (do_status): Ditto.
* mipsv4-nat.c (supply_gregset): Ditto.
* mips-tdep.c: Ditto for comments.
* mips-nat.c (fetch_inferior_registers): Ditto.
(store_inferior_registers, fetch_core_registers): Ditto.
* m68k-tdep.c (m68k_push_dummy_frame): Ditto.
(m68k_pop_frame, m68k_frame_init_saved_regs): Ditto.
* i386-tdep.c (i386_frame_init_saved_regs): Ditto.
(i386_do_pop_frame, i386_register_type): Ditto.
* hppa-tdep.c (hppa_frame_chain): Ditto.
(hppa_push_dummy_frame, find_dummy_frame_regs): Ditto.
(hppa_pop_frame, hppa_read_fp): Ditto.
(skip_prologue_hard_way, hppa_frame_find_saved_regs): Ditto.
* cris-tdep.c (cris_examine, cris_pop_frame): Ditto.
* config/vax/nm-vax.h (REGISTER_U_ADDR): Ditto.
* config/sparc/tm-sparc.h (DEPRECATED_FP_REGNUM): Ditto.
* config/sparc/tm-sp64.h (DEPRECATED_FP_REGNUM): Ditto.
* config/s390/tm-s390.h (DEPRECATED_FP_REGNUM): Ditto.
* config/pa/tm-hppa64.h (DEPRECATED_FP_REGNUM): Ditto.
* config/ia64/tm-ia64.h (DEPRECATED_FP_REGNUM): Ditto.
* blockframe.c: Ditto for comments.
* arch-utils.h: Ditto for comments.
* arch-utils.c (legacy_virtual_frame_pointer): Ditto.
* alphanbsd-tdep.c (fetch_core_registers): Ditto.
* alphabsd-nat.c (fetch_inferior_registers): Ditto.
* alpha-tdep.h: Ditto for comments.
* alpha-tdep.c (alpha_cannot_fetch_register): Ditto.
(alpha_cannot_store_register): Ditto.
(alpha_push_dummy_frame): Ditto.
* alpha-nat.c (supply_gregset): Ditto.
* config/sparc/tm-sp64.h (DEPRECATED_TARGET_READ_FP): Update.
* config/pa/tm-hppa64.h (DEPRECATED_TARGET_READ_FP): Update.
* config/sparc/tm-sparc.h: Update comment.
* hppa-tdep.c (hppa_init_extra_frame_info): Use
deprecated_read_fp instead of TARGET_READ_FP.
(hppa_init_extra_frame_info, hppa_frame_chain): Ditto.
(hppa_push_dummy_frame, hppa_read_fp): Ditto.
* sparc-tdep.c (sparc_init_extra_frame_info): Use
deprecated_read_fp instead of read_fp.
* s390-tdep.c (s390_push_arguments): Ditto.
* ia64-tdep.c (ia64_gdbarch_init): Ditto.
* frame.h: Ditto in comments.
* frame.c (legacy_get_prev_frame): Ditto.
* dummy-frame.c (dummy_frame_this_id): Ditto.
* arm-tdep.c (arm_init_extra_frame_info): Ditto.
2003-04-28 Andrew Cagney <cagney@redhat.com>
* gdbint.texinfo (Target Architecture Definition): Replace
read_fp, TARGET_READ_FP and FP_REGNUM, with deprecated_read_fp,
DEPRECATED_TARGET_READ_FP and DEPRECATED_REGNUM.
2003-04-29 03:49:49 +02:00
|
|
|
|
supply_register (DEPRECATED_FP_REGNUM, zerobuf);
|
1999-04-16 03:35:26 +02:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/* Store our register values back into the inferior.
|
|
|
|
|
If REGNO is -1, do this for all registers.
|
|
|
|
|
Otherwise, REGNO specifies which register (so we can save time). */
|
|
|
|
|
|
|
|
|
|
void
|
2000-07-30 03:48:28 +02:00
|
|
|
|
store_inferior_registers (int regno)
|
1999-04-16 03:35:26 +02:00
|
|
|
|
{
|
2003-09-14 Andrew Cagney <cagney@redhat.com>
* alpha-nat.c: Remove some occurances of "register".
* alpha-tdep.c, arm-tdep.c, blockframe.c, breakpoint.c: Ditto.
* buildsym.c, c-typeprint.c, c-valprint.c, coffread.c: Ditto.
* corefile.c, cp-support.c, cp-valprint.c, cris-tdep.c: Ditto.
* dbxread.c, dcache.c, dwarf2read.c, elfread.c: Ditto.
* environ.c, eval.c, event-top.c, f-typeprint.c: Ditto.
* f-valprint.c, findvar.c, frame.c, gdbtypes.c: Ditto.
* h8300-tdep.c, hppa-tdep.c, hppab-nat.c, hppah-nat.c: Ditto.
* hppam3-nat.c, hpread.c, ia64-aix-nat.c, ia64-linux-nat.c: Ditto.
* infcall.c, infcmd.c, inflow.c, infptrace.c, infrun.c: Ditto.
* infttrace.c, irix5-nat.c, jv-typeprint.c: Ditto.
* jv-valprint.c, m68k-tdep.c, m68klinux-nat.c, main.c: Ditto.
* mdebugread.c, minsyms.c, mips-linux-tdep.c: Ditto.
* mips-nat.c, mips-tdep.c, mipsread.c, mipsv4-nat.c: Ditto.
* ns32k-tdep.c, objfiles.c, p-typeprint.c: Ditto.
* p-valprint.c, ppc-linux-nat.c, printcmd.c: Ditto.
* remote-mips.c, remote-vx.c, rs6000-nat.c: Ditto.
* rs6000-tdep.c, scm-exp.c, sh-tdep.c, sh64-tdep.c: Ditto.
* solib.c, somread.c, source.c, sparc-tdep.c: Ditto.
* stabsread.c, stack.c, standalone.c, symfile.c: Ditto.
* symmisc.c, symtab.c, top.c, tracepoint.c: Ditto.
* typeprint.c, utils.c, valarith.c, valops.c: Ditto.
* values.c, vax-tdep.c, xcoffread.c: Ditto.
2003-09-14 18:32:14 +02:00
|
|
|
|
unsigned int regaddr;
|
1999-04-16 03:35:26 +02:00
|
|
|
|
char buf[80];
|
|
|
|
|
|
|
|
|
|
if (regno > 0)
|
|
|
|
|
{
|
|
|
|
|
if (regno == ZERO_REGNUM || regno == PS_REGNUM
|
2003-11-16 Andrew Cagney <cagney@redhat.com>
* mips-tdep.c (struct gdbarch_tdep): Add field "regnum".
(mips_fpa0_regnum, mips_regnum): New function.
(mips_gdbarch_init): Fill in the "regnum" fields.
* mips-tdep.h (struct mips_regnum): Define.
(mips_regnum): Declare.
* config/mips/tm-mips.h (BADVADDR_REGNUM): Delete macro.
(LO_REGNUM, HI_REGNUM, BADVADDR_REGNUM): Ditto.
(CAUSE_REGNUM, PC_REGNUM, FP0_REGNUM): Ditto.
(FCRCS_REGNUM, FCRIR_REGNUM, FPA0_REGNUM): Ditto.
* config/mips/tm-irix6.h (FP0_REGNUM): Delete macro.
(PC_REGNUM, CAUSE_REGNUM, BADVADDR_REGNUM): Ditto.
(HI_REGNUM, LO_REGNUM, FCRCS_REGNUM, FCRIR_REGNUM): Ditto.
* config/mips/tm-irix5.h (FP0_REGNUM): Delete macro.
(PC_REGNUM, CAUSE_REGNUM, BADVADDR_REGNUM): Ditto.
(HI_REGNUM, LO_REGNUM, FCRCS_REGNUM, FCRIR_REGNUM): Ditto.
* remote-mips.c: Include "mips-tdep.h". Update.
* mipsnbsd-tdep.c: Update.
* mipsv4-nat.c: Update.
* mips-tdep.c: Update.
* mips-nat.c: Update.
* mips-linux-tdep.c: Update.
* mips-linux-nat.c: Update.
* irix5-nat.c: Update.
* dve3900-rom.c: Include "mips-tdep.h". Update.
(ignore_packet): Supress GCC warning.
* config/mips/nm-riscos.h: Update.
* Makefile.in (dve3900-rom.o, remote-mips.o): Update dependencies.
2003-11-16 20:24:05 +01:00
|
|
|
|
|| regno == mips_regnum (current_gdbarch)->badvaddr
|
|
|
|
|
|| regno == mips_regnum (current_gdbarch)->cause
|
|
|
|
|
|| regno == mips_regnum (current_gdbarch)->fp_implementation_revision
|
|
|
|
|
|| regno == DEPRECATED_FP_REGNUM
|
1999-04-16 03:35:26 +02:00
|
|
|
|
|| (regno >= FIRST_EMBED_REGNUM && regno <= LAST_EMBED_REGNUM))
|
|
|
|
|
return;
|
2003-05-21 01:54:34 +02:00
|
|
|
|
regaddr = register_ptrace_addr (regno);
|
1999-04-16 03:35:26 +02:00
|
|
|
|
errno = 0;
|
2001-05-04 06:15:33 +02:00
|
|
|
|
ptrace (PT_WRITE_U, PIDGET (inferior_ptid), (PTRACE_ARG3_TYPE) regaddr,
|
1999-04-16 03:35:26 +02:00
|
|
|
|
read_register (regno));
|
|
|
|
|
if (errno != 0)
|
|
|
|
|
{
|
|
|
|
|
sprintf (buf, "writing register number %d", regno);
|
|
|
|
|
perror_with_name (buf);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
for (regno = 0; regno < NUM_REGS; regno++)
|
|
|
|
|
store_inferior_registers (regno);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/* Figure out where the longjmp will land.
|
|
|
|
|
We expect the first arg to be a pointer to the jmp_buf structure from which
|
|
|
|
|
we extract the pc (JB_PC) that we will land at. The pc is copied into PC.
|
|
|
|
|
This routine returns true on success. */
|
|
|
|
|
|
|
|
|
|
int
|
2000-07-30 03:48:28 +02:00
|
|
|
|
get_longjmp_target (CORE_ADDR *pc)
|
1999-04-16 03:35:26 +02:00
|
|
|
|
{
|
|
|
|
|
CORE_ADDR jb_addr;
|
2000-08-09 22:09:01 +02:00
|
|
|
|
char *buf;
|
1999-04-16 03:35:26 +02:00
|
|
|
|
|
2000-08-09 22:09:01 +02:00
|
|
|
|
buf = alloca (TARGET_PTR_BIT / TARGET_CHAR_BIT);
|
1999-04-16 03:35:26 +02:00
|
|
|
|
jb_addr = read_register (A0_REGNUM);
|
|
|
|
|
|
|
|
|
|
if (target_read_memory (jb_addr + JB_PC * JB_ELEMENT_SIZE, buf,
|
|
|
|
|
TARGET_PTR_BIT / TARGET_CHAR_BIT))
|
|
|
|
|
return 0;
|
|
|
|
|
|
2003-06-02 04:09:40 +02:00
|
|
|
|
*pc = extract_unsigned_integer (buf, TARGET_PTR_BIT / TARGET_CHAR_BIT);
|
1999-04-16 03:35:26 +02:00
|
|
|
|
|
|
|
|
|
return 1;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/* Extract the register values out of the core file and store
|
|
|
|
|
them where `read_register' will find them.
|
|
|
|
|
|
|
|
|
|
CORE_REG_SECT points to the register values themselves, read into memory.
|
|
|
|
|
CORE_REG_SIZE is the size of that area.
|
|
|
|
|
WHICH says which set of registers we are handling (0 = int, 2 = float
|
1999-07-07 22:19:36 +02:00
|
|
|
|
on machines where they are discontiguous).
|
1999-04-16 03:35:26 +02:00
|
|
|
|
REG_ADDR is the offset from u.u_ar0 to the register values relative to
|
1999-07-07 22:19:36 +02:00
|
|
|
|
core_reg_sect. This is used with old-fashioned core files to
|
|
|
|
|
locate the registers in a large upage-plus-stack ".reg" section.
|
|
|
|
|
Original upage address X is at location core_reg_sect+x+reg_addr.
|
1999-04-16 03:35:26 +02:00
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
static void
|
2000-07-30 03:48:28 +02:00
|
|
|
|
fetch_core_registers (char *core_reg_sect, unsigned core_reg_size, int which,
|
|
|
|
|
CORE_ADDR reg_addr)
|
1999-04-16 03:35:26 +02:00
|
|
|
|
{
|
2003-09-14 Andrew Cagney <cagney@redhat.com>
* alpha-nat.c: Remove some occurances of "register".
* alpha-tdep.c, arm-tdep.c, blockframe.c, breakpoint.c: Ditto.
* buildsym.c, c-typeprint.c, c-valprint.c, coffread.c: Ditto.
* corefile.c, cp-support.c, cp-valprint.c, cris-tdep.c: Ditto.
* dbxread.c, dcache.c, dwarf2read.c, elfread.c: Ditto.
* environ.c, eval.c, event-top.c, f-typeprint.c: Ditto.
* f-valprint.c, findvar.c, frame.c, gdbtypes.c: Ditto.
* h8300-tdep.c, hppa-tdep.c, hppab-nat.c, hppah-nat.c: Ditto.
* hppam3-nat.c, hpread.c, ia64-aix-nat.c, ia64-linux-nat.c: Ditto.
* infcall.c, infcmd.c, inflow.c, infptrace.c, infrun.c: Ditto.
* infttrace.c, irix5-nat.c, jv-typeprint.c: Ditto.
* jv-valprint.c, m68k-tdep.c, m68klinux-nat.c, main.c: Ditto.
* mdebugread.c, minsyms.c, mips-linux-tdep.c: Ditto.
* mips-nat.c, mips-tdep.c, mipsread.c, mipsv4-nat.c: Ditto.
* ns32k-tdep.c, objfiles.c, p-typeprint.c: Ditto.
* p-valprint.c, ppc-linux-nat.c, printcmd.c: Ditto.
* remote-mips.c, remote-vx.c, rs6000-nat.c: Ditto.
* rs6000-tdep.c, scm-exp.c, sh-tdep.c, sh64-tdep.c: Ditto.
* solib.c, somread.c, source.c, sparc-tdep.c: Ditto.
* stabsread.c, stack.c, standalone.c, symfile.c: Ditto.
* symmisc.c, symtab.c, top.c, tracepoint.c: Ditto.
* typeprint.c, utils.c, valarith.c, valops.c: Ditto.
* values.c, vax-tdep.c, xcoffread.c: Ditto.
2003-09-14 18:32:14 +02:00
|
|
|
|
int regno;
|
|
|
|
|
unsigned int addr;
|
1999-04-16 03:35:26 +02:00
|
|
|
|
int bad_reg = -1;
|
2003-09-14 Andrew Cagney <cagney@redhat.com>
* alpha-nat.c: Remove some occurances of "register".
* alpha-tdep.c, arm-tdep.c, blockframe.c, breakpoint.c: Ditto.
* buildsym.c, c-typeprint.c, c-valprint.c, coffread.c: Ditto.
* corefile.c, cp-support.c, cp-valprint.c, cris-tdep.c: Ditto.
* dbxread.c, dcache.c, dwarf2read.c, elfread.c: Ditto.
* environ.c, eval.c, event-top.c, f-typeprint.c: Ditto.
* f-valprint.c, findvar.c, frame.c, gdbtypes.c: Ditto.
* h8300-tdep.c, hppa-tdep.c, hppab-nat.c, hppah-nat.c: Ditto.
* hppam3-nat.c, hpread.c, ia64-aix-nat.c, ia64-linux-nat.c: Ditto.
* infcall.c, infcmd.c, inflow.c, infptrace.c, infrun.c: Ditto.
* infttrace.c, irix5-nat.c, jv-typeprint.c: Ditto.
* jv-valprint.c, m68k-tdep.c, m68klinux-nat.c, main.c: Ditto.
* mdebugread.c, minsyms.c, mips-linux-tdep.c: Ditto.
* mips-nat.c, mips-tdep.c, mipsread.c, mipsv4-nat.c: Ditto.
* ns32k-tdep.c, objfiles.c, p-typeprint.c: Ditto.
* p-valprint.c, ppc-linux-nat.c, printcmd.c: Ditto.
* remote-mips.c, remote-vx.c, rs6000-nat.c: Ditto.
* rs6000-tdep.c, scm-exp.c, sh-tdep.c, sh64-tdep.c: Ditto.
* solib.c, somread.c, source.c, sparc-tdep.c: Ditto.
* stabsread.c, stack.c, standalone.c, symfile.c: Ditto.
* symmisc.c, symtab.c, top.c, tracepoint.c: Ditto.
* typeprint.c, utils.c, valarith.c, valops.c: Ditto.
* values.c, vax-tdep.c, xcoffread.c: Ditto.
2003-09-14 18:32:14 +02:00
|
|
|
|
reg_ptr = -reg_addr; /* Original u.u_ar0 is -reg_addr. */
|
1999-04-16 03:35:26 +02:00
|
|
|
|
|
2003-05-08 Andrew Cagney <cagney@redhat.com>
* regcache.h (max_register_size): Delete declaration.
* regcache.c (max_register_size): Delete function.
(struct regcache_descr): Delete field "max_register_size".
(init_regcache_descr, init_legacy_regcache_descr): Assert that all
registers fit in MAX_REGISTER_SIZE.
(regcache_save): Replace max_register_size with MAX_REGISTER_SIZE.
(regcache_restore, regcache_xfer_part, regcache_dump): Ditto.
* thread-db.c: Replace max_register_size with MAX_REGISTER_SIZE.
* sh-tdep.c, rom68k-rom.c, remote-sim.c, remote-mips.c: Ditto.
* remote-e7000.c, monitor.c, mipsv4-nat.c, mips-nat.c: Ditto.
* m68klinux-nat.c, lynx-nat.c, irix4-nat.c: Ditto.
* hpux-thread.c, hppah-nat.c, hppab-nat.c, hppa-tdep.c: Ditto.
* dve3900-rom.c, hppa-tdep.c: Ditto.
2003-05-09 00:33:14 +02:00
|
|
|
|
char zerobuf[MAX_REGISTER_SIZE];
|
|
|
|
|
memset (zerobuf, 0, MAX_REGISTER_SIZE);
|
2003-02-02 06:46:14 +01:00
|
|
|
|
|
|
|
|
|
|
1999-04-16 03:35:26 +02:00
|
|
|
|
/* If u.u_ar0 was an absolute address in the core file, relativize it now,
|
|
|
|
|
so we can use it as an offset into core_reg_sect. When we're done,
|
|
|
|
|
"register 0" will be at core_reg_sect+reg_ptr, and we can use
|
|
|
|
|
register_addr to offset to the other registers. If this is a modern
|
|
|
|
|
core file without a upage, reg_ptr will be zero and this is all a big
|
|
|
|
|
NOP. */
|
|
|
|
|
if (reg_ptr > core_reg_size)
|
|
|
|
|
#ifdef KERNEL_U_ADDR
|
|
|
|
|
reg_ptr -= KERNEL_U_ADDR;
|
|
|
|
|
#else
|
|
|
|
|
error ("Old mips core file can't be processed on this machine.");
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
for (regno = 0; regno < NUM_REGS; regno++)
|
|
|
|
|
{
|
|
|
|
|
addr = register_addr (regno, reg_ptr);
|
1999-07-07 22:19:36 +02:00
|
|
|
|
if (addr >= core_reg_size)
|
|
|
|
|
{
|
|
|
|
|
if (bad_reg < 0)
|
|
|
|
|
bad_reg = regno;
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
supply_register (regno, core_reg_sect + addr);
|
|
|
|
|
}
|
1999-04-16 03:35:26 +02:00
|
|
|
|
}
|
|
|
|
|
if (bad_reg >= 0)
|
|
|
|
|
{
|
|
|
|
|
error ("Register %s not found in core file.", REGISTER_NAME (bad_reg));
|
|
|
|
|
}
|
|
|
|
|
supply_register (ZERO_REGNUM, zerobuf);
|
|
|
|
|
/* Frame ptr reg must appear to be 0; it is faked by stack handling code. */
|
2003-04-28 Andrew Cagney <cagney@redhat.com>
* gdbarch.sh (DEPRECATED_TARGET_READ_FP): Replace TARGET_READ_FP.
(DEPRECATED_FP_REGNUM): Replace FP_REGNUM.
* gdbarch.h, gdbarch.c: Re-generate.
* infcall.c (call_function_by_hand): Use DEPRECATED_FP_REGNUM,
DEPRECATED_TARGET_READ_FP, or "sp" to create the dummy frame ID.
* inferior.h (deprecated_read_fp): Rename read_fp.
(generic_target_read_fp): Delete declaration.
* regcache.c (generic_target_read_fp): Delete function.
(deprecated_read_fp): Replace read_fp, use
DEPRECATED_TARGET_READ_FP or DEPRECATED_FP_REGNUM.
* d10v-tdep.c (d10v_read_fp): Delete function.
(d10v_gdbarch_init): Do not set deprecated_read_fp.
* sparc-tdep.c (sparc_gdbarch_init): Do not set
deprecated_target_read_fp to generic_target_read_fp.
* sh-tdep.c (sh_gdbarch_init): Ditto.
* rs6000-tdep.c (rs6000_gdbarch_init): Ditto.
* m68hc11-tdep.c (m68hc11_gdbarch_init): Ditto.
* frv-tdep.c (frv_gdbarch_init): Ditto.
* xstormy16-tdep.c (xstormy16_gdbarch_init): Set
deprecated_fp_regnum.
* x86-64-tdep.c (x86_64_init_abi): Ditto.
* vax-tdep.c (vax_gdbarch_init): Ditto.
* v850-tdep.c (v850_gdbarch_init): Ditto.
* sparc-tdep.c (sparc_gdbarch_init): Ditto.
* sh-tdep.c (sh_gdbarch_init): Ditto.
* s390-tdep.c (s390_gdbarch_init): Ditto.
* rs6000-tdep.c (rs6000_gdbarch_init): Ditto.
* mn10300-tdep.c (mn10300_gdbarch_init): Ditto.
* mcore-tdep.c (mcore_gdbarch_init): Ditto.
* m68k-tdep.c (m68k_gdbarch_init): Ditto.
* m68hc11-tdep.c (m68hc11_gdbarch_init): Ditto.
* ia64-tdep.c (ia64_gdbarch_init): Ditto.
* i386-tdep.c (i386_gdbarch_init): Ditto.
* hppa-tdep.c (hppa_gdbarch_init): Ditto.
* h8300-tdep.c (h8300_gdbarch_init): Ditto.
* frv-tdep.c (frv_gdbarch_init): Ditto.
* cris-tdep.c (cris_gdbarch_init): Ditto.
* avr-tdep.c (avr_gdbarch_init): Ditto.
* arm-tdep.c (arm_gdbarch_init): Ditto.
* alpha-tdep.c (alpha_gdbarch_init): Ditto.
* x86-64-tdep.c (x86_64_init_abi): Set deprecated_target_read_fp.
* v850-tdep.c (v850_gdbarch_init): Ditto.
* sparc-tdep.c (sparc_gdbarch_init): Ditto.
* sh-tdep.c (sh_gdbarch_init): Ditto.
* s390-tdep.c (s390_gdbarch_init): Ditto.
* rs6000-tdep.c (rs6000_gdbarch_init): Ditto.
* mn10300-tdep.c (mn10300_gdbarch_init): Ditto.
* mips-tdep.c (mips_gdbarch_init): Ditto.
* m68hc11-tdep.c (m68hc11_gdbarch_init): Ditto.
* ia64-tdep.c (ia64_gdbarch_init): Ditto.
* hppa-tdep.c (hppa_gdbarch_init): Ditto.
* frv-tdep.c (frv_gdbarch_init): Ditto.
* avr-tdep.c (avr_gdbarch_init): Ditto.
* arm-tdep.c (arm_gdbarch_init): Ditto.
* vax-tdep.c (vax_frame_init_saved_regs): Replace FP_REGNUM with
DEPRECATED_FP_REGNUM.
(vax_push_dummy_frame, vax_pop_frame): Ditto.
* std-regs.c (value_of_builtin_frame_fp_reg): Ditto.
* sparc-tdep.c (sparc_init_extra_frame_info): Ditto.
(sparc_push_dummy_frame, sparc64_read_fp): Ditto.
(sparc32_register_virtual_type): Ditto.
* sh-tdep.c (sh64_frame_chain): Ditto.
(sh64_get_saved_register, sh64_pop_frame): Ditto.
(sh_nofp_frame_init_saved_regs): Ditto.
(sh64_nofp_frame_init_saved_regs): Ditto.
(sh_fp_frame_init_saved_regs): Ditto.
* remote-mips.c (mips_wait, mips_fetch_registers): Ditto.
* remote-e7000.c (fetch_regs_from_dump): Ditto.
* procfs.c (procfs_fetch_registers): Ditto.
(procfs_store_registers): Ditto.
* ns32knbsd-nat.c (fetch_inferior_registers): Ditto.
(store_inferior_registers, fetch_core_registers): Ditto.
(fetch_kcore_registers, clear_regs): Ditto.
* ns32k-tdep.c (ns32k_frame_init_saved_regs): Ditto.
(ns32k_push_dummy_frame, ns32k_pop_frame): Ditto.
* nlm/i386.h (DEPRECATED_FP_REGNUM): Ditto.
* nlm/i386.c (do_status): Ditto.
* mipsv4-nat.c (supply_gregset): Ditto.
* mips-tdep.c: Ditto for comments.
* mips-nat.c (fetch_inferior_registers): Ditto.
(store_inferior_registers, fetch_core_registers): Ditto.
* m68k-tdep.c (m68k_push_dummy_frame): Ditto.
(m68k_pop_frame, m68k_frame_init_saved_regs): Ditto.
* i386-tdep.c (i386_frame_init_saved_regs): Ditto.
(i386_do_pop_frame, i386_register_type): Ditto.
* hppa-tdep.c (hppa_frame_chain): Ditto.
(hppa_push_dummy_frame, find_dummy_frame_regs): Ditto.
(hppa_pop_frame, hppa_read_fp): Ditto.
(skip_prologue_hard_way, hppa_frame_find_saved_regs): Ditto.
* cris-tdep.c (cris_examine, cris_pop_frame): Ditto.
* config/vax/nm-vax.h (REGISTER_U_ADDR): Ditto.
* config/sparc/tm-sparc.h (DEPRECATED_FP_REGNUM): Ditto.
* config/sparc/tm-sp64.h (DEPRECATED_FP_REGNUM): Ditto.
* config/s390/tm-s390.h (DEPRECATED_FP_REGNUM): Ditto.
* config/pa/tm-hppa64.h (DEPRECATED_FP_REGNUM): Ditto.
* config/ia64/tm-ia64.h (DEPRECATED_FP_REGNUM): Ditto.
* blockframe.c: Ditto for comments.
* arch-utils.h: Ditto for comments.
* arch-utils.c (legacy_virtual_frame_pointer): Ditto.
* alphanbsd-tdep.c (fetch_core_registers): Ditto.
* alphabsd-nat.c (fetch_inferior_registers): Ditto.
* alpha-tdep.h: Ditto for comments.
* alpha-tdep.c (alpha_cannot_fetch_register): Ditto.
(alpha_cannot_store_register): Ditto.
(alpha_push_dummy_frame): Ditto.
* alpha-nat.c (supply_gregset): Ditto.
* config/sparc/tm-sp64.h (DEPRECATED_TARGET_READ_FP): Update.
* config/pa/tm-hppa64.h (DEPRECATED_TARGET_READ_FP): Update.
* config/sparc/tm-sparc.h: Update comment.
* hppa-tdep.c (hppa_init_extra_frame_info): Use
deprecated_read_fp instead of TARGET_READ_FP.
(hppa_init_extra_frame_info, hppa_frame_chain): Ditto.
(hppa_push_dummy_frame, hppa_read_fp): Ditto.
* sparc-tdep.c (sparc_init_extra_frame_info): Use
deprecated_read_fp instead of read_fp.
* s390-tdep.c (s390_push_arguments): Ditto.
* ia64-tdep.c (ia64_gdbarch_init): Ditto.
* frame.h: Ditto in comments.
* frame.c (legacy_get_prev_frame): Ditto.
* dummy-frame.c (dummy_frame_this_id): Ditto.
* arm-tdep.c (arm_init_extra_frame_info): Ditto.
2003-04-28 Andrew Cagney <cagney@redhat.com>
* gdbint.texinfo (Target Architecture Definition): Replace
read_fp, TARGET_READ_FP and FP_REGNUM, with deprecated_read_fp,
DEPRECATED_TARGET_READ_FP and DEPRECATED_REGNUM.
2003-04-29 03:49:49 +02:00
|
|
|
|
supply_register (DEPRECATED_FP_REGNUM, zerobuf);
|
1999-04-16 03:35:26 +02:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/* Return the address in the core dump or inferior of register REGNO.
|
|
|
|
|
BLOCKEND is the address of the end of the user structure. */
|
|
|
|
|
|
|
|
|
|
CORE_ADDR
|
2000-07-30 03:48:28 +02:00
|
|
|
|
register_addr (int regno, CORE_ADDR blockend)
|
1999-04-16 03:35:26 +02:00
|
|
|
|
{
|
|
|
|
|
CORE_ADDR addr;
|
|
|
|
|
|
|
|
|
|
if (regno < 0 || regno >= NUM_REGS)
|
|
|
|
|
error ("Invalid register number %d.", regno);
|
|
|
|
|
|
|
|
|
|
REGISTER_U_ADDR (addr, blockend, regno);
|
|
|
|
|
|
|
|
|
|
return addr;
|
|
|
|
|
}
|
|
|
|
|
|
1999-07-07 22:19:36 +02:00
|
|
|
|
|
1999-04-16 03:35:26 +02:00
|
|
|
|
/* Register that we are able to handle mips core file formats.
|
|
|
|
|
FIXME: is this really bfd_target_unknown_flavour? */
|
|
|
|
|
|
|
|
|
|
static struct core_fns mips_core_fns =
|
|
|
|
|
{
|
1999-10-06 01:13:56 +02:00
|
|
|
|
bfd_target_unknown_flavour, /* core_flavour */
|
|
|
|
|
default_check_format, /* check_format */
|
|
|
|
|
default_core_sniffer, /* core_sniffer */
|
|
|
|
|
fetch_core_registers, /* core_read_registers */
|
|
|
|
|
NULL /* next */
|
1999-04-16 03:35:26 +02:00
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
void
|
2000-07-30 03:48:28 +02:00
|
|
|
|
_initialize_core_mips (void)
|
1999-04-16 03:35:26 +02:00
|
|
|
|
{
|
|
|
|
|
add_core_fns (&mips_core_fns);
|
|
|
|
|
}
|