2011-08-09 Pedro Alves <pedro@codesourcery.com>

gdb/
	* elfread.c (elf_symtab_read): Ditto.
	* maint.c (maintenance_command): Ditto.
	* somread.c (som_symtab_read): Ditto.
	* solib.c (solib_find, solib_map_sections, update_solib_list)
	(solib_add, info_sharedlibrary_command, solib_name_from_address)
	(solib_create_inferior_hook, in_solib_dynsym_resolve_code)
	(sharedlibrary_command, no_shared_libraries): Rework comments.
	* solib-irix.c (locate_base, disable_break, enable_break)
	(irix_solib_create_inferior_hook, irix_solib_create_inferior_hook)
	(irix_current_sos, irix_open_symbol_file_object)
	(irix_special_symbol_handling): Ditto.
	* solib-sunos.c (locate_base, first_link_map_member)
	(sunos_current_sos, disable_break, enable_break)
	(sunos_special_symbol_handling, sunos_solib_create_inferior_hook):
	Ditto.
	* solib-svr4.c (bfd_lookup_symbol, elf_locate_base, locate_base)
	(open_symbol_file_object, svr4_current_sos, enable_break)
	(svr4_special_symbol_handling, svr4_solib_create_inferior_hook):
	Ditto.
	* solib-frv.c (bfd_lookup_symbol, open_symbol_file_object)
	(frv_current_sos, enable_break, frv_special_symbol_handling)
	(frv_solib_create_inferior_hook): Ditto.
	* solist.h (struct target_so_ops): Extend the comments of the
	special_symbol_handling, current_sos and open_symbol_file_object
	methods.
This commit is contained in:
Pedro Alves
2011-08-09 12:51:47 +00:00
parent 5e239b84ac
commit 7f86f0587f
10 changed files with 150 additions and 692 deletions

View File

@@ -239,17 +239,7 @@ static void frv_relocate_main_executable (void);
static CORE_ADDR main_got (void);
static int enable_break2 (void);
/*
LOCAL FUNCTION
bfd_lookup_symbol -- lookup the value for a specific symbol
SYNOPSIS
CORE_ADDR bfd_lookup_symbol (bfd *abfd, char *symname)
DESCRIPTION
/* Lookup the value for a specific symbol.
An expensive way to lookup the value of a single symbol for
bfd's that are only temporary anyway. This is used by the
@@ -257,8 +247,7 @@ static int enable_break2 (void);
interface structures in the shared library.
Note that 0 is specifically allowed as an error return (no
such symbol).
*/
such symbol). */
static CORE_ADDR
bfd_lookup_symbol (bfd *abfd, char *symname)
@@ -321,26 +310,7 @@ bfd_lookup_symbol (bfd *abfd, char *symname)
return symaddr;
}
/*
LOCAL FUNCTION
open_symbol_file_object
SYNOPSIS
void open_symbol_file_object (void *from_tty)
DESCRIPTION
If no open symbol file, attempt to locate and open the main symbol
file.
If FROM_TTYP dereferences to a non-zero integer, allow messages to
be printed. This parameter is a pointer rather than an int because
open_symbol_file_object() is called via catch_errors() and
catch_errors() requires a pointer argument. */
/* Implement the "open_symbol_file_object" target_so_ops method. */
static int
open_symbol_file_object (void *from_ttyp)
@@ -413,24 +383,7 @@ lm_base (void)
}
/* LOCAL FUNCTION
frv_current_sos -- build a list of currently loaded shared objects
SYNOPSIS
struct so_list *frv_current_sos ()
DESCRIPTION
Build a list of `struct so_list' objects describing the shared
objects currently loaded in the inferior. This list does not
include an entry for the main executable file.
Note that we only gather information directly available from the
inferior --- we don't examine any of the shared library files
themselves. The declaration of `struct so_list' says which fields
we provide values for. */
/* Implement the "current_sos" target_so_ops method. */
static struct so_list *
frv_current_sos (void)
@@ -601,17 +554,7 @@ enable_break_failure_warning (void)
"and track explicitly loaded dynamic code."));
}
/*
LOCAL FUNCTION
enable_break -- arrange for dynamic linker to hit breakpoint
SYNOPSIS
int enable_break (void)
DESCRIPTION
/* Arrange for dynamic linker to hit breakpoint.
The dynamic linkers has, as part of its debugger interface, support
for arranging for the inferior to hit a breakpoint after mapping in
@@ -631,9 +574,7 @@ enable_break_failure_warning (void)
using the interpreter's loadmap. Once the relocated address
is known, we fetch the value (address) corresponding to r_brk
and then use that value to fetch the entry point of the function
we're interested in.
*/
we're interested in. */
static int enable_break2_done = 0;
@@ -884,28 +825,12 @@ enable_break (void)
return 1;
}
/*
LOCAL FUNCTION
special_symbol_handling -- additional shared library symbol handling
SYNOPSIS
void special_symbol_handling ()
DESCRIPTION
Once the symbols from a shared object have been loaded in the usual
way, we are called to do any system specific symbol handling that
is needed.
*/
/* Implement the "special_symbol_handling" target_so_ops method. */
static void
frv_special_symbol_handling (void)
{
/* Nothing needed (yet) for FRV. */
/* Nothing needed for FRV. */
}
static void
@@ -983,27 +908,11 @@ frv_relocate_main_executable (void)
main_executable_lm_info->got_value = main_got ();
}
/*
/* Implement the "create_inferior_hook" target_solib_ops method.
GLOBAL FUNCTION
frv_solib_create_inferior_hook -- shared library startup support
SYNOPSIS
void frv_solib_create_inferior_hook ()
DESCRIPTION
When gdb starts up the inferior, it nurses it along (through the
shell) until it is ready to execute it's first instruction. At this
point, this function gets called via expansion of the macro
SOLIB_CREATE_INFERIOR_HOOK.
For the FR-V shared library ABI (FDPIC), the main executable
needs to be relocated. The shared library breakpoints also need
to be enabled.
*/
For the FR-V shared library ABI (FDPIC), the main executable needs
to be relocated. The shared library breakpoints also need to be
enabled. */
static void
frv_solib_create_inferior_hook (int from_tty)