From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8201 invoked by alias); 3 Aug 2004 03:10:29 -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 8191 invoked from network); 3 Aug 2004 03:10:28 -0000 Received: from unknown (HELO mx1.redhat.com) (66.187.233.31) by sourceware.org with SMTP; 3 Aug 2004 03:10:28 -0000 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.12.10/8.12.10) with ESMTP id i733ASe3021771 for ; Mon, 2 Aug 2004 23:10:28 -0400 Received: from localhost.redhat.com (porkchop.devel.redhat.com [172.16.58.2]) by int-mx1.corp.redhat.com (8.11.6/8.11.6) with ESMTP id i733AQa00606; Mon, 2 Aug 2004 23:10:26 -0400 Received: from gnu.org (localhost [127.0.0.1]) by localhost.redhat.com (Postfix) with ESMTP id 490C12B9D; Mon, 2 Aug 2004 23:10:20 -0400 (EDT) Message-ID: <410F021B.5020108@gnu.org> Date: Tue, 03 Aug 2004 03:10:00 -0000 From: Andrew Cagney User-Agent: Mozilla/5.0 (X11; U; NetBSD macppc; en-GB; rv:1.4.1) Gecko/20040801 MIME-Version: 1.0 To: gdb-patches@sources.redhat.com Subject: [commit] Eliminate deprecated_register_raw_size from gdbarch Content-Type: multipart/mixed; boundary="------------010005040104030605040906" X-SW-Source: 2004-08/txt/msg00057.txt.bz2 This is a multi-part message in MIME format. --------------010005040104030605040906 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Content-length: 61 FYI, (cris and alpha redundantly set it). removed, Andrew --------------010005040104030605040906 Content-Type: text/plain; name="diffs" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="diffs" Content-length: 15705 2004-08-02 Andrew Cagney * gdbarch.sh (deprecated_register_raw_size) (deprecated_register_virtual_size:int): Delete. * gdbarch.h, gdbarch.c: Re-generate. * cris-tdep.c (cris_register_size): Delete. (cris_gdbarch_init): Update. * alpha-tdep.c (alpha_register_raw_size) (alpha_register_virtual_size): Delete. (alpha_gdbarch_init): Update. Index: alpha-tdep.c =================================================================== RCS file: /cvs/src/src/gdb/alpha-tdep.c,v retrieving revision 1.137 diff -p -u -r1.137 alpha-tdep.c --- alpha-tdep.c 26 Jul 2004 14:52:58 -0000 1.137 +++ alpha-tdep.c 3 Aug 2004 03:04:30 -0000 @@ -145,18 +145,6 @@ alpha_register_byte (int regno) return (regno * 8); } -static int -alpha_register_raw_size (int regno) -{ - return 8; -} - -static int -alpha_register_virtual_size (int regno) -{ - return 8; -} - /* The following represents exactly the conversion performed by the LDS instruction. This applies to both single-precision floating point and 32-bit integers. */ @@ -1531,8 +1519,6 @@ alpha_gdbarch_init (struct gdbarch_info set_gdbarch_register_name (gdbarch, alpha_register_name); set_gdbarch_deprecated_register_byte (gdbarch, alpha_register_byte); - set_gdbarch_deprecated_register_raw_size (gdbarch, alpha_register_raw_size); - set_gdbarch_deprecated_register_virtual_size (gdbarch, alpha_register_virtual_size); set_gdbarch_register_type (gdbarch, alpha_register_type); set_gdbarch_cannot_fetch_register (gdbarch, alpha_cannot_fetch_register); Index: cris-tdep.c =================================================================== RCS file: /cvs/src/src/gdb/cris-tdep.c,v retrieving revision 1.114 diff -p -u -r1.114 cris-tdep.c --- cris-tdep.c 3 Aug 2004 02:02:20 -0000 1.114 +++ cris-tdep.c 3 Aug 2004 03:04:31 -0000 @@ -1096,45 +1096,6 @@ cris_spec_reg_applicable (struct cris_sp } } -/* Returns the register size in unit byte. Returns 0 for an unimplemented - register, -1 for an invalid register. */ - -static int -cris_register_size (int regno) -{ - int i; - int spec_regno; - - if (regno >= 0 && regno < NUM_GENREGS) - { - /* General registers (R0 - R15) are 32 bits. */ - return 4; - } - else if (regno >= NUM_GENREGS && regno < NUM_REGS) - { - /* Special register (R16 - R31). cris_spec_regs is zero-based. - Adjust regno accordingly. */ - spec_regno = regno - NUM_GENREGS; - - /* The entries in cris_spec_regs are stored in register number order, - which means we can shortcut into the array when searching it. */ - for (i = spec_regno; cris_spec_regs[i].name != NULL; i++) - { - if (cris_spec_regs[i].number == spec_regno - && cris_spec_reg_applicable (cris_spec_regs[i])) - /* Go with the first applicable register. */ - return cris_spec_regs[i].reg_size; - } - /* Special register not applicable to this CRIS version. */ - return 0; - } - else - { - /* Invalid register. */ - return -1; - } -} - /* Nonzero if regno should not be fetched from the target. This is the case for unimplemented (size 0) and non-existant registers. */ @@ -3854,12 +3815,6 @@ cris_gdbarch_init (struct gdbarch_info i in the saved register state. */ set_gdbarch_deprecated_register_byte (gdbarch, cris_register_offset); - /* The length of the registers in the actual machine representation. */ - set_gdbarch_deprecated_register_raw_size (gdbarch, cris_register_size); - - /* The length of the registers in the program's representation. */ - set_gdbarch_deprecated_register_virtual_size (gdbarch, cris_register_size); - set_gdbarch_register_type (gdbarch, cris_register_type); /* Dummy frame functions. */ Index: gdbarch.c =================================================================== RCS file: /cvs/src/src/gdb/gdbarch.c,v retrieving revision 1.306 diff -p -u -r1.306 gdbarch.c --- gdbarch.c 3 Aug 2004 02:37:39 -0000 1.306 +++ gdbarch.c 3 Aug 2004 03:04:31 -0000 @@ -146,8 +146,6 @@ struct gdbarch gdbarch_register_name_ftype *register_name; gdbarch_register_type_ftype *register_type; gdbarch_deprecated_register_byte_ftype *deprecated_register_byte; - gdbarch_deprecated_register_raw_size_ftype *deprecated_register_raw_size; - gdbarch_deprecated_register_virtual_size_ftype *deprecated_register_virtual_size; gdbarch_unwind_dummy_id_ftype *unwind_dummy_id; int deprecated_fp_regnum; gdbarch_deprecated_target_read_fp_ftype *deprecated_target_read_fp; @@ -286,8 +284,6 @@ struct gdbarch startup_gdbarch = 0, /* register_name */ 0, /* register_type */ generic_register_byte, /* deprecated_register_byte */ - generic_register_size, /* deprecated_register_raw_size */ - generic_register_size, /* deprecated_register_virtual_size */ 0, /* unwind_dummy_id */ -1, /* deprecated_fp_regnum */ 0, /* deprecated_target_read_fp */ @@ -434,8 +430,6 @@ gdbarch_alloc (const struct gdbarch_info current_gdbarch->sdb_reg_to_regnum = no_op_reg_to_regnum; current_gdbarch->dwarf2_reg_to_regnum = no_op_reg_to_regnum; current_gdbarch->deprecated_register_byte = generic_register_byte; - current_gdbarch->deprecated_register_raw_size = generic_register_size; - current_gdbarch->deprecated_register_virtual_size = generic_register_size; current_gdbarch->deprecated_fp_regnum = -1; current_gdbarch->call_dummy_location = AT_ENTRY_POINT; current_gdbarch->print_registers_info = default_print_registers_info; @@ -560,8 +554,6 @@ verify_gdbarch (struct gdbarch *current_ /* Skip verify of dwarf2_reg_to_regnum, invalid_p == 0 */ /* Skip verify of register_type, has predicate */ /* Skip verify of deprecated_register_byte, has predicate */ - /* Skip verify of deprecated_register_raw_size, has predicate */ - /* Skip verify of deprecated_register_virtual_size, has predicate */ /* Skip verify of unwind_dummy_id, has predicate */ /* Skip verify of deprecated_fp_regnum, invalid_p == 0 */ /* Skip verify of deprecated_target_read_fp, has predicate */ @@ -1148,24 +1140,6 @@ gdbarch_dump (struct gdbarch *current_gd fprintf_unfiltered (file, "gdbarch_dump: deprecated_register_byte = <0x%lx>\n", (long) current_gdbarch->deprecated_register_byte); -#ifdef DEPRECATED_REGISTER_RAW_SIZE_P - fprintf_unfiltered (file, - "gdbarch_dump: %s # %s\n", - "DEPRECATED_REGISTER_RAW_SIZE_P()", - XSTRING (DEPRECATED_REGISTER_RAW_SIZE_P ())); -#endif - fprintf_unfiltered (file, - "gdbarch_dump: gdbarch_deprecated_register_raw_size_p() = %d\n", - gdbarch_deprecated_register_raw_size_p (current_gdbarch)); -#ifdef DEPRECATED_REGISTER_RAW_SIZE - fprintf_unfiltered (file, - "gdbarch_dump: %s # %s\n", - "DEPRECATED_REGISTER_RAW_SIZE(reg_nr)", - XSTRING (DEPRECATED_REGISTER_RAW_SIZE (reg_nr))); -#endif - fprintf_unfiltered (file, - "gdbarch_dump: deprecated_register_raw_size = <0x%lx>\n", - (long) current_gdbarch->deprecated_register_raw_size); #ifdef DEPRECATED_REGISTER_SIZE fprintf_unfiltered (file, "gdbarch_dump: DEPRECATED_REGISTER_SIZE # %s\n", @@ -1174,24 +1148,6 @@ gdbarch_dump (struct gdbarch *current_gd fprintf_unfiltered (file, "gdbarch_dump: deprecated_register_size = %s\n", paddr_d (current_gdbarch->deprecated_register_size)); -#ifdef DEPRECATED_REGISTER_VIRTUAL_SIZE_P - fprintf_unfiltered (file, - "gdbarch_dump: %s # %s\n", - "DEPRECATED_REGISTER_VIRTUAL_SIZE_P()", - XSTRING (DEPRECATED_REGISTER_VIRTUAL_SIZE_P ())); -#endif - fprintf_unfiltered (file, - "gdbarch_dump: gdbarch_deprecated_register_virtual_size_p() = %d\n", - gdbarch_deprecated_register_virtual_size_p (current_gdbarch)); -#ifdef DEPRECATED_REGISTER_VIRTUAL_SIZE - fprintf_unfiltered (file, - "gdbarch_dump: %s # %s\n", - "DEPRECATED_REGISTER_VIRTUAL_SIZE(reg_nr)", - XSTRING (DEPRECATED_REGISTER_VIRTUAL_SIZE (reg_nr))); -#endif - fprintf_unfiltered (file, - "gdbarch_dump: deprecated_register_virtual_size = <0x%lx>\n", - (long) current_gdbarch->deprecated_register_virtual_size); #ifdef DEPRECATED_SAVED_PC_AFTER_CALL_P fprintf_unfiltered (file, "gdbarch_dump: %s # %s\n", @@ -2528,56 +2484,6 @@ set_gdbarch_deprecated_register_byte (st } int -gdbarch_deprecated_register_raw_size_p (struct gdbarch *gdbarch) -{ - gdb_assert (gdbarch != NULL); - return gdbarch->deprecated_register_raw_size != generic_register_size; -} - -int -gdbarch_deprecated_register_raw_size (struct gdbarch *gdbarch, int reg_nr) -{ - gdb_assert (gdbarch != NULL); - gdb_assert (gdbarch->deprecated_register_raw_size != NULL); - /* Do not check predicate: gdbarch->deprecated_register_raw_size != generic_register_size, allow call. */ - if (gdbarch_debug >= 2) - fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_register_raw_size called\n"); - return gdbarch->deprecated_register_raw_size (reg_nr); -} - -void -set_gdbarch_deprecated_register_raw_size (struct gdbarch *gdbarch, - gdbarch_deprecated_register_raw_size_ftype deprecated_register_raw_size) -{ - gdbarch->deprecated_register_raw_size = deprecated_register_raw_size; -} - -int -gdbarch_deprecated_register_virtual_size_p (struct gdbarch *gdbarch) -{ - gdb_assert (gdbarch != NULL); - return gdbarch->deprecated_register_virtual_size != generic_register_size; -} - -int -gdbarch_deprecated_register_virtual_size (struct gdbarch *gdbarch, int reg_nr) -{ - gdb_assert (gdbarch != NULL); - gdb_assert (gdbarch->deprecated_register_virtual_size != NULL); - /* Do not check predicate: gdbarch->deprecated_register_virtual_size != generic_register_size, allow call. */ - if (gdbarch_debug >= 2) - fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_register_virtual_size called\n"); - return gdbarch->deprecated_register_virtual_size (reg_nr); -} - -void -set_gdbarch_deprecated_register_virtual_size (struct gdbarch *gdbarch, - gdbarch_deprecated_register_virtual_size_ftype deprecated_register_virtual_size) -{ - gdbarch->deprecated_register_virtual_size = deprecated_register_virtual_size; -} - -int gdbarch_unwind_dummy_id_p (struct gdbarch *gdbarch) { gdb_assert (gdbarch != NULL); Index: gdbarch.h =================================================================== RCS file: /cvs/src/src/gdb/gdbarch.h,v retrieving revision 1.267 diff -p -u -r1.267 gdbarch.h --- gdbarch.h 3 Aug 2004 02:37:39 -0000 1.267 +++ gdbarch.h 3 Aug 2004 03:04:32 -0000 @@ -487,66 +487,6 @@ extern void set_gdbarch_deprecated_regis #define DEPRECATED_REGISTER_BYTE(reg_nr) (gdbarch_deprecated_register_byte (current_gdbarch, reg_nr)) #endif -/* If all registers have identical raw and virtual sizes and those - sizes agree with the value computed from REGISTER_TYPE, - DEPRECATED_REGISTER_RAW_SIZE can be deleted. See: maint print - registers. */ - -#if defined (DEPRECATED_REGISTER_RAW_SIZE) -/* Legacy for systems yet to multi-arch DEPRECATED_REGISTER_RAW_SIZE */ -#if !defined (DEPRECATED_REGISTER_RAW_SIZE_P) -#define DEPRECATED_REGISTER_RAW_SIZE_P() (1) -#endif -#endif - -extern int gdbarch_deprecated_register_raw_size_p (struct gdbarch *gdbarch); -#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_REGISTER_RAW_SIZE_P) -#error "Non multi-arch definition of DEPRECATED_REGISTER_RAW_SIZE" -#endif -#if !defined (DEPRECATED_REGISTER_RAW_SIZE_P) -#define DEPRECATED_REGISTER_RAW_SIZE_P() (gdbarch_deprecated_register_raw_size_p (current_gdbarch)) -#endif - -typedef int (gdbarch_deprecated_register_raw_size_ftype) (int reg_nr); -extern int gdbarch_deprecated_register_raw_size (struct gdbarch *gdbarch, int reg_nr); -extern void set_gdbarch_deprecated_register_raw_size (struct gdbarch *gdbarch, gdbarch_deprecated_register_raw_size_ftype *deprecated_register_raw_size); -#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_REGISTER_RAW_SIZE) -#error "Non multi-arch definition of DEPRECATED_REGISTER_RAW_SIZE" -#endif -#if !defined (DEPRECATED_REGISTER_RAW_SIZE) -#define DEPRECATED_REGISTER_RAW_SIZE(reg_nr) (gdbarch_deprecated_register_raw_size (current_gdbarch, reg_nr)) -#endif - -/* If all registers have identical raw and virtual sizes and those - sizes agree with the value computed from REGISTER_TYPE, - DEPRECATED_REGISTER_VIRTUAL_SIZE can be deleted. See: maint print - registers. */ - -#if defined (DEPRECATED_REGISTER_VIRTUAL_SIZE) -/* Legacy for systems yet to multi-arch DEPRECATED_REGISTER_VIRTUAL_SIZE */ -#if !defined (DEPRECATED_REGISTER_VIRTUAL_SIZE_P) -#define DEPRECATED_REGISTER_VIRTUAL_SIZE_P() (1) -#endif -#endif - -extern int gdbarch_deprecated_register_virtual_size_p (struct gdbarch *gdbarch); -#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_REGISTER_VIRTUAL_SIZE_P) -#error "Non multi-arch definition of DEPRECATED_REGISTER_VIRTUAL_SIZE" -#endif -#if !defined (DEPRECATED_REGISTER_VIRTUAL_SIZE_P) -#define DEPRECATED_REGISTER_VIRTUAL_SIZE_P() (gdbarch_deprecated_register_virtual_size_p (current_gdbarch)) -#endif - -typedef int (gdbarch_deprecated_register_virtual_size_ftype) (int reg_nr); -extern int gdbarch_deprecated_register_virtual_size (struct gdbarch *gdbarch, int reg_nr); -extern void set_gdbarch_deprecated_register_virtual_size (struct gdbarch *gdbarch, gdbarch_deprecated_register_virtual_size_ftype *deprecated_register_virtual_size); -#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_REGISTER_VIRTUAL_SIZE) -#error "Non multi-arch definition of DEPRECATED_REGISTER_VIRTUAL_SIZE" -#endif -#if !defined (DEPRECATED_REGISTER_VIRTUAL_SIZE) -#define DEPRECATED_REGISTER_VIRTUAL_SIZE(reg_nr) (gdbarch_deprecated_register_virtual_size (current_gdbarch, reg_nr)) -#endif - /* See gdbint.texinfo, and PUSH_DUMMY_CALL. */ extern int gdbarch_unwind_dummy_id_p (struct gdbarch *gdbarch); Index: gdbarch.sh =================================================================== RCS file: /cvs/src/src/gdb/gdbarch.sh,v retrieving revision 1.340 diff -p -u -r1.340 gdbarch.sh --- gdbarch.sh 3 Aug 2004 02:37:40 -0000 1.340 +++ gdbarch.sh 3 Aug 2004 03:04:33 -0000 @@ -469,16 +469,6 @@ M::struct type *:register_type:int reg_n # function works. This simplifies the migration process - old code, # calling DEPRECATED_REGISTER_BYTE, doesn't need to be modified. F:=:int:deprecated_register_byte:int reg_nr:reg_nr::generic_register_byte:generic_register_byte -# If all registers have identical raw and virtual sizes and those -# sizes agree with the value computed from REGISTER_TYPE, -# DEPRECATED_REGISTER_RAW_SIZE can be deleted. See: maint print -# registers. -F:=:int:deprecated_register_raw_size:int reg_nr:reg_nr::generic_register_size:generic_register_size -# If all registers have identical raw and virtual sizes and those -# sizes agree with the value computed from REGISTER_TYPE, -# DEPRECATED_REGISTER_VIRTUAL_SIZE can be deleted. See: maint print -# registers. -F:=:int:deprecated_register_virtual_size:int reg_nr:reg_nr::generic_register_size:generic_register_size # See gdbint.texinfo, and PUSH_DUMMY_CALL. M::struct frame_id:unwind_dummy_id:struct frame_info *info:info --------------010005040104030605040906--