GDB (xrefs)
|
#include "defs.h"
#include "gdb_string.h"
#include "inferior.h"
#include "gdbcore.h"
#include "solib.h"
#include "solist.h"
#include "frv-tdep.h"
#include "objfiles.h"
#include "symtab.h"
#include "language.h"
#include "command.h"
#include "gdbcmd.h"
#include "elf/frv.h"
#include "exceptions.h"
#include "gdb_bfd.h"
Go to the source code of this file.
typedef gdb_byte ext_Elf32_Addr[4] |
Definition at line 48 of file solib-frv.c.
typedef gdb_byte ext_Elf32_Half[2] |
Definition at line 47 of file solib-frv.c.
typedef gdb_byte ext_Elf32_Word[4] |
Definition at line 49 of file solib-frv.c.
Definition at line 183 of file solib-frv.c.
anonymous enum |
Definition at line 40 of file solib-frv.c.
void _initialize_frv_solib | ( | void | ) |
Definition at line 1174 of file solib-frv.c.
References _, add_setshow_zuinteger_cmd(), target_so_ops::bfd_open, class_maintenance, target_so_ops::clear_solib, target_so_ops::current_sos, target_so_ops::free_so, frv_clear_solib(), frv_current_sos(), frv_free_so(), frv_in_dynsym_resolve_code(), frv_relocate_section_addresses(), frv_so_ops, frv_solib_create_inferior_hook(), frv_special_symbol_handling(), target_so_ops::in_dynsym_resolve_code, target_so_ops::open_symbol_file_object, open_symbol_file_object(), target_so_ops::relocate_section_addresses, setdebuglist, showdebuglist, solib_bfd_open(), target_so_ops::solib_create_inferior_hook, solib_frv_debug, and target_so_ops::special_symbol_handling.
Definition at line 489 of file solib-frv.c.
Referenced by enable_break2().
static CORE_ADDR displacement_from_map | ( | struct int_elf32_fdpic_loadmap * | map, |
CORE_ADDR | addr | ||
) | [static] |
Definition at line 458 of file solib-frv.c.
References int_elf32_fdpic_loadseg::addr, int_elf32_fdpic_loadmap::nsegs, int_elf32_fdpic_loadseg::p_memsz, int_elf32_fdpic_loadseg::p_vaddr, and int_elf32_fdpic_loadmap::segs.
Referenced by enable_break2(), and find_canonical_descriptor_in_load_object().
static int enable_break | ( | void | ) | [static] |
Definition at line 721 of file solib-frv.c.
References create_solib_event_breakpoint(), exec_bfd, fprintf_unfiltered(), gdb_stdlog, hex_string_custom(), solib_frv_debug, symfile_objfile, and target_gdbarch().
Referenced by frv_solib_create_inferior_hook().
static int enable_break2 | ( | void | ) | [static] |
Definition at line 519 of file solib-frv.c.
References _, cmp_name(), create_solib_event_breakpoint(), displacement_from_map(), enable_break2_done, enable_break_failure_warning(), exec_bfd, extract_unsigned_integer(), fetch_loadmap(), fprintf_unfiltered(), frv_fdpic_loadmap_addresses(), FRV_PTR_SIZE, gdb_bfd_lookup_symbol(), gdb_bfd_unref(), gdb_stdlog, gdbarch_byte_order(), hex_string_custom(), interp_plt_sect_high, interp_plt_sect_low, interp_text_sect_high, interp_text_sect_low, remove_solib_event_breakpoints(), RETURN_MASK_ALL, solib_bfd_open(), solib_frv_debug, exsummary::status, target_gdbarch(), target_read_memory(), TRY_CATCH, warning(), and xfree().
Referenced by frv_current_sos().
static void enable_break_failure_warning | ( | void | ) | [static] |
Definition at line 479 of file solib-frv.c.
Referenced by enable_break2().
static struct int_elf32_fdpic_loadmap* fetch_loadmap | ( | CORE_ADDR | ldmaddr | ) | [static, read] |
Definition at line 99 of file solib-frv.c.
References ext_elf32_fdpic_loadseg::addr, int_elf32_fdpic_loadseg::addr, extract_unsigned_integer(), gdbarch_byte_order(), memcpy(), int_elf32_fdpic_loadmap::nsegs, ext_elf32_fdpic_loadseg::p_memsz, int_elf32_fdpic_loadseg::p_memsz, ext_elf32_fdpic_loadseg::p_vaddr, int_elf32_fdpic_loadseg::p_vaddr, ext_elf32_fdpic_loadmap::segs, int_elf32_fdpic_loadmap::segs, target_gdbarch(), target_read_memory(), version, int_elf32_fdpic_loadmap::version, xfree(), and xmalloc().
Referenced by enable_break2(), frv_current_sos(), and frv_relocate_main_executable().
static CORE_ADDR find_canonical_descriptor_in_load_object | ( | CORE_ADDR | entry_point, |
CORE_ADDR | got_value, | ||
const char * | name, | ||
bfd * | abfd, | ||
struct lm_info * | lm | ||
) | [static] |
Definition at line 1021 of file solib-frv.c.
References displacement_from_map(), lm_info::dyn_reloc_count, lm_info::dyn_relocs, lm_info::dyn_syms, extract_unsigned_integer(), FRV_PTR_SIZE, gdbarch_byte_order(), lm_info::map, target_gdbarch(), target_read_memory(), and xmalloc().
Referenced by frv_fdpic_find_canonical_descriptor().
static void frv_clear_solib | ( | void | ) | [static] |
Definition at line 870 of file solib-frv.c.
References lm_info::dyn_relocs, lm_info::dyn_syms, enable_break2_done, lm_base_cache, main_lm_addr, lm_info::map, and xfree().
Referenced by _initialize_frv_solib().
static struct so_list* frv_current_sos | ( | void | ) | [static, read] |
Definition at line 318 of file solib-frv.c.
References _, core_bfd, enable_break2(), extract_unsigned_integer(), fetch_loadmap(), fprintf_unfiltered(), frv_relocate_main_executable(), gdb_stdlog, gdbarch_byte_order(), lm_info::got_value, hex_string_custom(), lm_info::lm_addr, lm_addr(), lm_base(), so_list::lm_info, main_got(), main_lm_addr, lm_info::map, so_list::next, safe_strerror(), so_list::so_name, SO_NAME_MAX_PATH_SIZE, so_list::so_original_name, solib_frv_debug, target_gdbarch(), target_read_memory(), target_read_string(), warning(), xcalloc(), and xfree().
Referenced by _initialize_frv_solib().
CORE_ADDR frv_fdpic_find_canonical_descriptor | ( | CORE_ADDR | entry_point | ) |
Definition at line 972 of file solib-frv.c.
References so_list::abfd, find_canonical_descriptor_in_load_object(), find_pc_function(), frv_fdpic_find_global_pointer(), so_list::lm_info, master_so_list(), name, so_list::next, SYMBOL_LINKAGE_NAME, and symfile_objfile.
Referenced by find_func_descr().
Definition at line 936 of file solib-frv.c.
References int_elf32_fdpic_loadseg::addr, lm_info::got_value, so_list::lm_info, main_got(), lm_info::map, master_so_list(), so_list::next, int_elf32_fdpic_loadmap::nsegs, int_elf32_fdpic_loadseg::p_memsz, and int_elf32_fdpic_loadmap::segs.
Referenced by find_func_descr(), frv_convert_from_func_ptr_addr(), frv_fdpic_find_canonical_descriptor(), and frv_push_dummy_call().
CORE_ADDR frv_fetch_objfile_link_map | ( | struct objfile * | objfile | ) |
Definition at line 1144 of file solib-frv.c.
References lm_info::lm_addr, so_list::lm_info, main_lm_addr, master_so_list(), so_list::next, so_list::objfile, solib_add(), and symfile_objfile.
Referenced by frv_gdbarch_init().
static void frv_free_so | ( | struct so_list * | so | ) | [static] |
Definition at line 886 of file solib-frv.c.
References lm_info::dyn_relocs, lm_info::dyn_syms, so_list::lm_info, lm_info::map, and xfree().
Referenced by _initialize_frv_solib().
static int frv_in_dynsym_resolve_code | ( | CORE_ADDR | pc | ) | [static] |
Definition at line 447 of file solib-frv.c.
References in_plt_section(), interp_plt_sect_high, interp_plt_sect_low, interp_text_sect_high, and interp_text_sect_low.
Referenced by _initialize_frv_solib().
static void frv_relocate_main_executable | ( | void | ) | [static] |
Definition at line 775 of file solib-frv.c.
References _, int_elf32_fdpic_loadseg::addr, ALL_OBJFILE_OSECTIONS, ANOFFSET, do_cleanups(), error(), fetch_loadmap(), frv_fdpic_loadmap_addresses(), lm_info::got_value, main_got(), make_cleanup(), lm_info::map, int_elf32_fdpic_loadmap::nsegs, obj_section_addr, objfile_relocate(), offset, section_offsets::offsets, int_elf32_fdpic_loadseg::p_memsz, int_elf32_fdpic_loadseg::p_vaddr, int_elf32_fdpic_loadmap::segs, exsummary::status, symfile_objfile, target_gdbarch(), xcalloc(), and xfree().
Referenced by frv_current_sos(), and frv_solib_create_inferior_hook().
static void frv_relocate_section_addresses | ( | struct so_list * | so, |
struct target_section * | sec | ||
) | [static] |
Definition at line 895 of file solib-frv.c.
References int_elf32_fdpic_loadseg::addr, target_section::addr, target_section::endaddr, so_list::lm_info, lm_info::map, int_elf32_fdpic_loadmap::nsegs, int_elf32_fdpic_loadseg::p_memsz, int_elf32_fdpic_loadseg::p_vaddr, and int_elf32_fdpic_loadmap::segs.
Referenced by _initialize_frv_solib().
static void frv_solib_create_inferior_hook | ( | int | from_tty | ) | [static] |
Definition at line 856 of file solib-frv.c.
References _, enable_break(), frv_relocate_main_executable(), and warning().
Referenced by _initialize_frv_solib().
static void frv_special_symbol_handling | ( | void | ) | [static] |
Definition at line 769 of file solib-frv.c.
Referenced by _initialize_frv_solib().
Definition at line 266 of file solib-frv.c.
References extract_unsigned_integer(), fprintf_unfiltered(), FRV_PTR_SIZE, gdb_stdlog, gdbarch_byte_order(), hex_string_custom(), lm_base_cache, lookup_minimal_symbol(), solib_frv_debug, SYMBOL_VALUE_ADDRESS, symfile_objfile, target_gdbarch(), and target_read_memory().
Referenced by frv_current_sos().
Definition at line 921 of file solib-frv.c.
References lookup_minimal_symbol(), SYMBOL_VALUE_ADDRESS, and symfile_objfile.
Referenced by frv_current_sos(), frv_fdpic_find_global_pointer(), and frv_relocate_main_executable().
static int open_symbol_file_object | ( | void * | from_ttyp | ) | [static] |
Definition at line 245 of file solib-frv.c.
Referenced by _initialize_frv_solib().
Referenced by initialize_all_files().
int enable_break2_done = 0 [static] |
Definition at line 516 of file solib-frv.c.
Referenced by enable_break2(), and frv_clear_solib().
struct target_so_ops frv_so_ops |
Definition at line 1168 of file solib-frv.c.
Referenced by _initialize_frv_solib(), and frv_gdbarch_init().
CORE_ADDR interp_plt_sect_high [static] |
Definition at line 444 of file solib-frv.c.
Referenced by dsbt_in_dynsym_resolve_code(), enable_break2(), frv_in_dynsym_resolve_code(), and svr4_in_dynsym_resolve_code().
CORE_ADDR interp_plt_sect_low [static] |
Definition at line 443 of file solib-frv.c.
Referenced by enable_break2(), and frv_in_dynsym_resolve_code().
CORE_ADDR interp_text_sect_high [static] |
Definition at line 442 of file solib-frv.c.
Referenced by dsbt_in_dynsym_resolve_code(), enable_break2(), frv_in_dynsym_resolve_code(), and svr4_in_dynsym_resolve_code().
CORE_ADDR interp_text_sect_low [static] |
Definition at line 441 of file solib-frv.c.
Referenced by enable_break2(), and frv_in_dynsym_resolve_code().
CORE_ADDR lm_base_cache = 0 [static] |
Definition at line 252 of file solib-frv.c.
Referenced by frv_clear_solib(), and lm_base().
struct lm_info* main_executable_lm_info [static] |
Definition at line 236 of file solib-frv.c.
CORE_ADDR main_lm_addr = 0 [static] |
Definition at line 255 of file solib-frv.c.
Referenced by frv_clear_solib(), frv_current_sos(), and frv_fetch_objfile_link_map().
unsigned int solib_frv_debug [static] |
Definition at line 37 of file solib-frv.c.
Referenced by _initialize_frv_solib(), enable_break(), enable_break2(), frv_current_sos(), and lm_base().