Import files needed for PowerPC support and not included in the

original GDB 6.1.1 import.
This commit is contained in:
Marcel Moolenaar 2006-08-23 03:28:37 +00:00
parent f8c1b85b49
commit 0ffcd81703
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/vendor/gdb/dist/; revision=161537
11 changed files with 4554 additions and 0 deletions

View File

@ -0,0 +1,69 @@
/* IBM RS/6000 native-dependent macros for GDB, the GNU debugger.
Copyright 1986, 1987, 1989, 1991, 1992, 1994, 1996, 1999, 2000, 2001
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., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
/* Do implement the attach and detach commands. */
#define ATTACH_DETACH
/* Override copies of {fetch,store}_inferior_registers in infptrace.c. */
#define FETCH_INFERIOR_REGISTERS
/* Override child_xfer_memory in infptrace.c. */
#define CHILD_XFER_MEMORY
/* When a child process is just starting, we sneak in and relocate
the symbol table (and other stuff) after the dynamic linker has
figured out where they go. */
#define SOLIB_CREATE_INFERIOR_HOOK(PID) \
do { \
xcoff_relocate_symtab (PID); \
} while (0)
/* When a target process or core-file has been attached, we sneak in
and figure out where the shared libraries have got to. */
#define SOLIB_ADD(a, b, c, d) \
if (PIDGET (inferior_ptid)) \
/* Attach to process. */ \
xcoff_relocate_symtab (PIDGET (inferior_ptid)); \
else \
/* Core file. */ \
xcoff_relocate_core (c);
extern void xcoff_relocate_symtab (unsigned int);
struct target_ops;
extern void xcoff_relocate_core (struct target_ops *);
/* If ADDR lies in a shared library, return its name. */
#define PC_SOLIB(PC) xcoff_solib_address(PC)
extern char *xcoff_solib_address (CORE_ADDR);
/* Return sizeof user struct to callers in less machine dependent routines */
#define KERNEL_U_SIZE kernel_u_size()
extern int kernel_u_size (void);
/* Flag for machine-specific stuff in shared files. FIXME */
#define DEPRECATED_IBM6000_TARGET

View File

@ -0,0 +1,26 @@
/* Native-dependent definitions for RS6000 running LynxOS.
Copyright 1993 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., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
#ifndef NM_RS6000LYNX_H
#define NM_RS6000LYNX_H
#include "config/nm-lynx.h"
#endif /* NM_RS6000LYNX_H */

View File

@ -0,0 +1,11 @@
# Host: IBM RS/6000 running AIX
XM_FILE= xm-rs6000.h
NAT_FILE= nm-rs6000.h
NATDEPFILES= fork-child.o infptrace.o inftarg.o corelow.o rs6000-nat.o \
xcoffsolib.o
# When compiled with cc, for debugging, this argument should be passed.
# We have no idea who our current compiler is though, so we skip it.
# MH_CFLAGS = -bnodelcsect

View File

@ -0,0 +1,3 @@
# Target: IBM RS/6000 running AIX
TDEPFILES= rs6000-tdep.o xcoffread.o ppc-sysv-tdep.o solib.o solib-svr4.o
TM_FILE= tm-rs6000.h

View File

@ -0,0 +1,6 @@
# Host: RS6000 running LynxOS
XM_CLIBS= -lbsd
NAT_FILE= nm-rs6000ly.h
NATDEPFILES= fork-child.o infptrace.o inftarg.o corelow.o lynx-nat.o xcoffread.o

View File

@ -0,0 +1,3 @@
# Target: IBM RS6000 running LynxOS
TDEPFILES= coff-solib.o rs6000-tdep.o ppc-sysv-tdep.o solib.o solib-svr4.o
TM_FILE= tm-rs6000ly.h

View File

@ -0,0 +1,103 @@
/* Parameters for target execution on an RS6000, for GDB, the GNU debugger.
Copyright 1986, 1987, 1989, 1991, 1992, 1993, 1994, 1995, 1996,
1997, 1998, 1999, 2000, 2004 Free Software Foundation, Inc.
Contributed by IBM 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., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
struct frame_info;
#define GDB_MULTI_ARCH 1
/* Minimum possible text address in AIX */
#define TEXT_SEGMENT_BASE 0x10000000
/* Return whether PC in function NAME is in code that should be skipped when
single-stepping. */
#define IN_SOLIB_RETURN_TRAMPOLINE(pc, name) \
rs6000_in_solib_return_trampoline (pc, name)
extern int rs6000_in_solib_return_trampoline (CORE_ADDR, char *);
/* If PC is in some function-call trampoline code, return the PC
where the function itself actually starts. If not, return NULL. */
#define SKIP_TRAMPOLINE_CODE(pc) rs6000_skip_trampoline_code (pc)
extern CORE_ADDR rs6000_skip_trampoline_code (CORE_ADDR);
/* AIX has a couple of strange returns from wait(). */
#define CHILD_SPECIAL_WAITSTATUS(ourstatus, hoststatus) ( \
/* "stop after load" status. */ \
(hoststatus) == 0x57c ? (ourstatus)->kind = TARGET_WAITKIND_LOADED, 1 : \
\
/* signal 0. I have no idea why wait(2) returns with this status word. */ \
/* It looks harmless. */ \
(hoststatus) == 0x7f ? (ourstatus)->kind = TARGET_WAITKIND_SPURIOUS, 1 : \
\
/* A normal waitstatus. Let the usual macros deal with it. */ \
0)
/* In xcoff, we cannot process line numbers when we see them. This is
mainly because we don't know the boundaries of the include files. So,
we postpone that, and then enter and sort(?) the whole line table at
once, when we are closing the current symbol table in end_symtab(). */
#define PROCESS_LINENUMBER_HOOK() aix_process_linenos ()
extern void aix_process_linenos (void);
/* Register numbers of various important registers.
Note that some of these values are "real" register numbers,
and correspond to the general registers of the machine,
and some are "phony" register numbers which are too large
to be actual register numbers as far as the user is concerned
but do serve to get the desired values when passed to read_register. */
#define FP0_REGNUM 32 /* Floating point register 0 */
#define FPLAST_REGNUM 63 /* Last floating point register */
/* Define other aspects of the stack frame. */
#define DEPRECATED_INIT_FRAME_PC_FIRST(fromleaf, prev) \
(fromleaf ? DEPRECATED_SAVED_PC_AFTER_CALL (prev->next) : \
prev->next ? DEPRECATED_FRAME_SAVED_PC (prev->next) : read_pc ())
/* Notice when a new child process is started. */
#define TARGET_CREATE_INFERIOR_HOOK rs6000_create_inferior
extern void rs6000_create_inferior (int);
/* Hook in rs6000-tdep.c for determining the TOC address when
calling functions in the inferior. */
extern CORE_ADDR (*rs6000_find_toc_address_hook) (CORE_ADDR);
/* Hook in rs6000-tdep.c to set the current architecture when starting a
child process. */
extern void (*rs6000_set_host_arch_hook) (int);
/* We need solib.h for building cross debuggers. However, we don't want
to clobber any special solib support required by native debuggers, so
only include solib.h if SOLIB_ADD is not defined. */
#ifndef SOLIB_ADD
#include "solib.h"
#endif

View File

@ -0,0 +1,31 @@
/* Macro definitions for RS6000 running under LynxOS.
Copyright 1993, 2000 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., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
#ifndef TM_RS6000LYNX_H
#define TM_RS6000LYNX_H
#include "config/tm-lynx.h"
/* Use generic RS6000 definitions. */
#include "rs6000/tm-rs6000.h"
#define CANNOT_STORE_REGISTER(regno) (regno == PS_REGNUM)
#endif /* TM_RS6000LYNX_H */

View File

@ -0,0 +1,94 @@
/* Parameters for hosting on an RS6000, for GDB, the GNU debugger.
Copyright 1986, 1987, 1989, 1991, 1992, 1993, 1994, 1995, 1996, 1998,
2000, 2001 Free Software Foundation, Inc.
Contributed by IBM 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., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, 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 */
/* At least as of AIX 3.2, we have termios. */
#define HAVE_TERMIOS 1
/* #define HAVE_TERMIO 1 */
#define USG 1
#define FIVE_ARG_PTRACE
/* 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
/* Signal handler for SIGWINCH `window size changed'. */
#define SIGWINCH_HANDLER aix_resizewindow
extern void aix_resizewindow (int);
/* This doesn't seem to be declared in any header file I can find. */
char *termdef (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 appropriately. */ \
\
void \
aix_resizewindow (signo) \
int signo; \
{ \
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; \
} \
}

1227
contrib/gdb/gdb/rs6000-nat.c Normal file

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff