1999-04-16 01:35:26 +00:00
|
|
|
/* IBM RS/6000 native-dependent macros for GDB, the GNU debugger.
|
2012-01-04 08:17:56 +00:00
|
|
|
Copyright 1986-1987, 1989, 1991-1992, 1994, 1996, 1999-2001,
|
|
|
|
2007-2012 Free Software Foundation, Inc.
|
1999-04-16 01:35:26 +00:00
|
|
|
|
1999-07-07 20:19:36 +00:00
|
|
|
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
|
2007-08-23 18:08:50 +00:00
|
|
|
the Free Software Foundation; either version 3 of the License, or
|
1999-07-07 20:19:36 +00:00
|
|
|
(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
|
2007-08-23 18:08:50 +00:00
|
|
|
along with this program. If not, see <http://www.gnu.org/licenses/>. */
|
1999-04-16 01:35:26 +00:00
|
|
|
|
|
|
|
/* 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. */
|
|
|
|
|
2001-11-01 16:17:08 +00:00
|
|
|
#define SOLIB_ADD(a, b, c, d) \
|
2001-05-04 04:15:33 +00:00
|
|
|
if (PIDGET (inferior_ptid)) \
|
1999-04-16 01:35:26 +00:00
|
|
|
/* Attach to process. */ \
|
2001-05-04 04:15:33 +00:00
|
|
|
xcoff_relocate_symtab (PIDGET (inferior_ptid)); \
|
1999-04-16 01:35:26 +00:00
|
|
|
else \
|
|
|
|
/* Core file. */ \
|
|
|
|
xcoff_relocate_core (c);
|
|
|
|
|
2000-05-28 01:12:42 +00:00
|
|
|
extern void xcoff_relocate_symtab (unsigned int);
|
1999-04-16 01:35:26 +00:00
|
|
|
struct target_ops;
|
2000-05-28 01:12:42 +00:00
|
|
|
extern void xcoff_relocate_core (struct target_ops *);
|
1999-04-16 01:35:26 +00:00
|
|
|
|
2001-02-10 12:01:11 +00:00
|
|
|
/* If ADDR lies in a shared library, return its name. */
|
Add auto-solib-add support for AIX, remove obsolete and unused
SOLIB_SYMBOLS_MANUAL code, cleanup of AIX shared library handling code.
* rs6000-nat.c (vmap_symtab): Do not try to modify offsets
if symbols are not yet loaded.
(vmap_add_symbols): New function to add symbols for a vmap entry.
(add_vmap): Turn errors into warnings, return NULL vmap upon
failure. Add symbols via vmap_add_symbols only if requested.
(xcoff_relocate_core): Allow debugging of core files without an
executable file. Handle NULL returns from add_vmap gracefully.
* xcoffsolib.c (solib_add): Remove, no longer needed.
(solib_info): Do not check for new shared libraries if there is no
inferior process.
(sharedlibrary_command): Made static.
Do not check for new shared libraries if there is no inferior process.
Add symbols for requested shared libraries via vmap_add_symbols.
(_initialize_solib): Add `set auto-solib-add' command.
* xcoffsolib.h (vmap_add_symbols): Add prototype declaration.
* config/rs6000/tm-rs6000.h (PC_LOAD_SEGMENT): Move from here ...
* config/rs6000/nm-rs6000.h: ... to here, this is an AIX native
feature.
* config/powerpc/tm-macos.h, config/powerpc/tm-ppc-eabi.h,
config/powerpc/tm-ppc-nw.h, config/rs6000/tm-rs6000ly.h:
Remove #undef PC_LOAD_SEGMENT.
* config/powerpc/aix.mt, config/rs6000/aix4.mt, config/rs6000/rs6000.mt
(TDEPFILES): Move xcoffsolib.o from here ...
* config/powerpc/aix.mh, config/rs6000/aix4.mh, config/rs6000/rs6000.mh
(NATDEPFILES): ... to here, xcoffsolib.o contains AIX native code
only.
* rs6000-tdep.c: Remove #include xcoffsolib.h, no longer needed.
* xcoffsolib.h (xcoff_relocate_symtab_hook): Remove declaration.
* rs6000-nat.c (_initialize_core_rs6000): Remove setting of
xcoff_relocate_symtab_hook, no longer needed.
* xcoffsolib.c (solib_info, sharedlibrary_command): Remove
xcoff_relocate_symtab_hook indirection, call xcoff_relocate_symtab
directly, as xcoffsolib.c is now compiled in native AIX configurations
only.
* Makefile.in: Update dependencies for rs6000-tdep.o, rs6000-nat.o
and xcoffsolib.o.
2000-11-09 09:49:00 +00:00
|
|
|
|
2001-02-10 12:01:11 +00:00
|
|
|
#define PC_SOLIB(PC) xcoff_solib_address(PC)
|
|
|
|
extern char *xcoff_solib_address (CORE_ADDR);
|
Add auto-solib-add support for AIX, remove obsolete and unused
SOLIB_SYMBOLS_MANUAL code, cleanup of AIX shared library handling code.
* rs6000-nat.c (vmap_symtab): Do not try to modify offsets
if symbols are not yet loaded.
(vmap_add_symbols): New function to add symbols for a vmap entry.
(add_vmap): Turn errors into warnings, return NULL vmap upon
failure. Add symbols via vmap_add_symbols only if requested.
(xcoff_relocate_core): Allow debugging of core files without an
executable file. Handle NULL returns from add_vmap gracefully.
* xcoffsolib.c (solib_add): Remove, no longer needed.
(solib_info): Do not check for new shared libraries if there is no
inferior process.
(sharedlibrary_command): Made static.
Do not check for new shared libraries if there is no inferior process.
Add symbols for requested shared libraries via vmap_add_symbols.
(_initialize_solib): Add `set auto-solib-add' command.
* xcoffsolib.h (vmap_add_symbols): Add prototype declaration.
* config/rs6000/tm-rs6000.h (PC_LOAD_SEGMENT): Move from here ...
* config/rs6000/nm-rs6000.h: ... to here, this is an AIX native
feature.
* config/powerpc/tm-macos.h, config/powerpc/tm-ppc-eabi.h,
config/powerpc/tm-ppc-nw.h, config/rs6000/tm-rs6000ly.h:
Remove #undef PC_LOAD_SEGMENT.
* config/powerpc/aix.mt, config/rs6000/aix4.mt, config/rs6000/rs6000.mt
(TDEPFILES): Move xcoffsolib.o from here ...
* config/powerpc/aix.mh, config/rs6000/aix4.mh, config/rs6000/rs6000.mh
(NATDEPFILES): ... to here, xcoffsolib.o contains AIX native code
only.
* rs6000-tdep.c: Remove #include xcoffsolib.h, no longer needed.
* xcoffsolib.h (xcoff_relocate_symtab_hook): Remove declaration.
* rs6000-nat.c (_initialize_core_rs6000): Remove setting of
xcoff_relocate_symtab_hook, no longer needed.
* xcoffsolib.c (solib_info, sharedlibrary_command): Remove
xcoff_relocate_symtab_hook indirection, call xcoff_relocate_symtab
directly, as xcoffsolib.c is now compiled in native AIX configurations
only.
* Makefile.in: Update dependencies for rs6000-tdep.o, rs6000-nat.o
and xcoffsolib.o.
2000-11-09 09:49:00 +00:00
|
|
|
|
2003-09-03 21:01:44 +00:00
|
|
|
/* Flag for machine-specific stuff in shared files. FIXME */
|
|
|
|
#define DEPRECATED_IBM6000_TARGET
|
2007-02-27 23:04:28 +00:00
|
|
|
|