aboutsummaryrefslogtreecommitdiff
path: root/gdb
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
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')
-rw-r--r--gdb/ChangeLog15
-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
-rwxr-xr-xgdb/configure10
-rw-r--r--gdb/configure.in10
-rw-r--r--gdb/rs6000-nat.c10
8 files changed, 200 insertions, 13 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index e2d19bb..fa047fc 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,18 @@
+Wed Aug 9 11:42:36 1995 Jeffrey A. Law <law@rtl.cygnus.com>
+
+ * 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.
+
Wed Aug 9 08:11:45 1995 Stan Shebs <shebs@cygnus.com>
* top.c (target_output_hook): Really make it match defs.h (char *
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; \
+ } \
+}
diff --git a/gdb/configure b/gdb/configure
index b3fce48..0158056 100755
--- a/gdb/configure
+++ b/gdb/configure
@@ -1943,6 +1943,8 @@ ns32k-*-netbsd*) gdb_host=nbsd ;;
ns32k-umax-*) gdb_host=umax ;;
ns32k-utek-sysv*) gdb_host=merlin ;;
+powerpc-*-aix*) gdb_host=aix ;;
+
pn-*-*) gdb_host=pn ;;
pyramid-*-*) gdb_host=pyramid ;;
@@ -2137,11 +2139,9 @@ pn-*-*) gdb_target=pn ;;
powerpc-*-netware*) gdb_target=ppc-nw
configdirs="${configdirs} nlm" ;;
-powerpc-*-eabi*) gdb_target=ppc-eabi
- configdirs="${configdirs}" ;;
-
-powerpcle-*-eabi*) gdb_target=ppcle-eabi
- configdirs="${configdirs}" ;;
+powerpc-*-aix*) gdb_target=aix ;;
+powerpc-*-eabi*) gdb_target=ppc-eabi ;;
+powerpcle-*-eabi*) gdb_target=ppcle-eabi ;;
pyramid-*-*) gdb_target=pyramid ;;
diff --git a/gdb/configure.in b/gdb/configure.in
index 6f0b7d4..627b2d5 100644
--- a/gdb/configure.in
+++ b/gdb/configure.in
@@ -183,6 +183,8 @@ ns32k-*-netbsd*) gdb_host=nbsd ;;
ns32k-umax-*) gdb_host=umax ;;
ns32k-utek-sysv*) gdb_host=merlin ;;
+powerpc-*-aix*) gdb_host=aix ;;
+
pn-*-*) gdb_host=pn ;;
pyramid-*-*) gdb_host=pyramid ;;
@@ -377,11 +379,9 @@ pn-*-*) gdb_target=pn ;;
powerpc-*-netware*) gdb_target=ppc-nw
configdirs="${configdirs} nlm" ;;
-powerpc-*-eabi*) gdb_target=ppc-eabi
- configdirs="${configdirs}" ;;
-
-powerpcle-*-eabi*) gdb_target=ppcle-eabi
- configdirs="${configdirs}" ;;
+powerpc-*-aix*) gdb_target=aix ;;
+powerpc-*-eabi*) gdb_target=ppc-eabi ;;
+powerpcle-*-eabi*) gdb_target=ppcle-eabi ;;
pyramid-*-*) gdb_target=pyramid ;;
diff --git a/gdb/rs6000-nat.c b/gdb/rs6000-nat.c
index 18bce29..a5fec6c 100644
--- a/gdb/rs6000-nat.c
+++ b/gdb/rs6000-nat.c
@@ -500,6 +500,16 @@ vmap_ldinfo (ldi)
if (vp->objfile == NULL)
got_exec_file = 1;
+#ifdef DONT_RELOCATE_SYMFILE_OBJFILE
+ if (vp->objfile == symfile_objfile
+ || vp->objfile == NULL)
+ {
+ ldi->ldinfo_dataorg = 0;
+ vp->dstart = (CORE_ADDR) 0;
+ vp->dend = ldi->ldinfo_datasize;
+ }
+#endif
+
/* relocate symbol table(s). */
vmap_symtab (vp);