Reorganize solib.c.
This commit is contained in:
parent
42f5c13f56
commit
13437d4b4b
41 changed files with 1905 additions and 1590 deletions
|
@ -1,3 +1,95 @@
|
|||
2000-10-24 Kevin Buettner <kevinb@redhat.com>
|
||||
|
||||
* solib-svr4.c: New file created out of much of solib.c...
|
||||
|
||||
* solib.c (_SYSCALL32, BKPT_AT_SYMBOL): Move these defines to
|
||||
solib-svr4.c.
|
||||
(sys/types.h, signal.h, sys/param.h, fcntl.h, a.out.h,
|
||||
elf/external.h, link.h): Move these includes to solib-svr4.c.
|
||||
(bkpt_names, debug_base_symbols, main_name_list,
|
||||
solib_extract_address, SOLIB_EXTRACT_ADDRESS, dynamic_copy,
|
||||
ld_2_copy, debug_addr, flag_addr, LM_ADDR, LM_NEXT, LM_NAME,
|
||||
IGNORE_FIRST_LINK_MAP_ENTRY, breakpoint_addr,
|
||||
allocate_rt_common_objfile, solib_add_common_symbols,
|
||||
bfd_lookup_symbol, look_for_base, elf_locate_base, locate_base,
|
||||
first_link_map_member, open_symbol_file_object, match_main,
|
||||
current_sos, interp_text_sect_low, interp_text_sect_high,
|
||||
interp_plt_sect_low, interp_plt_sect_high,
|
||||
in_svr4_dynsym_resolve_code, disable_break, enable_break,
|
||||
special_symbol_handling): Moved to solib-svr4.c.
|
||||
(debug32_copy, shadow_contents, fdmatch)
|
||||
Removed entirely.
|
||||
(struct so_list): Moved to solist.h
|
||||
(MAX_PATH_SIZE): Moved to solist.h and renamed to
|
||||
SO_NAME_MAX_PATH_SIZE.
|
||||
|
||||
* solist.h: New file created from struct so_list in solib.c.
|
||||
(struct lm_info): Add forward declaration.
|
||||
(struct so_list): Remove fields lm, lm32, lmaddr. Replace with a
|
||||
single field, lm_info, which will be a pointer to target specific
|
||||
data.
|
||||
(struct target_so_ops): New struct.
|
||||
(free_so): Add extern declaration.
|
||||
(current_target_so_ops): Declare new global variable.
|
||||
(solib_map_sections):
|
||||
(TARGET_SO_LM_ADDR, TARGET_SO_FREE_SO, TARGET_SO_CLEAR_SOLIB,
|
||||
TARGET_SO_SOLIB_CREATE_INFERIOR_HOOK,
|
||||
TARGET_SO_SPECIAL_SYMBOL_HANDLING, TARGET_SO_CURRENT_SOS,
|
||||
TARGET_SO_OPEN_SYMBOL_FILE_OBJECT): New macros.
|
||||
|
||||
* solib.c (solib_map_sections, free_so, symbol_add_stub,
|
||||
update_solib_list, solib_add, info_shared_library_command,
|
||||
solib_address, clear_solib, solib_create_inferior_hook): Use
|
||||
new TARGET_SO_* macros to call function on target specific
|
||||
side indirectly.
|
||||
(current_target_so_ops): Define new global variable.
|
||||
(_initialize_solib): Eliminate HAVE_LINK_H ifdef.
|
||||
|
||||
* solib-svr4.h: New file; defines struct link_map_offsets and
|
||||
SVR4_FETCH_LINK_MAP_OFFSETS.
|
||||
|
||||
* solib-svr4.c (_initialize_svr4_solib, svr4_clear_solib,
|
||||
svr4_free_so): New functions.
|
||||
(special_symbol_handling, solib_create_inferior_function_hook,
|
||||
current_sos): Rename by adding a svr4_ prefix.
|
||||
(default_svr4_fetch_link_map_offsets): New function.
|
||||
(LM_ADDR, LM_NEXT, LM_NAME, IGNORE_FIRST_LINK_MAP_ENTRY,
|
||||
first_link_map_member, open_symbol_file_object, svr4_current_sos):
|
||||
Remove dependence on existence of link.h by calling
|
||||
SVR4_FETCH_LINK_MAP_OFFSETS to obtain the offsets of shared library
|
||||
data. As a result, SVR4 and non-SVR4 versions of many of these
|
||||
functions coalesce into a single function and HAVE_STRUCT_LINK_MAP32
|
||||
ugliness is moved into default_svr4_fetch_link_map_offsets where it
|
||||
is relatively contained.
|
||||
(SOLIB_EXTRACT_ADDRESS): Revert 2000-08-29 change in which
|
||||
solib_extract_address() is called instead of extract_address().
|
||||
(solib_extract_address): Removed.
|
||||
|
||||
* Makefile.in (solib.o): Add solist.h as a dependency.
|
||||
(solib-svr4.o): Add dependencies.
|
||||
|
||||
* sparc-tdep.c (gregset.h): Don't include unless USE_PROC_FS is
|
||||
defined.
|
||||
|
||||
* config/alpha/alpha-linux.mh, config/alpha/fbsd.mh,
|
||||
config/arm/linux.mh, config/i386/fbsd.mh,
|
||||
config/i386/i386dgux.mh, config/i386/i386gnu.mh,
|
||||
config/i386/i386sco5.mh, config/i386/i386sol2.mt,
|
||||
config/i386/i386v4.mh, config/i386/i386v42mp.mh,
|
||||
config/i386/linux.mh, config/i386/nbsd.mh,
|
||||
config/i386/nbsdelf.mh, config/i386/ncr3000.mt,
|
||||
config/i386/ptx4.mh, config/i386/sun386.mt,
|
||||
config/ia64/linux.mh, config/m68k/linux.mh,
|
||||
config/m68k/m68kv4.mh, config/m68k/nbsd.mh,
|
||||
config/m68k/sun2os4.mt, config/m68k/sun3os4.mt,
|
||||
config/m88k/delta88v4.mh, config/mips/mipsv4.mh,
|
||||
config/ns32k/nbsd.mh, config/powerpc/linux.mh,
|
||||
config/powerpc/nbsd.mh, config/powerpc/solaris.mh,
|
||||
config/rs6000/rs6000lynx.mt, config/sparc/linux.mt,
|
||||
config/sparc/nbsd.mh, config/sparc/nbsdelf.mh,
|
||||
config/sparc/sun4os4.mt, config/sparc/sun4sol2.mh
|
||||
(NATDEPFILES): Add solib-svr4.o to list.
|
||||
|
||||
2000-10-24 Kevin Buettner <kevinb@redhat.com>
|
||||
|
||||
* stabsread.c (dbx_lookup_type, dbx_alloc_type,
|
||||
|
|
|
@ -1840,7 +1840,11 @@ mon960-rom.o: mon960-rom.c monitor.h $(bfd_h) gdb_wait.h $(defs_h) $(gdbcmd_h) \
|
|||
$(inferior_h) target.h serial.h terminal.h
|
||||
|
||||
solib.o: solib.c $(command_h) $(defs_h) $(gdbcore_h) $(inferior_h) \
|
||||
objfiles.h gnu-regex.h symfile.h target.h gdb_string.h
|
||||
objfiles.h gnu-regex.h symfile.h target.h gdb_string.h solist.h
|
||||
|
||||
solib-svr4.o: solib.c $(command_h) $(defs_h) $(gdbcore_h) $(inferior_h) \
|
||||
objfiles.h gnu-regex.h symfile.h target.h gdb_string.h solist.h \
|
||||
solib-svr4.h
|
||||
|
||||
source.o: source.c $(defs_h) $(expression_h) $(frame_h) $(gdbcmd_h) \
|
||||
$(gdbcore_h) language.h objfiles.h gnu-regex.h symfile.h $(symtab_h) \
|
||||
|
|
|
@ -3,7 +3,7 @@ XDEPFILES=
|
|||
XM_FILE= xm-alphalinux.h
|
||||
NAT_FILE= nm-linux.h
|
||||
NATDEPFILES= infptrace.o inftarg.o corelow.o alpha-nat.o \
|
||||
fork-child.o solib.o linux-thread.o lin-thread.o
|
||||
fork-child.o solib.o solib-svr4.o linux-thread.o lin-thread.o
|
||||
|
||||
LOADLIBES = -ldl -rdynamic
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
# Host: FreeBSD/Alpha
|
||||
XDEPFILES=
|
||||
NATDEPFILES= fork-child.o infptrace.o inftarg.o solib.o \
|
||||
NATDEPFILES= fork-child.o infptrace.o inftarg.o solib.o solib-svr4.o \
|
||||
corelow.o core-regset.o alphabsd-nat.o
|
||||
XM_FILE= xm-fbsd.h
|
||||
NAT_FILE= nm-fbsd.h
|
||||
|
|
|
@ -4,7 +4,7 @@ XM_FILE= xm-linux.h
|
|||
XDEPFILES=
|
||||
|
||||
NAT_FILE= nm-linux.h
|
||||
NATDEPFILES= infptrace.o solib.o inftarg.o fork-child.o corelow.o \
|
||||
NATDEPFILES= infptrace.o solib.o solib-svr4.o inftarg.o fork-child.o corelow.o \
|
||||
core-regset.o arm-linux-nat.o linux-thread.o lin-thread.o
|
||||
|
||||
LOADLIBES= -ldl -rdynamic
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
# Host: Intel 386 running FreeBSD
|
||||
XDEPFILES=
|
||||
# NOTE: Do not spread NATDEPFILES over several lines - it hurts BSD make.
|
||||
NATDEPFILES= fork-child.o infptrace.o inftarg.o solib.o corelow.o core-aout.o core-regset.o i387-nat.o i386bsd-nat.o
|
||||
NATDEPFILES= fork-child.o infptrace.o inftarg.o solib.o solib-svr4.o corelow.o core-aout.o core-regset.o i387-nat.o i386bsd-nat.o
|
||||
XM_FILE= xm-fbsd.h
|
||||
NAT_FILE= nm-fbsd.h
|
||||
|
|
|
@ -6,5 +6,5 @@ XDEPFILES=
|
|||
XM_CLIBS= -lsocket -lnsl
|
||||
|
||||
NAT_FILE= nm-i386v4.h
|
||||
NATDEPFILES= corelow.o core-regset.o solib.o fork-child.o i386v4-nat.o \
|
||||
NATDEPFILES= corelow.o core-regset.o solib.o solib-svr4.o fork-child.o i386v4-nat.o \
|
||||
procfs.o proc-api.o proc-events.o proc-flags.o proc-why.o
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
# Host: Intel 386 running the GNU Hurd
|
||||
XDEPFILES= i387-tdep.o
|
||||
NATDEPFILES= i386gnu-nat.o gnu-nat.o fork-child.o solib.o corelow.o notify_S.o process_reply_S.o msg_reply_S.o msg_U.o exc_request_U.o exc_request_S.o
|
||||
NATDEPFILES= i386gnu-nat.o gnu-nat.o fork-child.o solib.o solib-svr4.o corelow.o notify_S.o process_reply_S.o msg_reply_S.o msg_U.o exc_request_U.o exc_request_S.o
|
||||
XM_FILE= xm-i386gnu.h
|
||||
NAT_FILE= nm-gnu.h
|
||||
MH_CFLAGS = -D_GNU_SOURCE
|
||||
|
|
|
@ -13,5 +13,5 @@ XM_CLIBS= -lPW -lsocket
|
|||
|
||||
NAT_FILE= nm-i386sco5.h
|
||||
NATDEPFILES= infptrace.o inftarg.o fork-child.o corefile.o core-aout.o \
|
||||
corelow.o i386v-nat.o solib.o
|
||||
corelow.o i386v-nat.o solib.o solib-svr4.o
|
||||
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
# Target: Intel 386 running SVR4
|
||||
TDEPFILES= i386-tdep.o i387-tdep.o solib.o
|
||||
TDEPFILES= i386-tdep.o i387-tdep.o solib.o solib-svr4.o
|
||||
TM_FILE= tm-i386sol2.h
|
||||
|
|
|
@ -6,5 +6,5 @@ XDEPFILES=
|
|||
XM_CLIBS= -lsocket -lnsl
|
||||
|
||||
NAT_FILE= nm-i386v4.h
|
||||
NATDEPFILES= corelow.o core-regset.o solib.o fork-child.o i386v4-nat.o \
|
||||
NATDEPFILES= corelow.o core-regset.o solib.o solib-svr4.o fork-child.o i386v4-nat.o \
|
||||
procfs.o proc-api.o proc-events.o proc-flags.o proc-why.o
|
||||
|
|
|
@ -8,6 +8,6 @@ XM_CLIBS= -lsocket -lnsl
|
|||
# we don't want nm-i386v4.h since that defines LOSING_POLL which isn't
|
||||
# appropriate for i386v42mp
|
||||
NAT_FILE= nm-i386v42mp.h
|
||||
NATDEPFILES= corelow.o core-regset.o solib.o fork-child.o i386v4-nat.o \
|
||||
NATDEPFILES= corelow.o core-regset.o solib.o solib-svr4.o fork-child.o i386v4-nat.o \
|
||||
procfs.o proc-api.o proc-events.o proc-flags.o proc-why.o uw-thread.o
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@ XM_FILE= xm-linux.h
|
|||
XDEPFILES=
|
||||
|
||||
NAT_FILE= nm-linux.h
|
||||
NATDEPFILES= infptrace.o solib.o inftarg.o fork-child.o corelow.o \
|
||||
NATDEPFILES= infptrace.o solib.o solib-svr4.o inftarg.o fork-child.o corelow.o \
|
||||
core-aout.o i386v-nat.o i386-linux-nat.o i387-nat.o \
|
||||
proc-service.o thread-db.o lin-lwp.o
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
# Host: Intel 386 running NetBSD
|
||||
XDEPFILES=
|
||||
NATDEPFILES= fork-child.o infptrace.o inftarg.o corelow.o \
|
||||
i386nbsd-nat.o solib.o
|
||||
i386nbsd-nat.o solib.o solib-svr4.o
|
||||
XM_FILE= xm-nbsd.h
|
||||
NAT_FILE= nm-nbsd.h
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
# Host: Intel 386 running NetBSD
|
||||
XDEPFILES=
|
||||
NATDEPFILES= fork-child.o infptrace.o inftarg.o corelow.o \
|
||||
i386nbsd-nat.o solib.o
|
||||
i386nbsd-nat.o solib.o solib-svr4.o
|
||||
XM_FILE= xm-nbsd.h
|
||||
NAT_FILE= nm-nbsdelf.h
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
# Target: Intel 386 running SVR4
|
||||
TDEPFILES= i386-tdep.o i387-tdep.o solib.o
|
||||
TDEPFILES= i386-tdep.o i387-tdep.o solib.o solib-svr4.o
|
||||
TM_FILE= tm-i386v4.h
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
# Host: Sequent Symmetry running ptx 1.3, with Weitek 1167 or i387
|
||||
|
||||
XM_FILE= xm-ptx4.h
|
||||
XDEPFILES= inftarg.o fork-child.o symm-nat.o corelow.o core-aout.o solib.o core-regset.o
|
||||
XDEPFILES= inftarg.o fork-child.o symm-nat.o corelow.o core-aout.o solib.o solib-svr4.o core-regset.o
|
||||
XM_CLIBS= -lseq
|
||||
|
||||
NAT_FILE= nm-ptx4.h
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
# Target: Sun 386i target configuration file.
|
||||
TDEPFILES= i386-tdep.o solib.o
|
||||
TDEPFILES= i386-tdep.o solib.o solib-svr4.o
|
||||
TM_FILE= tm-sun386.h
|
||||
|
|
|
@ -4,7 +4,7 @@ XM_FILE= xm-linux.h
|
|||
XDEPFILES=
|
||||
|
||||
NAT_FILE= nm-linux.h
|
||||
NATDEPFILES= infptrace.o solib.o inftarg.o fork-child.o corelow.o \
|
||||
NATDEPFILES= infptrace.o solib.o solib-svr4.o inftarg.o fork-child.o corelow.o \
|
||||
core-aout.o core-regset.o ia64-linux-nat.o linux-thread.o lin-thread.o
|
||||
|
||||
LOADLIBES = -ldl -rdynamic
|
||||
|
|
|
@ -4,7 +4,7 @@ XM_FILE= xm-linux.h
|
|||
XDEPFILES=
|
||||
|
||||
NAT_FILE= nm-linux.h
|
||||
NATDEPFILES= infptrace.o solib.o inftarg.o fork-child.o \
|
||||
NATDEPFILES= infptrace.o solib.o solib-svr4.o inftarg.o fork-child.o \
|
||||
corelow.o core-aout.o core-regset.o m68klinux-nat.o linux-thread.o
|
||||
|
||||
GDBSERVER_DEPFILES= low-linux.o
|
||||
|
|
|
@ -4,5 +4,5 @@ XM_FILE= xm-m68kv4.h
|
|||
XDEPFILES=
|
||||
|
||||
NAT_FILE= nm-sysv4.h
|
||||
NATDEPFILES= corelow.o core-regset.o solib.o fork-child.o procfs.o \
|
||||
NATDEPFILES= corelow.o core-regset.o solib.o solib-svr4.o fork-child.o procfs.o \
|
||||
proc-api.o proc-events.o proc-flags.o proc-why.o
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
# Host: Motorola m68k running NetBSD
|
||||
XDEPFILES=
|
||||
NATDEPFILES= infptrace.o inftarg.o fork-child.o corelow.o \
|
||||
m68knbsd-nat.o solib.o
|
||||
m68knbsd-nat.o solib.o solib-svr4.o
|
||||
XM_FILE= xm-nbsd.h
|
||||
NAT_FILE= nm-nbsd.h
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
# Target: Sun 2, running SunOS 4
|
||||
TDEPFILES= solib.o m68k-tdep.o
|
||||
TDEPFILES= solib.o solib-svr4.o m68k-tdep.o
|
||||
TM_FILE= tm-sun2os4.h
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
# Target: Sun 3, running SunOS 4, as a target system
|
||||
TDEPFILES= solib.o m68k-tdep.o
|
||||
TDEPFILES= solib.o solib-svr4.o m68k-tdep.o
|
||||
TM_FILE= tm-sun3os4.h
|
||||
|
|
|
@ -4,5 +4,5 @@ XM_FILE= xm-delta88v4.h
|
|||
XDEPFILES=
|
||||
|
||||
NAT_FILE= nm-delta88v4.h
|
||||
NATDEPFILES= fork-child.o m88k-nat.o corelow.o core-regset.o solib.o \
|
||||
NATDEPFILES= fork-child.o m88k-nat.o corelow.o core-regset.o solib.o solib-svr4.o \
|
||||
procfs.o proc-api.o proc-events.o proc-flags.o proc-why.o
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
# Host: Mips running SVR4
|
||||
XM_FILE= xm-mipsv4.h
|
||||
NAT_FILE= ../nm-sysv4.h
|
||||
NATDEPFILES= fork-child.o mipsv4-nat.o corelow.o core-regset.o solib.o \
|
||||
NATDEPFILES= fork-child.o mipsv4-nat.o corelow.o core-regset.o solib.o solib-svr4.o \
|
||||
procfs.o proc-api.o proc-events.o proc-flags.o proc-why.o
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
# Host: PC532 running NetBSD
|
||||
XDEPFILES=
|
||||
NATDEPFILES= fork-child.o infptrace.o inftarg.o corelow.o \
|
||||
ns32knbsd-nat.o solib.o
|
||||
ns32knbsd-nat.o solib.o solib-svr4.o
|
||||
XM_FILE= xm-nbsd.h
|
||||
NAT_FILE= nm-nbsd.h
|
||||
|
|
|
@ -5,7 +5,7 @@ XDEPFILES=
|
|||
XM_CLIBS=
|
||||
|
||||
NAT_FILE= nm-linux.h
|
||||
NATDEPFILES= infptrace.o solib.o inftarg.o fork-child.o corelow.o \
|
||||
NATDEPFILES= infptrace.o solib.o solib-svr4.o inftarg.o fork-child.o corelow.o \
|
||||
core-aout.o core-regset.o ppc-linux-nat.o proc-service.o thread-db.o lin-lwp.o
|
||||
|
||||
LOADLIBES = -ldl -rdynamic
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
# Host: PowerPC, running NetBSD
|
||||
XDEPFILES=
|
||||
NATDEPFILES= fork-child.o infptrace.o inftarg.o corelow.o solib.o ppcnbsd-nat.o
|
||||
NATDEPFILES= fork-child.o infptrace.o inftarg.o corelow.o solib.o solib-svr4.o ppcnbsd-nat.o
|
||||
XM_FILE= xm-nbsd.h
|
||||
NAT_FILE= nm-nbsd.h
|
||||
|
|
|
@ -5,7 +5,7 @@ XDEPFILES=
|
|||
XM_CLIBS= -lsocket -lnsl
|
||||
|
||||
NAT_FILE= nm-solaris.h
|
||||
NATDEPFILES= corelow.o core-sol2.o solib.o fork-child.o procfs.o \
|
||||
NATDEPFILES= corelow.o core-sol2.o solib.o solib-svr4.o fork-child.o procfs.o \
|
||||
proc-api.o proc-events.o proc-flags.o proc-why.o
|
||||
|
||||
# If you are compiling with Sun's compiler, add the -xs option to CC
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
# Target: IBM RS6000 running LynxOS
|
||||
TDEPFILES= coff-solib.o rs6000-tdep.o ppc-linux-tdep.o
|
||||
TDEPFILES= coff-solib.o solib-svr4.o rs6000-tdep.o ppc-linux-tdep.o
|
||||
TM_FILE= tm-rs6000ly.h
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
# Target: Sparcstation, running Linux
|
||||
TDEPFILES= sparc-tdep.o solib.o
|
||||
TDEPFILES= sparc-tdep.o solib.o solib-svr4.o
|
||||
TM_FILE= tm-linux.h
|
||||
|
|
|
@ -2,5 +2,5 @@
|
|||
XDEPFILES=
|
||||
XM_FILE= xm-nbsd.h
|
||||
NAT_FILE= nm-nbsd.h
|
||||
NATDEPFILES= fork-child.o infptrace.o inftarg.o corelow.o sparc-nat.o solib.o
|
||||
NATDEPFILES= fork-child.o infptrace.o inftarg.o corelow.o sparc-nat.o solib.o solib-svr4.o
|
||||
HOST_IPC=-DBSD_IPC
|
||||
|
|
|
@ -2,5 +2,5 @@
|
|||
XDEPFILES=
|
||||
XM_FILE= xm-nbsd.h
|
||||
NAT_FILE= nm-nbsdelf.h
|
||||
NATDEPFILES= fork-child.o infptrace.o inftarg.o corelow.o sparc-nat.o solib.o
|
||||
NATDEPFILES= fork-child.o infptrace.o inftarg.o corelow.o sparc-nat.o solib.o solib-svr4.o
|
||||
HOST_IPC=-DBSD_IPC
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
# Target: Sun 4 or Sparcstation, running SunOS 4
|
||||
TDEPFILES= sparc-tdep.o solib.o
|
||||
TDEPFILES= sparc-tdep.o solib.o solib-svr4.o
|
||||
TM_FILE= tm-sun4os4.h
|
||||
|
|
|
@ -5,7 +5,7 @@ XDEPFILES=
|
|||
XM_CLIBS= -lsocket -lnsl
|
||||
|
||||
NAT_FILE= nm-sun4sol2.h
|
||||
NATDEPFILES= corelow.o core-sol2.o solib.o fork-child.o procfs.o \
|
||||
NATDEPFILES= corelow.o core-sol2.o solib.o solib-svr4.o fork-child.o procfs.o \
|
||||
proc-api.o proc-events.o proc-flags.o proc-why.o
|
||||
|
||||
# If you are compiling with Sun's compiler, add the -xs option to CC
|
||||
|
|
1586
gdb/solib-svr4.c
Normal file
1586
gdb/solib-svr4.c
Normal file
File diff suppressed because it is too large
Load diff
70
gdb/solib-svr4.h
Normal file
70
gdb/solib-svr4.h
Normal file
|
@ -0,0 +1,70 @@
|
|||
/* Handle shared libraries for GDB, the GNU Debugger.
|
||||
Copyright 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. */
|
||||
|
||||
/* Critical offsets and sizes which describe struct r_debug and
|
||||
struct link_map on SVR4-like targets. All offsets and sizes are
|
||||
in bytes unless otherwise specified. */
|
||||
|
||||
struct link_map_offsets
|
||||
{
|
||||
/* Size of struct r_debug (or equivalent), or at least enough of it to
|
||||
be able to obtain the r_map field. */
|
||||
int r_debug_size;
|
||||
|
||||
/* Offset to the r_map field in struct r_debug. */
|
||||
int r_map_offset;
|
||||
|
||||
/* Size of the r_map field in struct r_debug. */
|
||||
int r_map_size;
|
||||
|
||||
/* Size of struct link_map (or equivalent), or at least enough of it
|
||||
to be able to obtain the fields below. */
|
||||
int link_map_size;
|
||||
|
||||
/* Offset to l_addr field in struct link_map. */
|
||||
int l_addr_offset;
|
||||
|
||||
/* Size of l_addr field in struct link_map. */
|
||||
int l_addr_size;
|
||||
|
||||
/* Offset to l_next field in struct link_map. */
|
||||
int l_next_offset;
|
||||
|
||||
/* Size of l_next field in struct link_map. */
|
||||
int l_next_size;
|
||||
|
||||
/* Offset to l_prev field in struct link_map. */
|
||||
int l_prev_offset;
|
||||
|
||||
/* Size of l_prev field in struct link_map. */
|
||||
int l_prev_size;
|
||||
|
||||
/* Offset to l_name field in struct link_map. */
|
||||
int l_name_offset;
|
||||
|
||||
/* Size of l_name field in struct link_map. */
|
||||
int l_name_size;
|
||||
};
|
||||
|
||||
#ifndef SVR4_FETCH_LINK_MAP_OFFSETS
|
||||
extern struct link_map_offsets *default_svr4_fetch_link_map_offsets (void);
|
||||
#define SVR4_FETCH_LINK_MAP_OFFSETS() default_svr4_fetch_link_map_offsets ()
|
||||
#endif
|
1577
gdb/solib.c
1577
gdb/solib.c
File diff suppressed because it is too large
Load diff
91
gdb/solist.h
Normal file
91
gdb/solist.h
Normal file
|
@ -0,0 +1,91 @@
|
|||
/* Shared library declarations for GDB, the GNU Debugger.
|
||||
Copyright 1990, 91, 92, 93, 94, 95, 96, 98, 1999, 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. */
|
||||
|
||||
#define SO_NAME_MAX_PATH_SIZE 512 /* FIXME: Should be dynamic */
|
||||
|
||||
/* Forward declaration for target specific link map information. This
|
||||
struct is opaque to all but the target specific file. */
|
||||
struct lm_info;
|
||||
|
||||
struct so_list
|
||||
{
|
||||
/* The following fields of the structure come directly from the
|
||||
dynamic linker's tables in the inferior, and are initialized by
|
||||
current_sos. */
|
||||
|
||||
struct so_list *next; /* next structure in linked list */
|
||||
|
||||
/* A pointer to target specific link map information. Often this
|
||||
will be a copy of struct link_map from the user process, but
|
||||
it need not be; it can be any collection of data needed to
|
||||
traverse the dynamic linker's data structures. */
|
||||
struct lm_info *lm_info;
|
||||
|
||||
/* Shared object file name, exactly as it appears in the
|
||||
inferior's link map. This may be a relative path, or something
|
||||
which needs to be looked up in LD_LIBRARY_PATH, etc. We use it
|
||||
to tell which entries in the inferior's dynamic linker's link
|
||||
map we've already loaded. */
|
||||
char so_original_name[SO_NAME_MAX_PATH_SIZE];
|
||||
|
||||
/* shared object file name, expanded to something GDB can open */
|
||||
char so_name[SO_NAME_MAX_PATH_SIZE];
|
||||
|
||||
/* The following fields of the structure are built from
|
||||
information gathered from the shared object file itself, and
|
||||
are initialized when we actually add it to our symbol tables. */
|
||||
|
||||
bfd *abfd;
|
||||
CORE_ADDR lmend; /* upper addr bound of mapped object */
|
||||
char symbols_loaded; /* flag: symbols read in yet? */
|
||||
char from_tty; /* flag: print msgs? */
|
||||
struct objfile *objfile; /* objfile for loaded lib */
|
||||
struct section_table *sections;
|
||||
struct section_table *sections_end;
|
||||
struct section_table *textsection;
|
||||
};
|
||||
|
||||
struct target_so_ops
|
||||
{
|
||||
CORE_ADDR (*lm_addr) (struct so_list *so);
|
||||
void (*free_so) (struct so_list *so);
|
||||
void (*clear_solib) (void);
|
||||
void (*solib_create_inferior_hook) (void);
|
||||
void (*special_symbol_handling) (void);
|
||||
struct so_list *(*current_sos) (void);
|
||||
int (*open_symbol_file_object) (void *from_ttyp);
|
||||
};
|
||||
|
||||
void free_so (struct so_list *so);
|
||||
|
||||
/* FIXME: gdbarch needs to control this variable */
|
||||
extern struct target_so_ops *current_target_so_ops;
|
||||
|
||||
#define TARGET_SO_LM_ADDR (current_target_so_ops->lm_addr)
|
||||
#define TARGET_SO_FREE_SO (current_target_so_ops->free_so)
|
||||
#define TARGET_SO_CLEAR_SOLIB (current_target_so_ops->clear_solib)
|
||||
#define TARGET_SO_SOLIB_CREATE_INFERIOR_HOOK \
|
||||
(current_target_so_ops->solib_create_inferior_hook)
|
||||
#define TARGET_SO_SPECIAL_SYMBOL_HANDLING \
|
||||
(current_target_so_ops->special_symbol_handling)
|
||||
#define TARGET_SO_CURRENT_SOS (current_target_so_ops->current_sos)
|
||||
#define TARGET_SO_OPEN_SYMBOL_FILE_OBJECT \
|
||||
(current_target_so_ops->open_symbol_file_object)
|
|
@ -33,15 +33,14 @@
|
|||
|
||||
#ifdef USE_PROC_FS
|
||||
#include <sys/procfs.h>
|
||||
/* Prototypes for supply_gregset etc. */
|
||||
#include "gregset.h"
|
||||
#endif
|
||||
|
||||
#include "gdbcore.h"
|
||||
|
||||
#include "symfile.h" /* for 'entry_point_address' */
|
||||
|
||||
/* Prototypes for supply_gregset etc. */
|
||||
#include "gregset.h"
|
||||
|
||||
/*
|
||||
* Some local macros that have multi-arch and non-multi-arch versions:
|
||||
*/
|
||||
|
|
Loading…
Reference in a new issue