From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 873 invoked by alias); 15 May 2003 20:34:14 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 454 invoked from network); 15 May 2003 20:34:01 -0000 Received: from unknown (HELO localhost.redhat.com) (24.157.166.107) by sources.redhat.com with SMTP; 15 May 2003 20:34:01 -0000 Received: from redhat.com (localhost [127.0.0.1]) by localhost.redhat.com (Postfix) with ESMTP id 0BFBC2B2F for ; Thu, 15 May 2003 16:33:53 -0400 (EDT) Message-ID: <3EC3F9B1.1040904@redhat.com> Date: Thu, 15 May 2003 20:34:00 -0000 From: Andrew Cagney User-Agent: Mozilla/5.0 (X11; U; NetBSD macppc; en-US; rv:1.0.2) Gecko/20030223 X-Accept-Language: en-us, en MIME-Version: 1.0 To: gdb-patches@sources.redhat.com Subject: [patch rfc] Deprecate REGISTER_BYTES Content-Type: multipart/mixed; boundary="------------030007060700030405000704" X-SW-Source: 2003-05/txt/msg00255.txt.bz2 This is a multi-part message in MIME format. --------------030007060700030405000704 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Content-length: 89 Target architectures should no longer specify/use it. I'll commit in a few days, Andrew --------------030007060700030405000704 Content-Type: text/plain; name="diffs" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="diffs" Content-length: 48027 2003-05-15 Andrew Cagney * 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: TODO =================================================================== RCS file: /cvs/src/src/gdb/TODO,v retrieving revision 1.98 diff -u -r1.98 TODO --- TODO 4 Feb 2003 23:59:25 -0000 1.98 +++ TODO 15 May 2003 20:07:56 -0000 @@ -171,10 +171,6 @@ 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: Index: alpha-tdep.c =================================================================== RCS file: /cvs/src/src/gdb/alpha-tdep.c,v retrieving revision 1.84 diff -u -r1.84 alpha-tdep.c --- alpha-tdep.c 14 May 2003 17:43:15 -0000 1.84 +++ alpha-tdep.c 15 May 2003 20:10:10 -0000 @@ -1812,7 +1812,7 @@ 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); Index: arm-linux-tdep.c =================================================================== RCS file: /cvs/src/src/gdb/arm-linux-tdep.c,v retrieving revision 1.32 diff -u -r1.32 arm-linux-tdep.c --- arm-linux-tdep.c 13 May 2003 19:27:27 -0000 1.32 +++ arm-linux-tdep.c 15 May 2003 20:10:11 -0000 @@ -73,7 +73,7 @@ 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 Index: arm-tdep.c =================================================================== RCS file: /cvs/src/src/gdb/arm-tdep.c,v retrieving revision 1.134 diff -u -r1.134 arm-tdep.c --- arm-tdep.c 14 May 2003 17:43:16 -0000 1.134 +++ arm-tdep.c 15 May 2003 20:10:15 -0000 @@ -2976,10 +2976,10 @@ 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); Index: avr-tdep.c =================================================================== RCS file: /cvs/src/src/gdb/avr-tdep.c,v retrieving revision 1.48 diff -u -r1.48 avr-tdep.c --- avr-tdep.c 15 May 2003 18:10:04 -0000 1.48 +++ avr-tdep.c 15 May 2003 20:10:16 -0000 @@ -1171,7 +1171,7 @@ 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); Index: cris-tdep.c =================================================================== RCS file: /cvs/src/src/gdb/cris-tdep.c,v retrieving revision 1.71 diff -u -r1.71 cris-tdep.c --- cris-tdep.c 5 May 2003 17:56:54 -0000 1.71 +++ cris-tdep.c 15 May 2003 20:10:37 -0000 @@ -1042,7 +1042,7 @@ 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 @@ -4235,7 +4235,7 @@ 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. */ Index: frv-tdep.c =================================================================== RCS file: /cvs/src/src/gdb/frv-tdep.c,v retrieving revision 1.36 diff -u -r1.36 frv-tdep.c --- frv-tdep.c 13 May 2003 19:27:28 -0000 1.36 +++ frv-tdep.c 15 May 2003 20:10:37 -0000 @@ -1058,7 +1058,7 @@ 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); Index: gdbarch.sh =================================================================== RCS file: /cvs/src/src/gdb/gdbarch.sh,v retrieving revision 1.235 diff -u -r1.235 gdbarch.sh --- gdbarch.sh 8 May 2003 20:52:47 -0000 1.235 +++ gdbarch.sh 15 May 2003 20:10:49 -0000 @@ -473,7 +473,7 @@ 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 Index: h8300-tdep.c =================================================================== RCS file: /cvs/src/src/gdb/h8300-tdep.c,v retrieving revision 1.58 diff -u -r1.58 h8300-tdep.c --- h8300-tdep.c 5 May 2003 17:56:55 -0000 1.58 +++ h8300-tdep.c 15 May 2003 20:10:52 -0000 @@ -1105,7 +1105,7 @@ 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); Index: hppa-tdep.c =================================================================== RCS file: /cvs/src/src/gdb/hppa-tdep.c,v retrieving revision 1.76 diff -u -r1.76 hppa-tdep.c --- hppa-tdep.c 14 May 2003 17:43:17 -0000 1.76 +++ hppa-tdep.c 15 May 2003 20:14:15 -0000 @@ -2529,7 +2529,7 @@ 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 @@ -2573,7 +2573,7 @@ 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 @@ -4997,7 +4997,7 @@ 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); Index: i386-linux-tdep.c =================================================================== RCS file: /cvs/src/src/gdb/i386-linux-tdep.c,v retrieving revision 1.26 diff -u -r1.26 i386-linux-tdep.c --- i386-linux-tdep.c 11 Apr 2003 18:15:38 -0000 1.26 +++ i386-linux-tdep.c 15 May 2003 20:14:15 -0000 @@ -461,7 +461,7 @@ 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 . */ Index: i386-tdep.c =================================================================== RCS file: /cvs/src/src/gdb/i386-tdep.c,v retrieving revision 1.143 diff -u -r1.143 i386-tdep.c --- i386-tdep.c 13 May 2003 19:27:28 -0000 1.143 +++ i386-tdep.c 15 May 2003 20:14:20 -0000 @@ -1487,7 +1487,7 @@ 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); Index: i386-tdep.h =================================================================== RCS file: /cvs/src/src/gdb/i386-tdep.h,v retrieving revision 1.21 diff -u -r1.21 i386-tdep.h --- i386-tdep.h 12 Apr 2003 17:41:25 -0000 1.21 +++ i386-tdep.h 15 May 2003 20:14:20 -0000 @@ -148,7 +148,7 @@ /* 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) Index: ia64-tdep.c =================================================================== RCS file: /cvs/src/src/gdb/ia64-tdep.c,v retrieving revision 1.76 diff -u -r1.76 ia64-tdep.c --- ia64-tdep.c 13 May 2003 19:27:28 -0000 1.76 +++ ia64-tdep.c 15 May 2003 20:14:20 -0000 @@ -2176,7 +2176,7 @@ 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); Index: irix4-nat.c =================================================================== RCS file: /cvs/src/src/gdb/irix4-nat.c,v retrieving revision 1.11 diff -u -r1.11 irix4-nat.c --- irix4-nat.c 8 May 2003 22:33:14 -0000 1.11 +++ irix4-nat.c 15 May 2003 20:14:20 -0000 @@ -178,7 +178,7 @@ 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; Index: irix5-nat.c =================================================================== RCS file: /cvs/src/src/gdb/irix5-nat.c,v retrieving revision 1.21 diff -u -r1.21 irix5-nat.c --- irix5-nat.c 14 Nov 2002 20:37:28 -0000 1.21 +++ irix5-nat.c 15 May 2003 20:14:22 -0000 @@ -196,7 +196,7 @@ 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); } Index: m68hc11-tdep.c =================================================================== RCS file: /cvs/src/src/gdb/m68hc11-tdep.c,v retrieving revision 1.66 diff -u -r1.66 m68hc11-tdep.c --- m68hc11-tdep.c 5 May 2003 17:56:55 -0000 1.66 +++ m68hc11-tdep.c 15 May 2003 20:18:37 -0000 @@ -1374,7 +1374,7 @@ 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); Index: m68k-tdep.c =================================================================== RCS file: /cvs/src/src/gdb/m68k-tdep.c,v retrieving revision 1.59 diff -u -r1.59 m68k-tdep.c --- m68k-tdep.c 5 May 2003 17:56:55 -0000 1.59 +++ m68k-tdep.c 15 May 2003 20:18:38 -0000 @@ -1029,7 +1029,7 @@ 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); Index: mcore-tdep.c =================================================================== RCS file: /cvs/src/src/gdb/mcore-tdep.c,v retrieving revision 1.62 diff -u -r1.62 mcore-tdep.c --- mcore-tdep.c 5 May 2003 17:56:55 -0000 1.62 +++ mcore-tdep.c 15 May 2003 20:18:39 -0000 @@ -1110,7 +1110,7 @@ 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); Index: mips-tdep.c =================================================================== RCS file: /cvs/src/src/gdb/mips-tdep.c,v retrieving revision 1.199 diff -u -r1.199 mips-tdep.c --- mips-tdep.c 14 May 2003 17:43:18 -0000 1.199 +++ mips-tdep.c 15 May 2003 20:18:47 -0000 @@ -4561,7 +4561,7 @@ static void mips_eabi_extract_return_value (struct type *valtype, - char regbuf[REGISTER_BYTES], + char regbuf[], char *valbuf) { struct return_value_word lo; @@ -4580,7 +4580,7 @@ static void mips_o64_extract_return_value (struct type *valtype, - char regbuf[REGISTER_BYTES], + char regbuf[], char *valbuf) { struct return_value_word lo; Index: mn10300-tdep.c =================================================================== RCS file: /cvs/src/src/gdb/mn10300-tdep.c,v retrieving revision 1.76 diff -u -r1.76 mn10300-tdep.c --- mn10300-tdep.c 8 May 2003 20:52:48 -0000 1.76 +++ mn10300-tdep.c 15 May 2003 20:18:48 -0000 @@ -1147,7 +1147,7 @@ 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); Index: ns32k-tdep.c =================================================================== RCS file: /cvs/src/src/gdb/ns32k-tdep.c,v retrieving revision 1.47 diff -u -r1.47 ns32k-tdep.c --- ns32k-tdep.c 5 May 2003 17:56:55 -0000 1.47 +++ ns32k-tdep.c 15 May 2003 20:18:49 -0000 @@ -512,7 +512,7 @@ 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); } @@ -522,7 +522,7 @@ 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); } Index: regcache.c =================================================================== RCS file: /cvs/src/src/gdb/regcache.c,v retrieving revision 1.81 diff -u -r1.81 regcache.c --- regcache.c 15 May 2003 18:01:50 -0000 1.81 +++ regcache.c 15 May 2003 20:18:49 -0000 @@ -120,12 +120,13 @@ } /* 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; @@ -243,7 +244,7 @@ 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; } Index: remote-array.c =================================================================== RCS file: /cvs/src/src/gdb/remote-array.c,v retrieving revision 1.21 diff -u -r1.21 remote-array.c --- remote-array.c 8 May 2003 20:52:48 -0000 1.21 +++ remote-array.c 15 May 2003 20:18:54 -0000 @@ -80,11 +80,12 @@ #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 /* Index: remote-sds.c =================================================================== RCS file: /cvs/src/src/gdb/remote-sds.c,v retrieving revision 1.24 diff -u -r1.24 remote-sds.c --- remote-sds.c 18 Jan 2003 15:55:52 -0000 1.24 +++ remote-sds.c 15 May 2003 20:18:54 -0000 @@ -473,10 +473,10 @@ { 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; @@ -509,7 +509,7 @@ 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 Index: remote-vx.c =================================================================== RCS file: /cvs/src/src/gdb/remote-vx.c,v retrieving revision 1.25 diff -u -r1.25 remote-vx.c --- remote-vx.c 8 Apr 2003 19:21:15 -0000 1.25 +++ remote-vx.c 15 May 2003 20:18:57 -0000 @@ -466,7 +466,7 @@ 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 Index: remote.c =================================================================== RCS file: /cvs/src/src/gdb/remote.c,v retrieving revision 1.98 diff -u -r1.98 remote.c --- remote.c 8 May 2003 20:52:48 -0000 1.98 +++ remote.c 15 May 2003 20:20:03 -0000 @@ -263,7 +263,7 @@ /* 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)); @@ -3529,7 +3529,7 @@ 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; Index: rs6000-tdep.c =================================================================== RCS file: /cvs/src/src/gdb/rs6000-tdep.c,v retrieving revision 1.132 diff -u -r1.132 rs6000-tdep.c --- rs6000-tdep.c 13 May 2003 19:27:28 -0000 1.132 +++ rs6000-tdep.c 15 May 2003 20:20:09 -0000 @@ -984,7 +984,7 @@ } /* 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 @@ -2879,7 +2879,7 @@ 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); Index: s390-tdep.c =================================================================== RCS file: /cvs/src/src/gdb/s390-tdep.c,v retrieving revision 1.96 diff -u -r1.96 s390-tdep.c --- s390-tdep.c 5 May 2003 17:56:55 -0000 1.96 +++ s390-tdep.c 15 May 2003 20:20:10 -0000 @@ -1888,7 +1888,7 @@ 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); @@ -1900,7 +1900,7 @@ 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, Index: sh-tdep.c =================================================================== RCS file: /cvs/src/src/gdb/sh-tdep.c,v retrieving revision 1.123 diff -u -r1.123 sh-tdep.c --- sh-tdep.c 13 May 2003 19:27:28 -0000 1.123 +++ sh-tdep.c 15 May 2003 20:20:14 -0000 @@ -4368,7 +4368,7 @@ 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); @@ -4587,9 +4587,9 @@ 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; Index: sparc-tdep.c =================================================================== RCS file: /cvs/src/src/gdb/sparc-tdep.c,v retrieving revision 1.99 diff -u -r1.99 sparc-tdep.c --- sparc-tdep.c 13 May 2003 19:27:28 -0000 1.99 +++ sparc-tdep.c 15 May 2003 20:20:26 -0000 @@ -1261,7 +1261,7 @@ 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) { @@ -3373,7 +3373,7 @@ 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 @@ -3409,7 +3409,7 @@ 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; @@ -3421,7 +3421,7 @@ 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 @@ -3445,7 +3445,7 @@ 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 @@ -3457,7 +3457,7 @@ 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 Index: v850-tdep.c =================================================================== RCS file: /cvs/src/src/gdb/v850-tdep.c,v retrieving revision 1.62 diff -u -r1.62 v850-tdep.c --- v850-tdep.c 13 May 2003 19:27:28 -0000 1.62 +++ v850-tdep.c 15 May 2003 20:20:28 -0000 @@ -1230,7 +1230,7 @@ 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); Index: vax-tdep.c =================================================================== RCS file: /cvs/src/src/gdb/vax-tdep.c,v retrieving revision 1.48 diff -u -r1.48 vax-tdep.c --- vax-tdep.c 5 May 2003 17:56:56 -0000 1.48 +++ vax-tdep.c 15 May 2003 20:20:28 -0000 @@ -627,7 +627,7 @@ 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); Index: x86-64-tdep.c =================================================================== RCS file: /cvs/src/src/gdb/x86-64-tdep.c,v retrieving revision 1.69 diff -u -r1.69 x86-64-tdep.c --- x86-64-tdep.c 5 May 2003 17:56:56 -0000 1.69 +++ x86-64-tdep.c 15 May 2003 20:20:29 -0000 @@ -961,7 +961,7 @@ 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); Index: xstormy16-tdep.c =================================================================== RCS file: /cvs/src/src/gdb/xstormy16-tdep.c,v retrieving revision 1.51 diff -u -r1.51 xstormy16-tdep.c --- xstormy16-tdep.c 14 May 2003 17:43:20 -0000 1.51 +++ xstormy16-tdep.c 15 May 2003 20:20:29 -0000 @@ -1039,7 +1039,7 @@ 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); Index: config/nm-gnu.h =================================================================== RCS file: /cvs/src/src/gdb/config/nm-gnu.h,v retrieving revision 1.4 diff -u -r1.4 nm-gnu.h --- config/nm-gnu.h 14 Nov 2002 00:25:03 -0000 1.4 +++ config/nm-gnu.h 15 May 2003 20:20:29 -0000 @@ -30,7 +30,7 @@ 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 Index: config/ia64/tm-ia64.h =================================================================== RCS file: /cvs/src/src/gdb/config/ia64/tm-ia64.h,v retrieving revision 1.7 diff -u -r1.7 tm-ia64.h --- config/ia64/tm-ia64.h 5 May 2003 17:56:56 -0000 1.7 +++ config/ia64/tm-ia64.h 15 May 2003 20:20:31 -0000 @@ -50,7 +50,7 @@ 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. */ Index: config/m68k/nm-sun3.h =================================================================== RCS file: /cvs/src/src/gdb/config/m68k/nm-sun3.h,v retrieving revision 1.4 diff -u -r1.4 nm-sun3.h --- config/m68k/nm-sun3.h 14 Nov 2002 00:25:04 -0000 1.4 +++ config/m68k/nm-sun3.h 15 May 2003 20:20:31 -0000 @@ -31,4 +31,4 @@ /* 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) Index: config/m68k/tm-sun3.h =================================================================== RCS file: /cvs/src/src/gdb/config/m68k/tm-sun3.h,v retrieving revision 1.6 diff -u -r1.6 tm-sun3.h --- config/m68k/tm-sun3.h 24 Mar 2003 03:54:50 -0000 1.6 +++ config/m68k/tm-sun3.h 15 May 2003 20:20:31 -0000 @@ -28,12 +28,12 @@ . */ /* 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) Index: config/mips/tm-irix5.h =================================================================== RCS file: /cvs/src/src/gdb/config/mips/tm-irix5.h,v retrieving revision 1.8 diff -u -r1.8 tm-irix5.h --- config/mips/tm-irix5.h 20 Aug 2002 13:17:55 -0000 1.8 +++ config/mips/tm-irix5.h 15 May 2003 20:20:31 -0000 @@ -30,8 +30,8 @@ * 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) \ Index: config/mips/tm-irix6.h =================================================================== RCS file: /cvs/src/src/gdb/config/mips/tm-irix6.h,v retrieving revision 1.10 diff -u -r1.10 tm-irix6.h --- config/mips/tm-irix6.h 19 Mar 2003 06:21:14 -0000 1.10 +++ config/mips/tm-irix6.h 15 May 2003 20:20:31 -0000 @@ -62,8 +62,8 @@ #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) \ Index: config/mips/tm-mips.h =================================================================== RCS file: /cvs/src/src/gdb/config/mips/tm-mips.h,v retrieving revision 1.48 diff -u -r1.48 tm-mips.h --- config/mips/tm-mips.h 5 May 2003 17:56:56 -0000 1.48 +++ config/mips/tm-mips.h 15 May 2003 20:20:31 -0000 @@ -106,7 +106,7 @@ /* 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. */ Index: config/pa/tm-hppa64.h =================================================================== RCS file: /cvs/src/src/gdb/config/pa/tm-hppa64.h,v retrieving revision 1.17 diff -u -r1.17 tm-hppa64.h --- config/pa/tm-hppa64.h 12 May 2003 00:26:18 -0000 1.17 +++ config/pa/tm-hppa64.h 15 May 2003 20:20:31 -0000 @@ -153,7 +153,7 @@ /* 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 @@ -378,8 +378,8 @@ /* 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. */ Index: config/s390/tm-s390.h =================================================================== RCS file: /cvs/src/src/gdb/config/s390/tm-s390.h,v retrieving revision 1.5 diff -u -r1.5 tm-s390.h --- config/s390/tm-s390.h 5 May 2003 17:56:56 -0000 1.5 +++ config/s390/tm-s390.h 15 May 2003 20:20:36 -0000 @@ -95,7 +95,7 @@ #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 */ @@ -103,7 +103,7 @@ #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 */ Index: config/sparc/nm-nbsd.h =================================================================== RCS file: /cvs/src/src/gdb/config/sparc/nm-nbsd.h,v retrieving revision 1.6 diff -u -r1.6 nm-nbsd.h --- config/sparc/nm-nbsd.h 14 Nov 2002 00:25:05 -0000 1.6 +++ config/sparc/nm-nbsd.h 15 May 2003 20:20:36 -0000 @@ -30,6 +30,6 @@ /* 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 */ Index: config/sparc/nm-sun4os4.h =================================================================== RCS file: /cvs/src/src/gdb/config/sparc/nm-sun4os4.h,v retrieving revision 1.6 diff -u -r1.6 nm-sun4os4.h --- config/sparc/nm-sun4os4.h 14 Nov 2002 00:25:05 -0000 1.6 +++ config/sparc/nm-sun4os4.h 15 May 2003 20:20:36 -0000 @@ -30,7 +30,7 @@ /* 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 */ Index: config/sparc/nm-sun4sol2.h =================================================================== RCS file: /cvs/src/src/gdb/config/sparc/nm-sun4sol2.h,v retrieving revision 1.10 diff -u -r1.10 nm-sun4sol2.h --- config/sparc/nm-sun4sol2.h 24 Feb 2003 21:56:51 -0000 1.10 +++ config/sparc/nm-sun4sol2.h 15 May 2003 20:20:36 -0000 @@ -26,7 +26,7 @@ /* 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. */ Index: config/sparc/tm-sp64.h =================================================================== RCS file: /cvs/src/src/gdb/config/sparc/tm-sp64.h,v retrieving revision 1.21 diff -u -r1.21 tm-sp64.h --- config/sparc/tm-sp64.h 5 May 2003 17:56:56 -0000 1.21 +++ config/sparc/tm-sp64.h 15 May 2003 20:20:36 -0000 @@ -360,8 +360,8 @@ 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. */ Index: config/sparc/tm-sparc.h =================================================================== RCS file: /cvs/src/src/gdb/config/sparc/tm-sparc.h,v retrieving revision 1.48 diff -u -r1.48 tm-sparc.h --- config/sparc/tm-sparc.h 5 May 2003 17:56:57 -0000 1.48 +++ config/sparc/tm-sparc.h 15 May 2003 20:20:37 -0000 @@ -205,7 +205,7 @@ 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. */ Index: doc/ChangeLog =================================================================== RCS file: /cvs/src/src/gdb/doc/ChangeLog,v retrieving revision 1.313 diff -u -r1.313 ChangeLog --- doc/ChangeLog 14 May 2003 20:29:15 -0000 1.313 +++ doc/ChangeLog 15 May 2003 20:20:39 -0000 @@ -1,3 +1,8 @@ +2003-05-15 Andrew Cagney + + * gdbint.texinfo (Target Architecture Definition): Replace + REGISTER_BYTES with DEPRECATED_REGISTER_BYTES. + 2003-05-14 Theodore A. Roth * gdbint.texinfo (Breakpoint Handling): Correct a double negative. Index: doc/gdbint.texinfo =================================================================== RCS file: /cvs/src/src/gdb/doc/gdbint.texinfo,v retrieving revision 1.145 diff -u -r1.145 gdbint.texinfo --- doc/gdbint.texinfo 14 May 2003 20:29:15 -0000 1.145 +++ doc/gdbint.texinfo 15 May 2003 20:20:49 -0000 @@ -3088,9 +3088,9 @@ @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_BYTE} 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. @@ -3746,10 +3746,13 @@ @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 Index: mi/ChangeLog =================================================================== RCS file: /cvs/src/src/gdb/mi/ChangeLog,v retrieving revision 1.106 diff -u -r1.106 ChangeLog --- mi/ChangeLog 14 May 2003 17:43:20 -0000 1.106 +++ mi/ChangeLog 15 May 2003 20:20:50 -0000 @@ -1,3 +1,7 @@ +2003-05-15 Andrew Cagney + + * mi-main.c (mi_setup_architecture_data): + 2003-05-12 Elena Zannoni * mi-mi-cmd-stack.c (list_args_or_locals): Rename VAR_NAMESPACE to Index: mi/mi-main.c =================================================================== RCS file: /cvs/src/src/gdb/mi/mi-main.c,v retrieving revision 1.45 diff -u -r1.45 mi-main.c --- mi/mi-main.c 8 May 2003 20:52:49 -0000 1.45 +++ mi/mi-main.c 15 May 2003 20:20:52 -0000 @@ -1472,9 +1472,9 @@ 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 --------------030007060700030405000704--