This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
Re: [PATCH RFC] Make GNU/Linux/PPC port work again
- To: Michael Snyder <msnyder at cygnus dot com>, Kevin Buettner <kevinb at cygnus dot com>
- Subject: Re: [PATCH RFC] Make GNU/Linux/PPC port work again
- From: Kevin Buettner <kevinb at cygnus dot com>
- Date: Wed, 19 Jul 2000 16:28:47 -0700
- Cc: Nick Duffek <nsd at redhat dot com>, gdb-patches at sourceware dot cygnus dot com
- References: <1000719220642.ZM16166@ocotillo.lan> <39763610.9F8@cygnus.com>
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.