binutils-gdb/gdb/xcoffsolib.h

65 lines
2.4 KiB
C
Raw Normal View History

/* Data structures for RS/6000 shared libraries, for GDB.
Copyright (C) 1991, 1992, 1993, 1994, 1996, 1997, 2000, 2007, 2008
2001-03-06 09:22:02 +01:00
Free Software Foundation, Inc.
1999-07-07 22:19:36 +02:00
This file is part of GDB.
1999-07-07 22:19:36 +02:00
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 3 of the License, or
1999-07-07 22:19:36 +02:00
(at your option) any later version.
1999-07-07 22:19:36 +02:00
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.
1999-07-07 22:19:36 +02:00
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */
/* The vmap struct is used to describe the virtual address space of
the target we are manipulating. The first entry is always the "exec"
file. Subsequent entries correspond to other objects that are
mapped into the address space of a process created from the "exec" file.
These are either in response to exec()ing the file, in which case all
shared libraries are loaded, or a "load" system call, followed by the
user's issuance of a "load" command. */
#ifndef XCOFFSOLIB_H
#define XCOFFSOLIB_H
1999-07-07 22:19:36 +02:00
struct vmap
{
struct vmap *nxt; /* ptr to next in chain */
bfd *bfd; /* BFD for mappable object library */
char *name; /* ptr to object file name */
char *member; /* ptr to member name */
CORE_ADDR tstart; /* virtual addr where member is mapped */
CORE_ADDR tend; /* virtual upper bound of member */
CORE_ADDR tvma; /* virtual addr of text section in object file */
CORE_ADDR toffs; /* offset of text section in object file */
CORE_ADDR dstart; /* virtual address of data start */
CORE_ADDR dend; /* virtual address of data end */
CORE_ADDR dvma; /* virtual addr of data section in object file */
/* This is NULL for the exec-file. */
struct objfile *objfile;
unsigned loaded:1; /* True if symbols are loaded */
unsigned padding:15;
};
struct vmap_and_bfd
{
bfd *pbfd;
struct vmap *pvmap;
};
extern struct vmap *vmap;
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 10:49:00 +01:00
/* Add symbols for a vmap. */
extern int vmap_add_symbols (struct vmap *vp);
#endif