aboutsummaryrefslogtreecommitdiff
path: root/gdb/solib.c
AgeCommit message (Collapse)AuthorFilesLines
2002-01-082002-01-07 Michael Snyder <msnyder@redhat.com>Michael Snyder1-16/+4
* solib.c (info_sharedlibrary_command): Use TARGET_PTR_BIT instead of bfd_get_arch_size. Don't bail out just because there's no exec_bfd.
2001-12-042001-12-04 Orjan Friberg <orjanf@axis.com>Orjan Friberg1-0/+23
* solib.c (solib_open): Make path relative if search for absolute path failed. If search for relative path in solib_search_path failed, fall back to search for basename only.
2001-11-01Approved by kev@cygnus.comFred Fish1-4/+8
ChangeLog entry: 2001-11-01 Fred Fish <fnf@redhat.com> * coff-solib.c (coff_solib_add): Add new readsyms arg. * irix5-nat.c (solib_add): Ditto. * osfsolib.c (solib_add): Ditto. * pa64solib.c (pa64_solib_add): Ditto. * pa64solib.c (add_to_solist): Ditto. * pa64solib.c (read_dld_descriptor): Ditto. * solib.c (solib_add): Ditto. * somsolib.c (som_solib_add): Ditto. * win32-nat.c (child_solib_add): Ditto. * xcoffsolib.c (solib_add): Ditto. * coff-solib.h (coff_solib_add): Add new readsyms arg to prototype. * pa64solib.c (add_to_solist): Ditto. * pa64solib.c (read_dld_descriptor): Ditto. * pa64solib.h (pa64_solib_add): Ditto. * solib.h (solib_add): Ditto. * somsolib.h (som_solib_add): Ditto. * config/i386/tm-cygwin.h (child_solib_add): Ditto. * coff-solib.c (coff_solib_add): If readsyms is zero don't read symbols but do any other needed work for shared libs. * irix5-nat.c: Ditto. * osfsolib.c (solib_add): Ditto. * solib.c (solib_add): Ditto. * win32-nat.c (child_solib_add): Ditto. * xcoffsolib.c (solib_add): Ditto. * irix5-nat.c (sharedlibrary_command): Pass 1 as readsyms to solib_add to force reading of shared library symbols. * osfsolib.c (sharedlibrary_command;): Ditto. * pa64solib.c (pa64_solib_sharedlibrary_command): Ditto. * solib.c (sharedlibrary_command): Ditto. * somsolib.c (som_solib_sharedlibrary_command): Ditto. * xcoffsolib.c (sharedlibrary_command): Ditto. * coff-solib.c (coff_solib_create_inferior_hook): Call solib_add unconditionally with auto_solib_add. * irix5-nat.c (solib_create_inferior_hook): Ditto. * osfsolib.c (solib_create_inferior_hook): Ditto. * solib.c (solib_create_inferior_hook): Ditto. * solib-osf.c (osf_solib_create_inferior_hook): Ditto. * solib-svr4.c (enable_break): Ditto. * solib-sunos.c (sunos_solib_create_inferior_hook): Ditto. * corelow.c (solib_add_stub): Add auto_solib_add to args passed via SOLIB_ADD. * sol-thread.c (sol_thread_attach): Ditto. * config/rs6000/nm-rs6000.h (SOLIB_ADD): Ditto. * infcmd.c (attach_command): Remove auto_solib_add decl. Call SOLIB_ADD directly with auto_solib_add. * infrun.c (handle_inferior_event): Ditto. * coff-solib.h (SOLIB_ADD): Add readsyms arg. * pa64solib.h (SOLIB_ADD): Ditto. * solib.h (SOLIB_ADD): Ditto. * somsolib.h (SOLIB_ADD): Ditto. * config/i386/tm-cygwin.h (SOLIB_ADD): Ditto. * fork-child.c (clone_and_follow_inferior): Remove unused auto_solib_add decl. * pa64solib.c (pa64_solib_add): Call add_to_solist with readsyms. (read_dld_descriptor): Ditto. (pa64_solib_add): Call read_dld_descriptor with readsyms. (pa64_solib_in_dynamic_linker): Ditto. * corelow.c (symfile.h): Need this for auto_solib_add declaration. * sol-thread.c (symfile.h): Ditto. Approved by eliz@is.elta.co.il doc/ChangeLog entry: 2001-11-01 Fred Fish <fnf@redhat.com> * gdbint.texinfo (SOLIB_ADD): Document additional new "readsyms" arg.
2001-10-30Changes approved by kev@cygnus.com, ezannoni@cygnus.com, eliz@is.elta.co.il.Fred Fish1-5/+5
Changelog: 2001-10-27 Fred Fish <fnf@redhat.com> * symfile.c (auto_solib_add): Update comment to note that this variable is now just used as a boolean to control shlib autoloading, and clarify when it is used. * symfile.h (auto_solib_add): Ditto. * symfile.c (auto_solib_limit): New variable that holds the autoloading threshold instead of overloading auto_solib_add. * symfile.h (auto_solib_limit): Ditto. * irix5-nat.c (_initialize_solib): Change auto-solib-add variable from var_zinteger to var_boolean and update help. * osfsolib.c (_initialize_solib): Ditto. * pa64solib.c (_initialize_pa64_solib): Ditto. * solib.c (_initialize_solib): Ditto. * somsolib.c (_initialize_som_solib): Ditto. * xcoffsolib.c (_initialize_solib): Ditto. * pa64solib.c (pa64_solib_total_st_size): Update comment to note that the new auto_solib_limit variable is used instead of overloading auto_solib_add variable. (_initialize_pa64_solib): Ditto. * somsolib.c (som_solib_total_st_size): Ditto. (_initialize_som_solib): Ditto. * pa64solib.c (_initialize_pa64_solib): Add new set/show commands for auto-solib-limit variable. * somsolib.c (_initialize_som_solib): Ditto * pa64solib.c (add_to_solist): Check that auto_solib_add is set and use auto_solib_limit as the threshold size instead of auto_solib_add. * somsolib.c (som_solib_add): Ditto, and also change warning text about size threshold exceeded. doc/ChangeLog: 2001-10-28 Fred Fish <fnf@redhat.com> * gdb.texinfo (auto-solib-add): Change docs to match implementation change. (auto-solib-limit): Add docs for new variable.
2001-09-14Commit Ilya Golubev's clear_solib() fixes.Kevin Buettner1-0/+2
2001-06-04 * source.c (mod_path, openp): Use HAVE_DOS_BASED_FILE_SYSTEMEli Zaretskii1-3/+8
instead of system-specific define's like _WIN32 and __MSDOS__. Use IS_DIR_SEPARATOR and IS_ABSOLUTE_PATH instead of SLASH_P and ROOTED_P. (top-level): #include "filenames.h". * solib.c (solib_open): Use IS_DIR_SEPARATOR and IS_ABSOLUTE_PATH instead of SLASH_CHAR, ROOTED_P and SLASH_P. (top-level): #include "filenames.h". * defs.h (SLASH_P, SLASH_CHAR, ROOTED_P): Remove definitions. (SLASH_STRING): Define only for _WIN32. * completer.c: Use HAVE_DOS_BASED_FILE_SYSTEM instead of __MSDOS_. * cli/cli-cmds.c (cd_command): Use IS_DIR_SEPARATOR and IS_ABSOLUTE_PATH instead of SLASH_P and ROOTED_P. Replace system-specific ifdefs with HAVE_DOS_BASED_FILE_SYSTEM. (top-level): #include "filenames.h".
2001-05-26 * solib.c (update_solib_list): Move target_resize_to_sections()Nicholas Duffek1-19/+12
into solib_map_sections() loop. (info_sharedlibrary_command): Try bfd_arch_bits_per_address() if bfd_get_arch_size() fails.
2001-05-142001-05-14 Michael Snyder <msnyder@redhat.com>Michael Snyder1-0/+12
* solib.c, solib.h: Add comment for function no_shared_libraries.
2001-04-17Fix thinko.Michael Snyder1-1/+1
2001-04-172001-04-17 Michael Snyder <msnyder@redhat.com>Michael Snyder1-0/+8
* solib.c (no_shared_libraries): New function. Discard all symbols from shared libraries. (_initialize_solib): Add command "nosharedlibrary" as complement to the command "sharedlibrary". Unloads symbols for all solibs.
2001-03-06Update/correct copyright notices.Kevin Buettner1-1/+2
2001-02-22Made changes to shared library support and added more of the support neededKevin Buettner1-0/+21
for AIX/IA-64.
2001-02-202001-02-20 Martin M. Hunt <hunt@redhat.com>Martin Hunt1-4/+4
* solib.c (info_sharedlibrary_command): Don't assume pointers are the same size of long, call longest_local_hex_string_custom().
2001-02-19 * demangle.c (demangling_style_names): New variable.Eli Zaretskii1-13/+16
(_initialize_demangler): Fill demangling_style_names with the names of known demangling styles from libiberty_demanglers[]. Use add_set_enum_cmd instead of add_set_cmd, to get completion on demangling style names. * proc-api.c (_initialize_proc_api): Make `procfs-file' use file-name completion. * remote-rdi.c (_initialize_remote_rdi): Ditto for `rdilogfile'. * solib.c (_initialize_solib): Ditto for `solib-search-path' and `solib-absolute-prefix'. * tracepoint.c (_initialize_tracepoint): Ditto for `save-tracepoints'. * win32-nat.c (_initialize_inftarg): Ditto for `dll-symbols'. * cli/cli-cmds.c (init_cli_cmds): Make `shell' and `make' use file-name completion. * infcmd.c (_initialize_infcmd): Make the following commands use the file-name completer: `tty', `args', `path', `paths', and `run'.
2001-02-08Add __FILE__ and __LINE__ parameter to internal_error() /Andrew Cagney1-2/+3
internal_verror().
2001-01-31Replace strsave() with xstrdup().Andrew Cagney1-2/+2
2000-12-23* solib.c (solib_open): If path is relative, look for itMark Kettenis1-7/+8
literally. This matches the behaviour of the GNU dynamic linker more closely.
2000-12-15Replace free() with xfree().Kevin Buettner1-4/+4
2000-11-27* remote.c (remote_write_bytes): Add default case to switchAndrew Cagney1-0/+5
initializing ``todo''. Ditto for ``nr_bytes''. * top.c (catch_errors): Always initialize ``val''. * solib.c (info_sharedlibrary_command): Handle bfd_get_arch_size returning an unknown size. * gdbtypes.c (count_virtual_fns): Always initialize ``vfuncs''. * breakpoint.c (break_at_finish_at_depth_command_1): Initialise extra_args to NULL. (break_at_finish_command_1): Ditto.
2000-11-21 * solib.c (solib_open): Handle the case whereKevin Buettner1-12/+16
solib_absolute_prefix is NULL.
2000-11-212000-11-20 Michael Snyder <msnyder@cleaver.cygnus.com>Michael Snyder1-38/+84
* solist.h: Declare new function solib_open. * solib.c (solib_open): New function. Abstracts some of the code from solib_map_sections, for finding the binary solib file. (solib_map_sections): Call solib_open. * solib-svr4.c (enable_break): Call solib_open.
2000-10-30solib.c relocation improvementsKevin Buettner1-43/+19
2000-10-24Reorganize solib.c.Kevin Buettner1-1552/+25
2000-10-24* solib.c (open_symbol_file_object): Update function signature toAndrew Cagney1-3/+4
match catch_errors function argument.
2000-10-20Protoization.Kevin Buettner1-20/+14
2000-08-31Rename bfd_elf_get_arch_size to bfd_get_arch_size().Kevin Buettner1-11/+11
2000-08-302000-08-29 Michael Snyder <msnyder@seadog.cygnus.com>Michael Snyder1-30/+177
* valops.c (value_cast): Indentation fix-up. * acconfig.h (HAVE_PRGREGSET32_T, HAVE_PRFPREGSET32_T, HAVE_STRUCT_LINK_MAP32): New configure macros. * config.in: Ditto. * configure.in: Test for the above new macros. * breakpoint.c: Update copyright date. * core-sol2.c: Include v9/sys/privregs.h directly to work around a bug in Sun's Solaris 8 header files. (fetch_core_registers): Use the above new configure macros to handle cross-debugging of 32-bit core files on a 64-bit host. * sol-thread.c (ps_pdmodel) New function. (rw_common): For debugging of 32-bit apps on a 64-bit host, truncate addresses to 32 bits. * solib.c (solib_extract_address): Functionize. Make 32/64 aware. (LM_ADDR, LM_NEXT, LM_NAME): Ditto. (IGNORE_FIRST_LINK_MAP): Ditto. (first_link_map_member): Make 32/64 aware. (open_symbol_file_object): Ditto. (current_sos): Ditto.
2000-08-092000-08-09 Michael Snyder <msnyder@cleaver.cygnus.com>Michael Snyder1-1/+2
* blockframe.c (sigtramp_saved_pc): Use dynamic allocation, since TARGET_PTR_BIT is no longer a constant (MULTI_ARCH). * irix4-nat.c (get_longjmp_target): Ditto. * irix5-nat.c (get_longjmp_target): Ditto. * jv-valprint.c (java_value_print): Ditto. * m3-nat.c (get_cprocs): Ditto. * m68k-tdep.c (get_longjmp_target): Ditto. * mips-nat.c (get_longjmp_target): Ditto. * mipsv4-nat.c(get_longjmp_target): Ditto. * pa64solib.c (read_dynamic_info): Ditto. * solib.c (elf_locate_base): Ditto.
2000-08-07* solib.c (bfd_lookup_symbol): Fall back on the dynamic symbolMark Kettenis1-2/+30
table if the symbol couldn't be found in the normal symbol table (i.e. if the shared object in question was stripped).
2000-07-30Protoization.Kevin Buettner1-37/+22
2000-07-19* solib.c (elf_locate_base, info_sharedlibrary_command): RenameAndrew Cagney1-2/+2
bfd_elf_get_arch_size to bfd_get_arch_size.
2000-05-28PARAMS removal.Kevin Buettner1-31/+17
2000-05-22Purge (almost) make_cleanup_func.Andrew Cagney1-1/+1
2000-05-16Cleanup discard_minimal_symbols cleanup.Andrew Cagney1-1/+1
2000-05-112000-05-10 Elena Zannoni <ezannoni@kwikemart.cygnus.com>Elena Zannoni1-17/+18
* solib.c (symbol_add_stub): Remember the index and the name of the section with the lowest address. Use this data (instead of data from .text) to pass info into symbol_file_add. * elfread.c (record_minimal_symbol_and_info): Use the section where the symbol lives to get the index, instead of guessing.
2000-05-052000-05-03 Michael Snyder <msnyder@seadog.cygnus.com>Michael Snyder1-49/+67
* solib.c (elf_locate_base, info_sharedlibrary_command): Look at the bfd to determine if it is elf32 or elf64, rather than using an ifdef. This makes it runtime teststable and multi-arch.
2000-04-172000-04-17 Elena Zannoni <ezannoni@kwikemart.cygnus.com>Elena Zannoni1-1/+10
* symfile.h (struct section_addr_info ): Remove fields for special treatment of .text, .data and .bss sections. * solib.c (symbol_add_stub): The special field text_addr is not available anymore. Search for the .text field the hard way. * symfile.c (build_section_addr_info_from_section_table): Don't fill in {text, data, bss}_addr any more. (default_symfile_offsets): Don't use {text, data, bss}_addr fields to fill in section_offsets for objfile. (syms_from_objfile): Don't deal with {text, data, bss}_addr as a special case anymore. (add_symbol_file_command): Ditto.
2000-04-05* solib.c (update_solib_list): New function.Jim Blandy1-30/+54
(solib_add): Call update_solib_list, and then read symbols. (info_sharedlibrary_command): Call update_solib_list, not solib_add.
2000-04-042000-04-03 H.J. Lu <hjl@gnu.org>H.J. Lu1-1/+1
* gdb_regex.h: New. Include "regex.h" if USE_INCLUDED_REGEX is defined and <regex.h> otherwise. * irix5-nat.c: Include "gdb_regex.h" instead of "gnu-regex.h". * monitor.c: Likewise. * osfsolib.c: Likewise. * solib.c: Likewise. * source.c: Likewise. * symtab.c: Likewise. * Makefile.in (REGEX): Changed to @REGEX@. (REGEX_CFLAGS): New. (REGEX1): Removed. (ADD_DEPS): Use $(REGEX) instead of $(REGEX1). (INTERNAL_WARN_CFLAGS): Add $(REGEX_CFLAGS). * configure.in (--with-included-regex): New switch. (REGEX): New. Subsstitue @REGEX@ in Makefile.in. (REGEX_CFLAGS): New. Subsstitue @REGEX_CFLAGS@ in Makefile.in. * configure: Regenerated.
2000-04-03* solib.c (solib_add): Move all the code for loading symbol tablesJim Blandy1-33/+51
below the code to sort out additions and removals. That way, we always catch all loaded shared libraries whose symbols we haven't grabbed yet. * solib.c (solib_add): Don't try to free a shared object's objfile if it doesn't have one. Duh. * solib.c (solib_add): If a pattern was given, but it doesn't match any currently loaded shared libraries, print a message; don't just be silent.
2000-03-242000-03-23 Michael Snyder <msnyder@cleaver.cygnus.com>Michael Snyder1-7/+6
* solib.c (open_symbol_file_object): to sneak an int argument past catch_errors, instead of casting it to a pointer, simply pass it by address.
2000-03-21Make sure section addresses from a shared object are correctly set inKevin Buettner1-9/+7
a new struct objfile.
2000-03-17* solib.c (solib_add): Delete debugging code.Jim Blandy1-23/+0
2000-03-16* solib.c (current_sos): Be more careful about freeing the newJim Blandy1-3/+4
so_list node if an error occurs.
2000-03-15Deal with the inferior unloading shared objects.Jim Blandy1-259/+422
* solib.c (current_sos): New function, replacing find_solib. (find_solib): Deleted. (free_so): New function. (clear_solib): Call free_so, instead of writing it out. (solib_add): Rewritten: compare the inferior's current list of shared objects with GDB's list, and do the required loads and unloads. (info_sharedlibrary_command, solib_address): Don't use find_solib to walk the list of shared libraries: call solib_add, and then walk the list at so_list_head normally. * objfiles.c (free_objfile): Don't call CLEAR_SOLIB, and don't detach the core target. These tasks are taken care of elsewhere. * target.c (remove_target_sections): New function. * target.h (remove_target_sections): New declaration. * solib.c (symbol_add_stub): Check whether we've already created an objfile for this shared object first, before doing all that work to compute section addresses, etc. * objfiles.c (unlink_objfile): Report an internal error if objfile doesn't occur in the object_files list. * solib.c (special_symbol_handling): Delete argument; it's not used. * solib.c (SOLIB_EXTRACT_ADDRESS): New macro to extract addresses from solib structures. Use it throughout solib.c, get rid of all CORE_ADDR casts. (struct so_list): Change type of lmaddr to CORE_ADDR. (first_link_map_member): Change return value type to CORE_ADDR, update callers. (solib_add_common_symbols): Change parameter type to CORE_ADDR, update callers. (open_symbol_file_object, find_solib): Change type of lm variable to CORE_ADDR.
2000-03-06Doc fix.Jim Blandy1-4/+4
1999-11-17import gdb-1999-11-16 snapshotJason Molenda1-1/+1
1999-10-12import gdb-1999-10-11 snapshotJason Molenda1-2/+1
1999-10-05import gdb-1999-10-04 snapshotJason Molenda1-2/+5
1999-09-28import gdb-1999-09-28 snapshotJason Molenda1-32/+3