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]

Re: [PATCH RFC] Make GNU/Linux/PPC port work again


Kevin Buettner wrote:
> 
> On Jul 19,  4:13pm, Michael Snyder wrote:
> 
> > Kevin Buettner wrote:
> 
> > > Long term, I'd like to introduce a new file called ppc-tdep.c which
> > > contains the generic target methods for the Power and PowerPC
> > > architectures.  (Much of the code in rs6000-tdep.c would be moved to
> > > this file.) rs6000-tdep.c would become an AIX specific file that knows
> > > about shared libraries, signal handlers, and anything else specific to
> > > AIX.  It would play the same role for AIX that ppc-linux-tdep.c plays
> > > for Linux.  (The other way to do it would be to remove the AIXisms
> > > from rs6000-tdep.c and create a new file named ppc-aix-tdep.c which
> > > knows about the AIXisms.)
> > >
> > >         * ppc-tdep.h: New file.
> >
> > What kind of stuff is in this header file,
> > that could not go into one or more of the
> > tm.h files?
> 
> What you suggest would work.
> 
> I was attempting to limit the visibility of the defines that appear
> in ppc-tdep.h to just a handful of files and unfortunately, the
> tm.h file is included by just about everybody.
> 
> In particular, I was concerned about the following...
> 
> +/* Some important register numbers. */
> +
> +#define        GP0_REGNUM 0            /* GPR register 0 */
> +#define        TOC_REGNUM 2            /* TOC register */
> +#define PS_REGNUM 65           /* Processor (or machine) status (%msr) */
> +#define        CR_REGNUM 66            /* Condition register */
> +#define        LR_REGNUM 67            /* Link register */
> +#define        CTR_REGNUM 68           /* Count register */
> +#define        XER_REGNUM 69           /* Integer exception register */
> +#define        MQ_REGNUM 70            /* Multiply/Divide extension register */
> 
> In order to feel comfortable with putting these in a common tm-*.h file,
> I'd want to prefix the names with PPC_ or somesuch.


No...
Every tm.h file that I'm familiar with contains defines
such as these.  Or at least it did pre-multi-arch.
Is the PPC multi-arched?  If it is, maybe they need
to go into the gdbarch struct.  If not, they seem to
belong in the tm.h file.

Yeah, I know it is a pain that whenever you touch that file
your entire build directory recompiles, but it's a fact of
life in gdb-land.

Mcihael

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