aboutsummaryrefslogtreecommitdiff
path: root/gdb/config/powerpc
diff options
context:
space:
mode:
authorJeff Law <law@redhat.com>1995-08-09 18:53:41 +0000
committerJeff Law <law@redhat.com>1995-08-09 18:53:41 +0000
commitfbc3f1913d26d4b559cd51061444718a172b094a (patch)
tree0c16d374a422309f245ecb5db389da6b3487ccdf /gdb/config/powerpc
parent99ca35f1fae2ba9acf1d12b9ae233821cb5b882a (diff)
downloadgdb-fbc3f1913d26d4b559cd51061444718a172b094a.zip
gdb-fbc3f1913d26d4b559cd51061444718a172b094a.tar.gz
gdb-fbc3f1913d26d4b559cd51061444718a172b094a.tar.bz2
* configure.in (powerpc-*-aix*): Recognize as a new gdb host
and target. (powerpc-*-eabi*): Don't set configdirs. (powerpcle-*-eabi*0: Likewise. * configure: Updated. * rs6000-nat.c (vmap_ldinfo): Don't relocate data addresses for the main objfile if DONT_RELOCATE_SYMFILE_OBJFILE is defined. * config/powerpc/{aix.mh,aix.mh}: Host and target makefile fragments for powerpc running aix4. * config/powerpc/{nm-aix.h, tm-ppc-aix.h, xm-aix.h}: Native, target and host include files for powerpc running aix4. More of Mike's powerpc work + minor changes.
Diffstat (limited to 'gdb/config/powerpc')
-rw-r--r--gdb/config/powerpc/.Sanitize11
-rw-r--r--gdb/config/powerpc/nm-aix.h20
-rw-r--r--gdb/config/powerpc/tm-ppc-aix.h31
-rw-r--r--gdb/config/powerpc/xm-aix.h106
4 files changed, 165 insertions, 3 deletions
diff --git a/gdb/config/powerpc/.Sanitize b/gdb/config/powerpc/.Sanitize
index d4c3b81..0c242d6 100644
--- a/gdb/config/powerpc/.Sanitize
+++ b/gdb/config/powerpc/.Sanitize
@@ -21,13 +21,18 @@ Do-first:
Things-to-keep:
+aix.mh
+aix.mt
gdbserve.mt
+nm-aix.h
+ppc-eabi.mt
ppc-nw.mt
-tm-ppc-nw.h
+ppcle-eabi.mt
+tm-ppc-aix.h
tm-ppc-eabi.h
+tm-ppc-nw.h
tm-ppcle-eabi.h
-ppc-eabi.mt
-ppcle-eabi.mt
+xm-aix.h
Things-to-lose:
diff --git a/gdb/config/powerpc/nm-aix.h b/gdb/config/powerpc/nm-aix.h
new file mode 100644
index 0000000..f9ce934
--- /dev/null
+++ b/gdb/config/powerpc/nm-aix.h
@@ -0,0 +1,20 @@
+/* IBM PowerPC native-dependent macros for GDB, the GNU debugger.
+ Copyright 1995 Free Software Foundation, Inc.
+
+This file is part of GDB.
+
+This program is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
+
+#include "rs6000/nm-rs6000.h"
diff --git a/gdb/config/powerpc/tm-ppc-aix.h b/gdb/config/powerpc/tm-ppc-aix.h
new file mode 100644
index 0000000..d4853e6
--- /dev/null
+++ b/gdb/config/powerpc/tm-ppc-aix.h
@@ -0,0 +1,31 @@
+/* Macro definitions for Power PC running AIX.
+ Copyright 1995 Free Software Foundation, Inc.
+
+This file is part of GDB.
+
+This program is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
+
+#ifndef TM_PPC_AIX_H
+#define TM_PPC_AIX_H
+
+/* The main executable doesn't need relocation in aix4. */
+#define DONT_RELOCATE_SYMFILE_OBJFILE
+
+/* Use generic RS6000 definitions. */
+#include "rs6000/tm-rs6000.h"
+
+#define GDB_TARGET_POWERPC
+
+#endif /* TM_PPC_AIX_H */
diff --git a/gdb/config/powerpc/xm-aix.h b/gdb/config/powerpc/xm-aix.h
new file mode 100644
index 0000000..8481060
--- /dev/null
+++ b/gdb/config/powerpc/xm-aix.h
@@ -0,0 +1,106 @@
+/* Parameters for hosting on an PowerPC, for GDB, the GNU debugger.
+ Copyright 1995 Free Software Foundation, Inc.
+ Contributed by Cygnus Corporation.
+
+This file is part of GDB.
+
+This program is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
+
+/* The following text is taken from config/rs6000.mh:
+ * # The IBM version of /usr/include/rpc/rpc.h has a bug -- it says
+ * # `extern fd_set svc_fdset;' without ever defining the type fd_set.
+ * # Unfortunately this occurs in the vx-share code, which is not configured
+ * # like the rest of GDB (e.g. it doesn't include "defs.h").
+ * # We circumvent this bug by #define-ing fd_set here, but undefining it in
+ * # the xm-rs6000.h file before ordinary modules try to use it. FIXME, IBM!
+ * MH_CFLAGS='-Dfd_set=int'
+ * So, here we do the undefine...which has to occur before we include
+ * <sys/select.h> below.
+ */
+#undef fd_set
+
+#include <sys/select.h>
+
+/* Big end is at the low address */
+
+#define HOST_BYTE_ORDER BIG_ENDIAN
+
+/* At least as of AIX 3.2, we have termios. */
+#define HAVE_TERMIOS 1
+/* #define HAVE_TERMIO 1 */
+
+#define USG 1
+#define HAVE_SIGSETMASK 1
+
+/* AIX declares the mem functions differently than defs.h does. AIX is
+ right, but defs.h works on more old systems. For now, override it. */
+
+#define MEM_FNS_DECLARED 1
+
+/* This system requires that we open a terminal with O_NOCTTY for it to
+ not become our controlling terminal. */
+
+#define USE_O_NOCTTY
+
+/* Brain death inherited from PC's pervades. */
+#undef NULL
+#define NULL 0
+
+/* The IBM compiler requires this in order to properly compile alloca(). */
+#pragma alloca
+
+/* There is no vfork. */
+
+#define vfork fork
+
+/* Setpgrp() takes arguments, unlike ordinary Sys V's. */
+
+/* #define SETPGRP_ARGS 1 */
+
+#if 0
+/* AIX doesn't have strdup, so we need to declare it for libiberty */
+extern char *strdup PARAMS ((char *));
+#endif
+
+/* Signal handler for SIGWINCH `window size changed'. */
+
+#define SIGWINCH_HANDLER aix_resizewindow
+extern void aix_resizewindow ();
+
+/* This doesn't seem to be declared in any header file I can find. */
+char *termdef PARAMS ((int, int));
+
+/* `lines_per_page' and `chars_per_line' are local to utils.c. Rectify this. */
+
+#define SIGWINCH_HANDLER_BODY \
+ \
+/* Respond to SIGWINCH `window size changed' signal, and reset GDB's \
+ window settings approproatelt. */ \
+ \
+void \
+aix_resizewindow () \
+{ \
+ int fd = fileno (stdout); \
+ if (isatty (fd)) { \
+ int val; \
+ \
+ val = atoi (termdef (fd, 'l')); \
+ if (val > 0) \
+ lines_per_page = val; \
+ val = atoi (termdef (fd, 'c')); \
+ if (val > 0) \
+ chars_per_line = val; \
+ } \
+}