* 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.
This commit is contained in:
Jeff Law 1995-08-09 18:53:41 +00:00
parent 99ca35f1fa
commit fbc3f1913d
8 changed files with 201 additions and 14 deletions

View File

@ -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 *

View File

@ -21,13 +21,18 @@ Do-first:
Things-to-keep:
aix.mh
aix.mt
gdbserve.mt
ppc-nw.mt
tm-ppc-nw.h
tm-ppc-eabi.h
tm-ppcle-eabi.h
nm-aix.h
ppc-eabi.mt
ppc-nw.mt
ppcle-eabi.mt
tm-ppc-aix.h
tm-ppc-eabi.h
tm-ppc-nw.h
tm-ppcle-eabi.h
xm-aix.h
Things-to-lose:

View File

@ -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"

View File

@ -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 */

106
gdb/config/powerpc/xm-aix.h Normal file
View File

@ -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; \
} \
}

10
gdb/configure vendored
View File

@ -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 ;;

View File

@ -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 ;;

View File

@ -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);