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]

RFA: remove regoff array


Since we're not using a legacy regcache any more, the regoff member of
the PPC's 'struct gdbarch_tdep' is unused.

2004-05-28  Jim Blandy  <jimb@redhat.com>

	* ppc-tdep.h: Delete unused 'regoff' member.
	* rs6000-tdep.c (rs6000_gdbarch_init): Don't initialize it.

Index: gdb/ppc-tdep.h
===================================================================
RCS file: /cvs/src/src/gdb/ppc-tdep.h,v
retrieving revision 1.35
diff -c -p -r1.35 ppc-tdep.h
*** gdb/ppc-tdep.h	22 May 2004 06:03:26 -0000	1.35
--- gdb/ppc-tdep.h	28 May 2004 22:01:50 -0000
*************** extern void ppc_collect_fpregset (const 
*** 142,148 ****
  struct gdbarch_tdep
    {
      int wordsize;              /* size in bytes of fixed-point word */
-     int *regoff;               /* byte offsets in register arrays */
      const struct reg *regs;    /* from current variant */
      int ppc_gp0_regnum;		/* GPR register 0 */
      int ppc_toc_regnum;		/* TOC register */
--- 142,147 ----
Index: gdb/rs6000-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/rs6000-tdep.c,v
retrieving revision 1.210
diff -c -p -r1.210 rs6000-tdep.c
*** gdb/rs6000-tdep.c	28 May 2004 21:59:37 -0000	1.210
--- gdb/rs6000-tdep.c	28 May 2004 22:01:51 -0000
*************** rs6000_gdbarch_init (struct gdbarch_info
*** 2896,2909 ****
    else
      tdep->lr_frame_offset = 8;
  
-   /* Calculate byte offsets in raw register array.  */
-   tdep->regoff = xmalloc (v->num_tot_regs * sizeof (int));
-   for (i = off = 0; i < v->num_tot_regs; i++)
-     {
-       tdep->regoff[i] = off;
-       off += regsize (v->regs + i, wordsize);
-     }
- 
    if (v->arch == bfd_arch_powerpc)
      switch (v->mach)
        {
--- 2896,2901 ----


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