* gdbarch.sh (DEPRECATED_REGISTER_BYTES): Rename REGISTER_BYTES.
* gdbarch.h, gdbarch.c: Re-generate.
* arm-linux-tdep.c (arm_linux_extract_return_value): Delete reference.
* TODO (REGISTER_BYTES): Delete reference.
* alpha-tdep.c (alpha_gdbarch_init): Update.
* xstormy16-tdep.c (xstormy16_gdbarch_init): Update.
* x86-64-tdep.c (x86_64_init_abi): Update.
* vax-tdep.c (vax_gdbarch_init): Update.
* v850-tdep.c (v850_gdbarch_init): Update.
* sparc-tdep.c (sparc_gdbarch_init): Update.
* sh-tdep.c (sh_gdbarch_init): Update.
* s390-tdep.c (s390_gdbarch_init): Update.
* rs6000-tdep.c (rs6000_gdbarch_init): Update.
* ns32k-tdep.c (ns32k_gdbarch_init_32082): Update.
(ns32k_gdbarch_init_32382): Update.
* mn10300-tdep.c (mn10300_gdbarch_init): Update.
* mcore-tdep.c (mcore_gdbarch_init): Update.
* m68k-tdep.c (m68k_gdbarch_init): Update.
* m68hc11-tdep.c (m68hc11_gdbarch_init): Update.
* ia64-tdep.c (ia64_gdbarch_init): Update.
* i386-tdep.c (i386_gdbarch_init): Update.
* i386-linux-tdep.c (i386_linux_init_abi): Update.
* hppa-tdep.c (hppa_gdbarch_init): Update.
* h8300-tdep.c (h8300_gdbarch_init): Update.
* frv-tdep.c (frv_gdbarch_init): Update.
* cris-tdep.c (cris_gdbarch_init): Update.
* avr-tdep.c (avr_gdbarch_init): Update.
* arm-tdep.c (arm_gdbarch_init): Update.
* sparc-tdep.c (sparc_pop_frame): Update.
* rs6000-tdep.c (rs6000_pop_frame): Update.
* remote.c (init_remote_state): Update.
(remote_prepare_to_store): Update.
* remote-vx.c (vx_prepare_to_store): Update.
* remote-sds.c (sds_fetch_registers): Update.
(sds_prepare_to_store): Update.
* remote-array.c: Update.
* regcache.c (init_legacy_regcache_descr): Update.
(init_regcache_descr): Update.
* mips-tdep.c (mips_eabi_extract_return_value): Update.
(mips_o64_extract_return_value): Update.
* irix5-nat.c (fetch_core_registers): Update.
* irix4-nat.c (fetch_core_registers): Update.
* i386-tdep.h: Update.
* hppa-tdep.c (pa_do_registers_info): Update.
(pa_do_strcat_registers_info): Update.
* cris-tdep.c (cris_register_bytes_ok): Update.
* config/nm-gnu.h (CHILD_PREPARE_TO_STORE): Update.
* config/sparc/tm-sparc.h (DEPRECATED_REGISTER_BYTES): Update.
* config/sparc/nm-sun4sol2.h (CHILD_PREPARE_TO_STORE): Update.
* config/sparc/nm-sun4os4.h (CHILD_PREPARE_TO_STORE): Update.
* config/sparc/nm-nbsd.h (CHILD_PREPARE_TO_STORE): Update.
* config/sparc/tm-sp64.h (DEPRECATED_REGISTER_BYTES): Update.
* config/s390/tm-s390.h (DEPRECATED_REGISTER_BYTES): Update.
* config/pa/tm-hppa64.h (DEPRECATED_REGISTER_BYTES): Update.
* config/mips/tm-mips.h (DEPRECATED_REGISTER_BYTES): Update.
* config/mips/tm-irix6.h (DEPRECATED_REGISTER_BYTES): Update.
* config/mips/tm-irix5.h (DEPRECATED_REGISTER_BYTES): Update.
* config/m68k/tm-sun3.h (DEPRECATED_REGISTER_BYTES): Update.
(REGISTER_BYTES_OK): Update.
* config/m68k/nm-sun3.h (CHILD_PREPARE_TO_STORE): Update.
* config/ia64/tm-ia64.h (DEPRECATED_REGISTER_BYTES): Update.
Index: doc/ChangeLog
2003-05-16 Andrew Cagney <cagney@redhat.com>
* gdbint.texinfo (Target Architecture Definition): Replace
REGISTER_BYTES with DEPRECATED_REGISTER_BYTES. Fix typo,
DEPRECATED_REGISTER_SIZE instead of REGISTER_BYTE.
Index: mi/ChangeLog
2003-05-16 Andrew Cagney <cagney@redhat.com>
* mi-main.c (mi_setup_architecture_data):
+2003-05-16 Andrew Cagney <cagney@redhat.com>
+
+ * gdbarch.sh (DEPRECATED_REGISTER_BYTES): Rename REGISTER_BYTES.
+ * gdbarch.h, gdbarch.c: Re-generate.
+ * arm-linux-tdep.c (arm_linux_extract_return_value): Delete reference.
+ * TODO (REGISTER_BYTES): Delete reference.
+ * alpha-tdep.c (alpha_gdbarch_init): Update.
+ * xstormy16-tdep.c (xstormy16_gdbarch_init): Update.
+ * x86-64-tdep.c (x86_64_init_abi): Update.
+ * vax-tdep.c (vax_gdbarch_init): Update.
+ * v850-tdep.c (v850_gdbarch_init): Update.
+ * sparc-tdep.c (sparc_gdbarch_init): Update.
+ * sh-tdep.c (sh_gdbarch_init): Update.
+ * s390-tdep.c (s390_gdbarch_init): Update.
+ * rs6000-tdep.c (rs6000_gdbarch_init): Update.
+ * ns32k-tdep.c (ns32k_gdbarch_init_32082): Update.
+ (ns32k_gdbarch_init_32382): Update.
+ * mn10300-tdep.c (mn10300_gdbarch_init): Update.
+ * mcore-tdep.c (mcore_gdbarch_init): Update.
+ * m68k-tdep.c (m68k_gdbarch_init): Update.
+ * m68hc11-tdep.c (m68hc11_gdbarch_init): Update.
+ * ia64-tdep.c (ia64_gdbarch_init): Update.
+ * i386-tdep.c (i386_gdbarch_init): Update.
+ * i386-linux-tdep.c (i386_linux_init_abi): Update.
+ * hppa-tdep.c (hppa_gdbarch_init): Update.
+ * h8300-tdep.c (h8300_gdbarch_init): Update.
+ * frv-tdep.c (frv_gdbarch_init): Update.
+ * cris-tdep.c (cris_gdbarch_init): Update.
+ * avr-tdep.c (avr_gdbarch_init): Update.
+ * arm-tdep.c (arm_gdbarch_init): Update.
+ * sparc-tdep.c (sparc_pop_frame): Update.
+ * rs6000-tdep.c (rs6000_pop_frame): Update.
+ * remote.c (init_remote_state): Update.
+ (remote_prepare_to_store): Update.
+ * remote-vx.c (vx_prepare_to_store): Update.
+ * remote-sds.c (sds_fetch_registers): Update.
+ (sds_prepare_to_store): Update.
+ * remote-array.c: Update.
+ * regcache.c (init_legacy_regcache_descr): Update.
+ (init_regcache_descr): Update.
+ * mips-tdep.c (mips_eabi_extract_return_value): Update.
+ (mips_o64_extract_return_value): Update.
+ * irix5-nat.c (fetch_core_registers): Update.
+ * irix4-nat.c (fetch_core_registers): Update.
+ * i386-tdep.h: Update.
+ * hppa-tdep.c (pa_do_registers_info): Update.
+ (pa_do_strcat_registers_info): Update.
+ * cris-tdep.c (cris_register_bytes_ok): Update.
+ * config/nm-gnu.h (CHILD_PREPARE_TO_STORE): Update.
+ * config/sparc/tm-sparc.h (DEPRECATED_REGISTER_BYTES): Update.
+ * config/sparc/nm-sun4sol2.h (CHILD_PREPARE_TO_STORE): Update.
+ * config/sparc/nm-sun4os4.h (CHILD_PREPARE_TO_STORE): Update.
+ * config/sparc/nm-nbsd.h (CHILD_PREPARE_TO_STORE): Update.
+ * config/sparc/tm-sp64.h (DEPRECATED_REGISTER_BYTES): Update.
+ * config/s390/tm-s390.h (DEPRECATED_REGISTER_BYTES): Update.
+ * config/pa/tm-hppa64.h (DEPRECATED_REGISTER_BYTES): Update.
+ * config/mips/tm-mips.h (DEPRECATED_REGISTER_BYTES): Update.
+ * config/mips/tm-irix6.h (DEPRECATED_REGISTER_BYTES): Update.
+ * config/mips/tm-irix5.h (DEPRECATED_REGISTER_BYTES): Update.
+ * config/m68k/tm-sun3.h (DEPRECATED_REGISTER_BYTES): Update.
+ (REGISTER_BYTES_OK): Update.
+ * config/m68k/nm-sun3.h (CHILD_PREPARE_TO_STORE): Update.
+ * config/ia64/tm-ia64.h (DEPRECATED_REGISTER_BYTES): Update.
+
2003-05-16 Ian Lance Taylor <ian@airs.com>
* vax-tdep.c (INVALID_FLOAT, MAXLEN, NOPCODES): Don't define.
how it relates to rawreg and the
regnum is clear.
- REGISTER_BYTES
- The size of the cache can be computed
- on the fly.
-
--
Obsolete the targets:
set_gdbarch_register_name (gdbarch, alpha_register_name);
set_gdbarch_deprecated_register_size (gdbarch, ALPHA_REGISTER_SIZE);
- set_gdbarch_register_bytes (gdbarch, ALPHA_REGISTER_BYTES);
+ set_gdbarch_deprecated_register_bytes (gdbarch, ALPHA_REGISTER_BYTES);
set_gdbarch_register_byte (gdbarch, alpha_register_byte);
set_gdbarch_register_raw_size (gdbarch, alpha_register_raw_size);
set_gdbarch_deprecated_max_register_raw_size (gdbarch, ALPHA_MAX_REGISTER_RAW_SIZE);
hidden behind the regcache abstraction. */
static void
arm_linux_extract_return_value (struct type *type,
- char regbuf[REGISTER_BYTES],
+ char regbuf[],
char *valbuf)
{
/* ScottB: This needs to be looked at to handle the different
set_gdbarch_sp_regnum (gdbarch, ARM_SP_REGNUM);
set_gdbarch_pc_regnum (gdbarch, ARM_PC_REGNUM);
set_gdbarch_register_byte (gdbarch, arm_register_byte);
- set_gdbarch_register_bytes (gdbarch,
- (NUM_GREGS * INT_REGISTER_RAW_SIZE
- + NUM_FREGS * FP_REGISTER_RAW_SIZE
- + NUM_SREGS * STATUS_REGISTER_SIZE));
+ set_gdbarch_deprecated_register_bytes (gdbarch,
+ (NUM_GREGS * INT_REGISTER_RAW_SIZE
+ + NUM_FREGS * FP_REGISTER_RAW_SIZE
+ + NUM_SREGS * STATUS_REGISTER_SIZE));
set_gdbarch_num_regs (gdbarch, NUM_GREGS + NUM_FREGS + NUM_SREGS);
set_gdbarch_register_raw_size (gdbarch, arm_register_raw_size);
set_gdbarch_register_virtual_size (gdbarch, arm_register_virtual_size);
set_gdbarch_register_name (gdbarch, avr_register_name);
set_gdbarch_deprecated_register_size (gdbarch, 1);
- set_gdbarch_register_bytes (gdbarch, AVR_NUM_REG_BYTES);
+ set_gdbarch_deprecated_register_bytes (gdbarch, AVR_NUM_REG_BYTES);
set_gdbarch_register_byte (gdbarch, avr_register_byte);
set_gdbarch_register_raw_size (gdbarch, avr_register_raw_size);
set_gdbarch_deprecated_max_register_raw_size (gdbarch, 4);
need 8 bytes for each register, plus an additional 8 bytes for each
of the 128 floating point registers. */
-#define REGISTER_BYTES (NUM_REGS*8+128*8)
+#define DEPRECATED_REGISTER_BYTES (NUM_REGS*8+128*8)
/* Index within `registers' of the first byte of the space for
register N. */
/* We have to grab the regs since we store all regs at once. */
-#define CHILD_PREPARE_TO_STORE() deprecated_read_register_bytes (0, NULL, REGISTER_BYTES)
+#define CHILD_PREPARE_TO_STORE() deprecated_read_register_bytes (0, NULL, DEPRECATED_REGISTER_BYTES)
<machine/reg.h>. */
/* a&d, pc,sr, fp, fpstat, fpflags */
-#define REGISTER_BYTES (16*4 + 8 + 8*12 + 3*4 + 4)
+#define DEPRECATED_REGISTER_BYTES (16*4 + 8 + 8*12 + 3*4 + 4)
#define NUM_REGS 31
#define REGISTER_BYTES_OK(b) \
- ((b) == REGISTER_BYTES \
+ ((b) == DEPRECATED_REGISTER_BYTES \
|| (b) == REGISTER_BYTES_FP \
|| (b) == REGISTER_BYTES_NOFP)
* Irix 6 (n32 ABI) has 32-bit GP regs and 64-bit FP regs
*/
-#undef REGISTER_BYTES
-#define REGISTER_BYTES (MIPS_NUMREGS * 8 + (NUM_REGS - MIPS_NUMREGS) * MIPS_REGSIZE)
+#undef DEPRECATED_REGISTER_BYTES
+#define DEPRECATED_REGISTER_BYTES (MIPS_NUMREGS * 8 + (NUM_REGS - MIPS_NUMREGS) * MIPS_REGSIZE)
#undef REGISTER_BYTE
#define REGISTER_BYTE(N) \
#define FCRIR_REGNUM 70 /* FP implementation/revision */
-#undef REGISTER_BYTES
-#define REGISTER_BYTES (MIPS_NUMREGS * 8 + (NUM_REGS - MIPS_NUMREGS) * MIPS_REGSIZE)
+#undef DEPRECATED_REGISTER_BYTES
+#define DEPRECATED_REGISTER_BYTES (MIPS_NUMREGS * 8 + (NUM_REGS - MIPS_NUMREGS) * MIPS_REGSIZE)
#undef REGISTER_BYTE
#define REGISTER_BYTE(N) \
/* Total amount of space needed to store our copies of the machine's
register state, the array `registers'. */
-#define REGISTER_BYTES (NUM_REGS*MIPS_REGSIZE)
+#define DEPRECATED_REGISTER_BYTES (NUM_REGS*MIPS_REGSIZE)
/* Index within `registers' of the first byte of the space for
register N. */
extern char *gnu_target_pid_to_str (int pid);
/* Before storing, we need to read all the registers. */
-#define CHILD_PREPARE_TO_STORE() deprecated_read_register_bytes (0, NULL, REGISTER_BYTES)
+#define CHILD_PREPARE_TO_STORE() deprecated_read_register_bytes (0, NULL, DEPRECATED_REGISTER_BYTES)
/* Don't do wait_for_inferior on attach. */
#define ATTACH_NO_WAIT
/* Total amount of space needed to store our copies of the machine's
register state, the array `registers'. */
#if !GDB_MULTI_ARCH
-#define REGISTER_BYTES (NUM_REGS * 4)
+#define DEPRECATED_REGISTER_BYTES (NUM_REGS * 4)
#endif
#if !GDB_MULTI_ARCH
/* Total amount of space needed to store our copies of the machine's
register state, the array `registers'. */
-#undef REGISTER_BYTES
-#define REGISTER_BYTES (NUM_REGS * 8)
+#undef DEPRECATED_REGISTER_BYTES
+#define DEPRECATED_REGISTER_BYTES (NUM_REGS * 8)
/* Index within `registers' of the first byte of the space for
register N. */
#define REGISTER_RAW_SIZE(reg_nr) s390x_register_raw_size(reg_nr)
#define GDB_TARGET_IS_ESAME (1)
#define DEPRECATED_REGISTER_SIZE (8)
-#define REGISTER_BYTES S390X_REGISTER_BYTES
+#define DEPRECATED_REGISTER_BYTES S390X_REGISTER_BYTES
#else /* CONFIG_ARCH_S390X */
#define REGISTER_RAW_SIZE(reg_nr) s390_register_raw_size(reg_nr)
#define GDB_TARGET_IS_ESAME (0)
#define DEPRECATED_REGISTER_SIZE (4)
-#define REGISTER_BYTES S390_REGISTER_BYTES
+#define DEPRECATED_REGISTER_BYTES S390_REGISTER_BYTES
#endif /* CONFIG_ARCH_S390X */
/* Before storing, we need to read all the registers. */
-#define CHILD_PREPARE_TO_STORE() deprecated_read_register_bytes (0, NULL, REGISTER_BYTES)
+#define CHILD_PREPARE_TO_STORE() deprecated_read_register_bytes (0, NULL, DEPRECATED_REGISTER_BYTES)
#endif /* NM_NBSD_H */
/* Before storing, we need to read all the registers. */
-#define CHILD_PREPARE_TO_STORE() deprecated_read_register_bytes (0, NULL, REGISTER_BYTES)
+#define CHILD_PREPARE_TO_STORE() deprecated_read_register_bytes (0, NULL, DEPRECATED_REGISTER_BYTES)
/* Return sizeof user struct to callers in less machine dependent routines */
/* Before storing, we need to read all the registers. */
-#define CHILD_PREPARE_TO_STORE() deprecated_read_register_bytes (0, NULL, REGISTER_BYTES)
+#define CHILD_PREPARE_TO_STORE() deprecated_read_register_bytes (0, NULL, DEPRECATED_REGISTER_BYTES)
/* Solaris PSRVADDR support does not seem to include a place for nPC. */
register state, the array `registers'.
Some of the registers aren't 64 bits, but it's a lot simpler just to assume
they all are (since most of them are). */
-#undef REGISTER_BYTES
-#define REGISTER_BYTES (32*8+32*8+45*8)
+#undef DEPRECATED_REGISTER_BYTES
+#define DEPRECATED_REGISTER_BYTES (32*8+32*8+45*8)
/* Index within `registers' of the first byte of the space for
register N. */
other hand, that is likely to be confusing or worse for flat
frames. */
-#define REGISTER_BYTES (32*4+32*4+8*4)
+#define DEPRECATED_REGISTER_BYTES (32*4+32*4+8*4)
/* Index within `registers' of the first byte of the space for
register N. */
int
cris_register_bytes_ok (long bytes)
{
- return (bytes == REGISTER_BYTES);
+ return (bytes == DEPRECATED_REGISTER_BYTES);
}
/* Extract from an array regbuf containing the raw register state a function
internal_error (__FILE__, __LINE__, "cris_gdbarch_init: unknown CRIS version");
}
- set_gdbarch_register_bytes (gdbarch, register_bytes);
+ set_gdbarch_deprecated_register_bytes (gdbarch, register_bytes);
/* Returns the register offset for the first byte of register regno's space
in the saved register state. */
+2003-05-16 Andrew Cagney <cagney@redhat.com>
+
+ * gdbint.texinfo (Target Architecture Definition): Replace
+ REGISTER_BYTES with DEPRECATED_REGISTER_BYTES. Fix typo,
+ DEPRECATED_REGISTER_SIZE instead of REGISTER_BYTE.
+
2003-05-14 Theodore A. Roth <troth@openavr.org>
* gdbint.texinfo (Breakpoint Handling): Correct a double negative.
@item DEPRECATED_CALL_DUMMY_WORDS
@findex DEPRECATED_CALL_DUMMY_WORDS
Pointer to an array of @code{LONGEST} words of data containing
-host-byte-ordered @code{REGISTER_BYTES} sized values that partially
-specify the sequence of instructions needed for an inferior function
-call.
+host-byte-ordered @code{DEPRECATED_REGISTER_SIZE} sized values that
+partially specify the sequence of instructions needed for an inferior
+function call.
Should be deprecated in favor of a macro that uses target-byte-ordered
data.
@findex DEPRECATED_PUSH_DUMMY_FRAME
Used in @samp{call_function_by_hand} to create an artificial stack frame.
-@item REGISTER_BYTES
-@findex REGISTER_BYTES
-The total amount of space needed to store @value{GDBN}'s copy of the machine's
-register state.
+@item DEPRECATED_REGISTER_BYTES
+@findex DEPRECATED_REGISTER_BYTES
+The total amount of space needed to store @value{GDBN}'s copy of the
+machine's register state.
+
+This is no longer needed. @value{GDBN} instead computes the size of the
+register buffer at run-time.
@item REGISTER_NAME(@var{i})
@findex REGISTER_NAME
set_gdbarch_register_name (gdbarch, frv_register_name);
set_gdbarch_deprecated_register_size (gdbarch, 4);
- set_gdbarch_register_bytes (gdbarch, frv_num_regs * 4);
+ set_gdbarch_deprecated_register_bytes (gdbarch, frv_num_regs * 4);
set_gdbarch_register_byte (gdbarch, frv_register_byte);
set_gdbarch_register_raw_size (gdbarch, frv_register_raw_size);
set_gdbarch_deprecated_max_register_raw_size (gdbarch, 4);
gdbarch_dwarf2_reg_to_regnum_ftype *dwarf2_reg_to_regnum;
gdbarch_register_name_ftype *register_name;
int deprecated_register_size;
- int register_bytes;
+ int deprecated_register_bytes;
gdbarch_register_byte_ftype *register_byte;
gdbarch_register_raw_size_ftype *register_raw_size;
int deprecated_max_register_raw_size;
(long) current_gdbarch->deprecated_push_return_address
/*DEPRECATED_PUSH_RETURN_ADDRESS ()*/);
#endif
+#ifdef DEPRECATED_REGISTER_BYTES
+ fprintf_unfiltered (file,
+ "gdbarch_dump: DEPRECATED_REGISTER_BYTES # %s\n",
+ XSTRING (DEPRECATED_REGISTER_BYTES));
+ fprintf_unfiltered (file,
+ "gdbarch_dump: DEPRECATED_REGISTER_BYTES = %d\n",
+ DEPRECATED_REGISTER_BYTES);
+#endif
#ifdef DEPRECATED_REGISTER_SIZE
fprintf_unfiltered (file,
"gdbarch_dump: DEPRECATED_REGISTER_SIZE # %s\n",
(long) current_gdbarch->register_byte
/*REGISTER_BYTE ()*/);
#endif
-#ifdef REGISTER_BYTES
- fprintf_unfiltered (file,
- "gdbarch_dump: REGISTER_BYTES # %s\n",
- XSTRING (REGISTER_BYTES));
- fprintf_unfiltered (file,
- "gdbarch_dump: REGISTER_BYTES = %d\n",
- REGISTER_BYTES);
-#endif
#ifdef REGISTER_BYTES_OK_P
fprintf_unfiltered (file,
"gdbarch_dump: %s # %s\n",
}
int
-gdbarch_register_bytes (struct gdbarch *gdbarch)
+gdbarch_deprecated_register_bytes (struct gdbarch *gdbarch)
{
gdb_assert (gdbarch != NULL);
if (gdbarch_debug >= 2)
- fprintf_unfiltered (gdb_stdlog, "gdbarch_register_bytes called\n");
- return gdbarch->register_bytes;
+ fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_register_bytes called\n");
+ return gdbarch->deprecated_register_bytes;
}
void
-set_gdbarch_register_bytes (struct gdbarch *gdbarch,
- int register_bytes)
+set_gdbarch_deprecated_register_bytes (struct gdbarch *gdbarch,
+ int deprecated_register_bytes)
{
- gdbarch->register_bytes = register_bytes;
+ gdbarch->deprecated_register_bytes = deprecated_register_bytes;
}
int
#define DEPRECATED_REGISTER_SIZE (gdbarch_deprecated_register_size (current_gdbarch))
#endif
-extern int gdbarch_register_bytes (struct gdbarch *gdbarch);
-extern void set_gdbarch_register_bytes (struct gdbarch *gdbarch, int register_bytes);
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (REGISTER_BYTES)
-#error "Non multi-arch definition of REGISTER_BYTES"
+extern int gdbarch_deprecated_register_bytes (struct gdbarch *gdbarch);
+extern void set_gdbarch_deprecated_register_bytes (struct gdbarch *gdbarch, int deprecated_register_bytes);
+#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_REGISTER_BYTES)
+#error "Non multi-arch definition of DEPRECATED_REGISTER_BYTES"
#endif
-#if !defined (REGISTER_BYTES)
-#define REGISTER_BYTES (gdbarch_register_bytes (current_gdbarch))
+#if !defined (DEPRECATED_REGISTER_BYTES)
+#define DEPRECATED_REGISTER_BYTES (gdbarch_deprecated_register_bytes (current_gdbarch))
#endif
/* NOTE: cagney/2002-05-02: This function with predicate has a valid
f:2:DWARF2_REG_TO_REGNUM:int:dwarf2_reg_to_regnum:int dwarf2_regnr:dwarf2_regnr:::no_op_reg_to_regnum::0
f:2:REGISTER_NAME:const char *:register_name:int regnr:regnr:::legacy_register_name::0
v::DEPRECATED_REGISTER_SIZE:int:deprecated_register_size
-v::REGISTER_BYTES:int:register_bytes
+v::DEPRECATED_REGISTER_BYTES:int:deprecated_register_bytes
# NOTE: cagney/2002-05-02: This function with predicate has a valid
# (callable) initial value. As a consequence, even when the predicate
# is false, the corresponding function works. This simplifies the
set_gdbarch_pc_regnum (gdbarch, E_PC_REGNUM);
set_gdbarch_register_name (gdbarch, h8300_register_name);
set_gdbarch_deprecated_register_size (gdbarch, BINWORD);
- set_gdbarch_register_bytes (gdbarch, E_NUM_REGS * BINWORD);
+ set_gdbarch_deprecated_register_bytes (gdbarch, E_NUM_REGS * BINWORD);
set_gdbarch_register_byte (gdbarch, h8300_register_byte);
set_gdbarch_register_raw_size (gdbarch, h8300_register_raw_size);
set_gdbarch_deprecated_max_register_raw_size (gdbarch, h8300h_reg_size);
void
pa_do_registers_info (int regnum, int fpregs)
{
- char raw_regs[REGISTER_BYTES];
+ char *raw_regs = alloca (DEPRECATED_REGISTER_BYTES);
int i;
/* Make a copy of gdb's save area (may cause actual
pa_do_strcat_registers_info (int regnum, int fpregs, struct ui_file *stream,
enum precision_type precision)
{
- char raw_regs[REGISTER_BYTES];
+ char *raw_regs = alloca (DEPRECATED_REGISTER_BYTES);
int i;
/* Make a copy of gdb's save area (may cause actual
set_gdbarch_pc_regnum (gdbarch, PCOQ_HEAD_REGNUM);
set_gdbarch_npc_regnum (gdbarch, PCOQ_TAIL_REGNUM);
set_gdbarch_register_raw_size (gdbarch, hppa_register_raw_size);
- set_gdbarch_register_bytes (gdbarch, hppa_num_regs * 4);
+ set_gdbarch_deprecated_register_bytes (gdbarch, hppa_num_regs * 4);
set_gdbarch_register_byte (gdbarch, hppa_register_byte);
set_gdbarch_register_virtual_size (gdbarch, hppa_register_raw_size);
set_gdbarch_deprecated_max_register_raw_size (gdbarch, 4);
set_gdbarch_num_regs (gdbarch, I386_SSE_NUM_REGS + 1);
set_gdbarch_register_name (gdbarch, i386_linux_register_name);
set_gdbarch_register_reggroup_p (gdbarch, i386_linux_register_reggroup_p);
- set_gdbarch_register_bytes (gdbarch, I386_SSE_SIZEOF_REGS + 4);
+ set_gdbarch_deprecated_register_bytes (gdbarch, I386_SSE_SIZEOF_REGS + 4);
tdep->jb_pc_offset = 20; /* From <bits/setjmp.h>. */
set_gdbarch_register_name (gdbarch, i386_register_name);
set_gdbarch_deprecated_register_size (gdbarch, 4);
- set_gdbarch_register_bytes (gdbarch, I386_SIZEOF_GREGS + I386_SIZEOF_FREGS);
+ set_gdbarch_deprecated_register_bytes (gdbarch, I386_SIZEOF_GREGS + I386_SIZEOF_FREGS);
set_gdbarch_register_type (gdbarch, i386_register_type);
set_gdbarch_print_float_info (gdbarch, i387_print_float_info);
/* Sizes of individual register sets. These cover the entire register
file, so summing up the sizes of those portions actually present
- yields REGISTER_BYTES. */
+ yields DEPRECATED_REGISTER_BYTES. */
#define I386_SIZEOF_GREGS (I386_NUM_GREGS * 4)
#define I386_SIZEOF_FREGS (8 * 10 + 8 * 4)
#define I386_SIZEOF_XREGS (8 * 16 + 4)
set_gdbarch_register_name (gdbarch, ia64_register_name);
set_gdbarch_deprecated_register_size (gdbarch, 8);
- set_gdbarch_register_bytes (gdbarch, ia64_num_regs * 8 + 128*8);
+ set_gdbarch_deprecated_register_bytes (gdbarch, ia64_num_regs * 8 + 128*8);
set_gdbarch_register_byte (gdbarch, ia64_register_byte);
set_gdbarch_register_raw_size (gdbarch, ia64_register_raw_size);
set_gdbarch_deprecated_max_register_raw_size (gdbarch, 16);
fetch_core_registers (char *core_reg_sect, unsigned core_reg_size,
int which, CORE_ADDR reg_addr)
{
- if (core_reg_size != REGISTER_BYTES)
+ if (core_reg_size != DEPRECATED_REGISTER_BYTES)
{
warning ("wrong size gregset struct in core file");
return;
fetch_core_registers (char *core_reg_sect, unsigned core_reg_size,
int which, CORE_ADDR reg_addr)
{
- if (core_reg_size == REGISTER_BYTES)
+ if (core_reg_size == DEPRECATED_REGISTER_BYTES)
{
memcpy ((char *) deprecated_registers, core_reg_sect, core_reg_size);
}
set_gdbarch_deprecated_fp_regnum (gdbarch, SOFT_FP_REGNUM);
set_gdbarch_register_name (gdbarch, m68hc11_register_name);
set_gdbarch_deprecated_register_size (gdbarch, 2);
- set_gdbarch_register_bytes (gdbarch, M68HC11_ALL_REGS * 2);
+ set_gdbarch_deprecated_register_bytes (gdbarch, M68HC11_ALL_REGS * 2);
set_gdbarch_register_virtual_type (gdbarch, m68hc11_register_virtual_type);
set_gdbarch_pseudo_register_read (gdbarch, m68hc11_pseudo_register_read);
set_gdbarch_pseudo_register_write (gdbarch, m68hc11_pseudo_register_write);
set_gdbarch_register_byte (gdbarch, m68k_register_byte);
set_gdbarch_num_regs (gdbarch, 29);
set_gdbarch_register_bytes_ok (gdbarch, m68k_register_bytes_ok);
- set_gdbarch_register_bytes (gdbarch, (16 * 4 + 8 + 8 * 12 + 3 * 4));
+ set_gdbarch_deprecated_register_bytes (gdbarch, (16 * 4 + 8 + 8 * 12 + 3 * 4));
set_gdbarch_sp_regnum (gdbarch, M68K_SP_REGNUM);
set_gdbarch_deprecated_fp_regnum (gdbarch, M68K_FP_REGNUM);
set_gdbarch_pc_regnum (gdbarch, M68K_PC_REGNUM);
set_gdbarch_register_virtual_size (gdbarch, mcore_register_size);
set_gdbarch_register_raw_size (gdbarch, mcore_register_size);
set_gdbarch_register_byte (gdbarch, mcore_register_byte);
- set_gdbarch_register_bytes (gdbarch, MCORE_REG_SIZE * MCORE_NUM_REGS);
+ set_gdbarch_deprecated_register_bytes (gdbarch, MCORE_REG_SIZE * MCORE_NUM_REGS);
set_gdbarch_num_regs (gdbarch, MCORE_NUM_REGS);
set_gdbarch_pc_regnum (gdbarch, 64);
set_gdbarch_sp_regnum (gdbarch, 0);
+2003-05-16 Andrew Cagney <cagney@redhat.com>
+
+ * mi-main.c (mi_setup_architecture_data):
+
2003-05-12 Elena Zannoni <ezannoni@redhat.com>
* mi-mi-cmd-stack.c (list_args_or_locals): Rename VAR_NAMESPACE to
void
mi_setup_architecture_data (void)
{
- /* don't trust REGISTER_BYTES to be zero. */
- old_regs = xmalloc (REGISTER_BYTES + 1);
- memset (old_regs, 0, REGISTER_BYTES + 1);
+ /* don't trust DEPRECATED_REGISTER_BYTES to be zero. */
+ old_regs = xmalloc (DEPRECATED_REGISTER_BYTES + 1);
+ memset (old_regs, 0, DEPRECATED_REGISTER_BYTES + 1);
}
void
static void
mips_eabi_extract_return_value (struct type *valtype,
- char regbuf[REGISTER_BYTES],
+ char regbuf[],
char *valbuf)
{
struct return_value_word lo;
static void
mips_o64_extract_return_value (struct type *valtype,
- char regbuf[REGISTER_BYTES],
+ char regbuf[],
char *valbuf)
{
struct return_value_word lo;
set_gdbarch_num_regs (gdbarch, num_regs);
set_gdbarch_register_name (gdbarch, register_name);
set_gdbarch_deprecated_register_size (gdbarch, 4);
- set_gdbarch_register_bytes (gdbarch, num_regs * gdbarch_deprecated_register_size (gdbarch));
+ set_gdbarch_deprecated_register_bytes (gdbarch, num_regs * gdbarch_deprecated_register_size (gdbarch));
set_gdbarch_deprecated_max_register_raw_size (gdbarch, 4);
set_gdbarch_register_raw_size (gdbarch, mn10300_register_raw_size);
set_gdbarch_register_byte (gdbarch, mn10300_register_byte);
set_gdbarch_num_regs (gdbarch, NS32K_NUM_REGS_32082);
set_gdbarch_register_name (gdbarch, ns32k_register_name_32082);
- set_gdbarch_register_bytes (gdbarch, NS32K_REGISTER_BYTES_32082);
+ set_gdbarch_deprecated_register_bytes (gdbarch, NS32K_REGISTER_BYTES_32082);
set_gdbarch_register_byte (gdbarch, ns32k_register_byte_32082);
}
set_gdbarch_num_regs (gdbarch, NS32K_NUM_REGS_32382);
set_gdbarch_register_name (gdbarch, ns32k_register_name_32382);
- set_gdbarch_register_bytes (gdbarch, NS32K_REGISTER_BYTES_32382);
+ set_gdbarch_deprecated_register_bytes (gdbarch, NS32K_REGISTER_BYTES_32382);
set_gdbarch_register_byte (gdbarch, ns32k_register_byte_32382);
}
}
/* Compute the real size of the register buffer. Start out by
- trusting REGISTER_BYTES, but then adjust it upwards should that
- be found to not be sufficient. */
- /* FIXME: cagney/2002-11-05: Instead of using REGISTER_BYTES, this
- code should, as is done in init_regcache_descr(), compute the
- total number of register bytes using the accumulated offsets. */
- descr->sizeof_cooked_registers = REGISTER_BYTES; /* OK use. */
+ trusting DEPRECATED_REGISTER_BYTES, but then adjust it upwards
+ should that be found to not be sufficient. */
+ /* FIXME: cagney/2002-11-05: Instead of using the macro
+ DEPRECATED_REGISTER_BYTES, this code should, as is done in
+ init_regcache_descr(), compute the total number of register bytes
+ using the accumulated offsets. */
+ descr->sizeof_cooked_registers = DEPRECATED_REGISTER_BYTES; /* OK */
for (i = 0; i < descr->nr_cooked_registers; i++)
{
long regend;
gdb_assert (descr->sizeof_register[i] == REGISTER_VIRTUAL_SIZE (i));
#endif
}
- /* gdb_assert (descr->sizeof_raw_registers == REGISTER_BYTES (i)); */
+ /* gdb_assert (descr->sizeof_raw_registers == DEPRECATED_REGISTER_BYTES (i)); */
return descr;
}
#endif
static int timeout = 30;
-/* Having this larger than 400 causes us to be incompatible with m68k-stub.c
- and i386-stub.c. Normally, no one would notice because it only matters
- for writing large chunks of memory (e.g. in downloads). Also, this needs
- to be more than 400 if required to hold the registers (see below, where
- we round it up based on REGISTER_BYTES). */
+/* Having this larger than 400 causes us to be incompatible with
+ m68k-stub.c and i386-stub.c. Normally, no one would notice because
+ it only matters for writing large chunks of memory (e.g. in
+ downloads). Also, this needs to be more than 400 if required to
+ hold the registers (see below, where we round it up based on
+ DEPRECATED_REGISTER_BYTES). */
#define PBUFSIZ 400
/*
{
unsigned char buf[PBUFSIZ];
int i, retlen;
- char regs[REGISTER_BYTES];
+ char *regs = alloca (DEPRECATED_REGISTER_BYTES);
/* Unimplemented registers read as all bits zero. */
- memset (regs, 0, REGISTER_BYTES);
+ memset (regs, 0, DEPRECATED_REGISTER_BYTES);
buf[0] = 18;
buf[1] = 1;
sds_prepare_to_store (void)
{
/* Make sure the entire registers array is valid. */
- deprecated_read_register_bytes (0, (char *) NULL, REGISTER_BYTES);
+ deprecated_read_register_bytes (0, (char *) NULL, DEPRECATED_REGISTER_BYTES);
}
/* Store register REGNO, or all registers if REGNO == -1, from the contents
vx_prepare_to_store (void)
{
/* Fetch all registers, if any of them are not yet fetched. */
- deprecated_read_register_bytes (0, NULL, REGISTER_BYTES);
+ deprecated_read_register_bytes (0, NULL, DEPRECATED_REGISTER_BYTES);
}
/* Copy LEN bytes to or from remote inferior's memory starting at MEMADDR
/* Start out by having the remote protocol mimic the existing
behavour - just copy in the description of the register cache. */
- rs->sizeof_g_packet = REGISTER_BYTES; /* OK use. */
+ rs->sizeof_g_packet = DEPRECATED_REGISTER_BYTES; /* OK */
/* Assume a 1:1 regnum<->pnum table. */
rs->regs = xcalloc (NUM_REGS + NUM_PSEUDO_REGS, sizeof (struct packet_reg));
forcing the register cache to read its and not the target
registers. */
deprecated_read_register_bytes (0, (char *) NULL,
- REGISTER_BYTES); /* OK use. */
+ DEPRECATED_REGISTER_BYTES); /* OK */
break;
case PACKET_ENABLE:
break;
}
/* Make sure that all registers are valid. */
- deprecated_read_register_bytes (0, NULL, REGISTER_BYTES);
+ deprecated_read_register_bytes (0, NULL, DEPRECATED_REGISTER_BYTES);
/* Figure out previous %pc value. If the function is frameless, it is
still in the link register, otherwise walk the frames and retrieve the
set_gdbarch_num_pseudo_regs (gdbarch, v->npregs);
set_gdbarch_register_name (gdbarch, rs6000_register_name);
set_gdbarch_deprecated_register_size (gdbarch, wordsize);
- set_gdbarch_register_bytes (gdbarch, off);
+ set_gdbarch_deprecated_register_bytes (gdbarch, off);
set_gdbarch_register_byte (gdbarch, rs6000_register_byte);
set_gdbarch_register_raw_size (gdbarch, rs6000_register_raw_size);
set_gdbarch_deprecated_max_register_raw_size (gdbarch, 16);
set_gdbarch_register_virtual_type (gdbarch, s390_register_virtual_type);
set_gdbarch_addr_bits_remove (gdbarch, s390_addr_bits_remove);
- set_gdbarch_register_bytes (gdbarch, S390_REGISTER_BYTES);
+ set_gdbarch_deprecated_register_bytes (gdbarch, S390_REGISTER_BYTES);
break;
case bfd_mach_s390_64:
set_gdbarch_deprecated_register_size (gdbarch, 8);
set_gdbarch_long_bit (gdbarch, 64);
set_gdbarch_long_long_bit (gdbarch, 64);
set_gdbarch_ptr_bit (gdbarch, 64);
- set_gdbarch_register_bytes (gdbarch, S390X_REGISTER_BYTES);
+ set_gdbarch_deprecated_register_bytes (gdbarch, S390X_REGISTER_BYTES);
set_gdbarch_address_class_type_flags (gdbarch,
s390_address_class_type_flags);
set_gdbarch_address_class_type_flags_to_name (gdbarch,
set_gdbarch_deprecated_fp_regnum (gdbarch, 14);
set_gdbarch_pc_regnum (gdbarch, 16);
set_gdbarch_deprecated_register_size (gdbarch, 4);
- set_gdbarch_register_bytes (gdbarch, SH_DEFAULT_NUM_REGS * 4);
+ set_gdbarch_deprecated_register_bytes (gdbarch, SH_DEFAULT_NUM_REGS * 4);
set_gdbarch_deprecated_do_registers_info (gdbarch, sh_do_registers_info);
set_gdbarch_breakpoint_from_pc (gdbarch, sh_breakpoint_from_pc);
set_gdbarch_deprecated_frame_chain (gdbarch, sh_frame_chain);
ISA16(compact) or ISA32(media). */
set_gdbarch_num_regs (gdbarch, SIM_SH64_NR_REGS);
set_gdbarch_deprecated_register_size (gdbarch, 8); /*????*/
- set_gdbarch_register_bytes (gdbarch,
- ((SIM_SH64_NR_FP_REGS + 1) * 4)
- + (SIM_SH64_NR_REGS - SIM_SH64_NR_FP_REGS -1) * 8);
+ set_gdbarch_deprecated_register_bytes (gdbarch,
+ ((SIM_SH64_NR_FP_REGS + 1) * 4)
+ + (SIM_SH64_NR_REGS - SIM_SH64_NR_FP_REGS -1) * 8);
sh_register_name = sh_sh64_register_name;
sh_show_regs = sh64_show_regs;
int regnum;
fsr = alloca (NUM_REGS * sizeof (CORE_ADDR));
- raw_buffer = alloca (REGISTER_BYTES);
+ raw_buffer = alloca (DEPRECATED_REGISTER_BYTES);
sparc_frame_find_saved_regs (frame, &fsr[0]);
if (SPARC_HAS_FPU)
{
case bfd_mach_sparc:
set_gdbarch_deprecated_extract_return_value (gdbarch, sparc32_extract_return_value);
set_gdbarch_num_regs (gdbarch, 72);
- set_gdbarch_register_bytes (gdbarch, 32*4 + 32*4 + 8*4);
+ set_gdbarch_deprecated_register_bytes (gdbarch, 32*4 + 32*4 + 8*4);
set_gdbarch_register_name (gdbarch, sparc32_register_name);
set_gdbarch_deprecated_store_return_value (gdbarch, sparc_store_return_value);
#if 0
case bfd_mach_sparc_v8plus:
set_gdbarch_deprecated_extract_return_value (gdbarch, sparc32_extract_return_value);
set_gdbarch_num_regs (gdbarch, 72);
- set_gdbarch_register_bytes (gdbarch, 32*4 + 32*4 + 8*4);
+ set_gdbarch_deprecated_register_bytes (gdbarch, 32*4 + 32*4 + 8*4);
set_gdbarch_register_name (gdbarch, sparc32_register_name);
set_gdbarch_deprecated_store_return_value (gdbarch, sparc_store_return_value);
tdep->print_insn_mach = bfd_mach_sparc;
case bfd_mach_sparc_v8plusa:
set_gdbarch_deprecated_extract_return_value (gdbarch, sparc32_extract_return_value);
set_gdbarch_num_regs (gdbarch, 72);
- set_gdbarch_register_bytes (gdbarch, 32*4 + 32*4 + 8*4);
+ set_gdbarch_deprecated_register_bytes (gdbarch, 32*4 + 32*4 + 8*4);
set_gdbarch_register_name (gdbarch, sparc32_register_name);
set_gdbarch_deprecated_store_return_value (gdbarch, sparc_store_return_value);
#if 0
case bfd_mach_sparc_v9:
set_gdbarch_deprecated_extract_return_value (gdbarch, sparc64_extract_return_value);
set_gdbarch_num_regs (gdbarch, 125);
- set_gdbarch_register_bytes (gdbarch, 32*8 + 32*8 + 45*8);
+ set_gdbarch_deprecated_register_bytes (gdbarch, 32*8 + 32*8 + 45*8);
set_gdbarch_register_name (gdbarch, sparc64_register_name);
set_gdbarch_deprecated_store_return_value (gdbarch, sparc_store_return_value);
#if 0
case bfd_mach_sparc_v9a:
set_gdbarch_deprecated_extract_return_value (gdbarch, sparc64_extract_return_value);
set_gdbarch_num_regs (gdbarch, 125);
- set_gdbarch_register_bytes (gdbarch, 32*8 + 32*8 + 45*8);
+ set_gdbarch_deprecated_register_bytes (gdbarch, 32*8 + 32*8 + 45*8);
set_gdbarch_register_name (gdbarch, sparc64_register_name);
set_gdbarch_deprecated_store_return_value (gdbarch, sparc_store_return_value);
#if 0
set_gdbarch_pc_regnum (gdbarch, E_PC_REGNUM);
set_gdbarch_register_name (gdbarch, v850_register_name);
set_gdbarch_deprecated_register_size (gdbarch, v850_reg_size);
- set_gdbarch_register_bytes (gdbarch, E_ALL_REGS_SIZE);
+ set_gdbarch_deprecated_register_bytes (gdbarch, E_ALL_REGS_SIZE);
set_gdbarch_register_byte (gdbarch, v850_register_byte);
set_gdbarch_register_raw_size (gdbarch, v850_register_raw_size);
set_gdbarch_deprecated_max_register_raw_size (gdbarch, v850_reg_size);
set_gdbarch_register_name (gdbarch, vax_register_name);
set_gdbarch_deprecated_register_size (gdbarch, VAX_REGISTER_SIZE);
- set_gdbarch_register_bytes (gdbarch, VAX_REGISTER_BYTES);
+ set_gdbarch_deprecated_register_bytes (gdbarch, VAX_REGISTER_BYTES);
set_gdbarch_register_byte (gdbarch, vax_register_byte);
set_gdbarch_register_raw_size (gdbarch, vax_register_raw_size);
set_gdbarch_deprecated_max_register_raw_size (gdbarch, VAX_MAX_REGISTER_RAW_SIZE);
SIZEOF_SSE_REGS) */
for (i = 0, sum = 0; i < X86_64_NUM_REGS; i++)
sum += x86_64_register_info_table[i].size;
- set_gdbarch_register_bytes (gdbarch, sum);
+ set_gdbarch_deprecated_register_bytes (gdbarch, sum);
set_gdbarch_register_raw_size (gdbarch, x86_64_register_raw_size);
set_gdbarch_register_byte (gdbarch, x86_64_register_byte);
set_gdbarch_pc_regnum (gdbarch, E_PC_REGNUM);
set_gdbarch_register_name (gdbarch, xstormy16_register_name);
set_gdbarch_deprecated_register_size (gdbarch, xstormy16_reg_size);
- set_gdbarch_register_bytes (gdbarch, E_ALL_REGS_SIZE);
+ set_gdbarch_deprecated_register_bytes (gdbarch, E_ALL_REGS_SIZE);
set_gdbarch_register_byte (gdbarch, xstormy16_register_byte);
set_gdbarch_register_raw_size (gdbarch, xstormy16_register_raw_size);
set_gdbarch_deprecated_max_register_raw_size (gdbarch, xstormy16_pc_size);