This is the mail archive of the gdb-patches@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH] sh64-tdep: regularize a few names


Just seems like "sh_sh64_register_name" is a trifle redundant.
Makes them consistent with other method names in the same file.

2003-11-12  Michael Snyder  <msnyder@redhat.com>

	* sh64_tdep.c: Regularize some names.
	(sh_sh64_register_name): Rename to sh64_register_name.
	(sh_sh64_breakpoint_from_pc): Rename to sh64_breakpoint_from_pc.
	(sh_sh64_register_byte): Rename to sh64_register_byte.
	(sh_sh64_build_float_register_type): 
	Rename to sh64_build_float_register_type.
	(sh_sh64_register_convert_to_virtual): 
	Rename to sh64_register_convert_to_virtual.
	(sh_sh64_register_convert_to_raw): 
	Rename to sh64_register_convert_to_raw.

Index: sh64-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/sh64-tdep.c,v
retrieving revision 1.14
diff -p -w -b -r1.14 sh64-tdep.c
*** sh64-tdep.c	12 Nov 2003 22:45:41 -0000	1.14
--- sh64-tdep.c	12 Nov 2003 23:19:11 -0000
*************** struct frame_extra_info
*** 119,125 ****
  };
  
  static const char *
! sh_sh64_register_name (int reg_nr)
  {
    static char *register_names[] =
    {
--- 119,125 ----
  };
  
  static const char *
! sh64_register_name (int reg_nr)
  {
    static char *register_names[] =
    {
*************** pc_is_isa32 (bfd_vma memaddr)
*** 248,254 ****
  }
  
  static const unsigned char *
! sh_sh64_breakpoint_from_pc (CORE_ADDR *pcptr, int *lenptr)
  {
    /* The BRK instruction for shmedia is 
       01101111 11110101 11111111 11110000
--- 248,254 ----
  }
  
  static const unsigned char *
! sh64_breakpoint_from_pc (CORE_ADDR *pcptr, int *lenptr)
  {
    /* The BRK instruction for shmedia is 
       01101111 11110101 11111111 11110000
*************** REGISTER_BYTE returns the register byte 
*** 1917,1923 ****
  */
  /* *INDENT-ON* */
  static int
! sh_sh64_register_byte (int reg_nr)
  {
    int base_regnum = -1;
  
--- 1918,1924 ----
  */
  /* *INDENT-ON* */
  static int
! sh64_register_byte (int reg_nr)
  {
    int base_regnum = -1;
  
*************** sh_sh64_register_byte (int reg_nr)
*** 2002,2008 ****
  }
  
  static struct type *
! sh_sh64_build_float_register_type (int high)
  {
    struct type *temp;
  
--- 2003,2009 ----
  }
  
  static struct type *
! sh64_build_float_register_type (int high)
  {
    struct type *temp;
  
*************** sh64_register_type (struct gdbarch *gdba
*** 2027,2038 ****
      return builtin_type_double;
    else if  (reg_nr >= FPP0_REGNUM 
  	    && reg_nr <= FPP_LAST_REGNUM)
!     return sh_sh64_build_float_register_type (1);
    else if ((reg_nr >= FV0_REGNUM
  	    && reg_nr <= FV_LAST_REGNUM)
  	   ||(reg_nr >= FV0_C_REGNUM 
  	      && reg_nr <= FV_LAST_C_REGNUM))
!     return sh_sh64_build_float_register_type (3);
    else if (reg_nr == FPSCR_REGNUM)
      return builtin_type_int;
    else if (reg_nr >= R0_C_REGNUM
--- 2028,2039 ----
      return builtin_type_double;
    else if  (reg_nr >= FPP0_REGNUM 
  	    && reg_nr <= FPP_LAST_REGNUM)
!     return sh64_build_float_register_type (1);
    else if ((reg_nr >= FV0_REGNUM
  	    && reg_nr <= FV_LAST_REGNUM)
  	   ||(reg_nr >= FV0_C_REGNUM 
  	      && reg_nr <= FV_LAST_C_REGNUM))
!     return sh64_build_float_register_type (3);
    else if (reg_nr == FPSCR_REGNUM)
      return builtin_type_int;
    else if (reg_nr >= R0_C_REGNUM
*************** sh64_register_type (struct gdbarch *gdba
*** 2043,2049 ****
  }
  
  static void
! sh_sh64_register_convert_to_virtual (int regnum, struct type *type,
  				     char *from, char *to)
  {
    if (TARGET_BYTE_ORDER != BFD_ENDIAN_LITTLE)
--- 2044,2050 ----
  }
  
  static void
! sh64_register_convert_to_virtual (int regnum, struct type *type,
  				     char *from, char *to)
  {
    if (TARGET_BYTE_ORDER != BFD_ENDIAN_LITTLE)
*************** sh_sh64_register_convert_to_virtual (int
*** 2068,2074 ****
  }
  
  static void
! sh_sh64_register_convert_to_raw (struct type *type, int regnum,
  				 const void *from, void *to)
  {
    if (TARGET_BYTE_ORDER != BFD_ENDIAN_LITTLE)
--- 2069,2075 ----
  }
  
  static void
! sh64_register_convert_to_raw (struct type *type, int regnum,
  				 const void *from, void *to)
  {
    if (TARGET_BYTE_ORDER != BFD_ENDIAN_LITTLE)
*************** sh64_pseudo_register_read (struct gdbarc
*** 2114,2120 ****
  			    + register_size (gdbarch, base_regnum) * portion));
  
        /* We must pay attention to the endianness.  */
!       sh_sh64_register_convert_to_virtual (reg_nr, 
  					   gdbarch_register_type (gdbarch, 
  								  reg_nr),
  					   temp_buffer, buffer);
--- 2115,2121 ----
  			    + register_size (gdbarch, base_regnum) * portion));
  
        /* We must pay attention to the endianness.  */
!       sh64_register_convert_to_virtual (reg_nr, 
  					   gdbarch_register_type (gdbarch, 
  								  reg_nr),
  					   temp_buffer, buffer);
*************** sh64_pseudo_register_read (struct gdbarc
*** 2186,2192 ****
  			    + register_size (gdbarch, base_regnum) * portion));
  
        /* We must pay attention to the endianness.  */
!       sh_sh64_register_convert_to_virtual (reg_nr, 
  					   gdbarch_register_type (gdbarch, 
  								  reg_nr),
  					   temp_buffer, buffer);
--- 2187,2193 ----
  			    + register_size (gdbarch, base_regnum) * portion));
  
        /* We must pay attention to the endianness.  */
!       sh64_register_convert_to_virtual (reg_nr, 
  					   gdbarch_register_type (gdbarch, 
  								  reg_nr),
  					   temp_buffer, buffer);
*************** sh64_pseudo_register_write (struct gdbar
*** 2273,2280 ****
      {
        base_regnum = dr_reg_base_num (reg_nr);
        /* We must pay attention to the endianness.  */
!       sh_sh64_register_convert_to_raw (gdbarch_register_type (gdbarch, 
! 							      reg_nr), reg_nr,
  				       buffer, temp_buffer);
  	  
  
--- 2274,2281 ----
      {
        base_regnum = dr_reg_base_num (reg_nr);
        /* We must pay attention to the endianness.  */
!       sh64_register_convert_to_raw (gdbarch_register_type (gdbarch, reg_nr),
! 				       reg_nr,
  				       buffer, temp_buffer);
  	  
  
*************** sh64_pseudo_register_write (struct gdbar
*** 2348,2354 ****
        for (portion = 0; portion < 2; portion++)
  	{
  	  /* We must pay attention to the endianness.  */
! 	  sh_sh64_register_convert_to_raw (gdbarch_register_type (gdbarch,
  								  reg_nr), 
  					   reg_nr,
  					   buffer, temp_buffer);
--- 2349,2355 ----
        for (portion = 0; portion < 2; portion++)
  	{
  	  /* We must pay attention to the endianness.  */
! 	  sh64_register_convert_to_raw (gdbarch_register_type (gdbarch,
  								  reg_nr), 
  					   reg_nr,
  					   buffer, temp_buffer);
*************** sh64_gdbarch_init (struct gdbarch_info i
*** 2870,2885 ****
  					 ((SIM_SH64_NR_FP_REGS + 1) * 4)
  					 + (SIM_SH64_NR_REGS - SIM_SH64_NR_FP_REGS -1) * 8);
  
!   set_gdbarch_register_name (gdbarch, sh_sh64_register_name);
    set_gdbarch_register_type (gdbarch, sh64_register_type);
    set_gdbarch_deprecated_store_return_value (gdbarch, sh64_store_return_value);
!   set_gdbarch_deprecated_register_byte (gdbarch, sh_sh64_register_byte);
    set_gdbarch_pseudo_register_read (gdbarch, sh64_pseudo_register_read);
    set_gdbarch_pseudo_register_write (gdbarch, sh64_pseudo_register_write);
  
    set_gdbarch_deprecated_do_registers_info (gdbarch, sh64_do_registers_info);
    set_gdbarch_deprecated_frame_init_saved_regs (gdbarch, sh64_nofp_frame_init_saved_regs);
!   set_gdbarch_breakpoint_from_pc (gdbarch, sh_sh64_breakpoint_from_pc);
    set_gdbarch_deprecated_call_dummy_words (gdbarch, sh64_call_dummy_words);
    set_gdbarch_deprecated_sizeof_call_dummy_words (gdbarch, sizeof (sh64_call_dummy_words));
  
--- 2871,2886 ----
  					 ((SIM_SH64_NR_FP_REGS + 1) * 4)
  					 + (SIM_SH64_NR_REGS - SIM_SH64_NR_FP_REGS -1) * 8);
  
!   set_gdbarch_register_name (gdbarch, sh64_register_name);
    set_gdbarch_register_type (gdbarch, sh64_register_type);
    set_gdbarch_deprecated_store_return_value (gdbarch, sh64_store_return_value);
!   set_gdbarch_deprecated_register_byte (gdbarch, sh64_register_byte);
    set_gdbarch_pseudo_register_read (gdbarch, sh64_pseudo_register_read);
    set_gdbarch_pseudo_register_write (gdbarch, sh64_pseudo_register_write);
  
    set_gdbarch_deprecated_do_registers_info (gdbarch, sh64_do_registers_info);
    set_gdbarch_deprecated_frame_init_saved_regs (gdbarch, sh64_nofp_frame_init_saved_regs);
!   set_gdbarch_breakpoint_from_pc (gdbarch, sh64_breakpoint_from_pc);
    set_gdbarch_deprecated_call_dummy_words (gdbarch, sh64_call_dummy_words);
    set_gdbarch_deprecated_sizeof_call_dummy_words (gdbarch, sizeof (sh64_call_dummy_words));
  

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]