GDB (xrefs)
|
#include "defs.h"
#include "gdb_string.h"
#include "inferior.h"
#include "gdbcore.h"
#include "solib.h"
#include "solist.h"
#include "objfiles.h"
#include "symtab.h"
#include "language.h"
#include "command.h"
#include "gdbcmd.h"
#include "elf-bfd.h"
#include "exceptions.h"
#include "gdb_bfd.h"
Go to the source code of this file.
#define GOT_MODULE_OFFSET 4 |
Definition at line 35 of file solib-dsbt.c.
Referenced by lm_base().
typedef gdb_byte ext_Elf32_Addr[4] |
Definition at line 49 of file solib-dsbt.c.
typedef gdb_byte ext_Elf32_Half[2] |
Definition at line 48 of file solib-dsbt.c.
typedef gdb_byte ext_Elf32_Word[4] |
Definition at line 50 of file solib-dsbt.c.
Definition at line 105 of file solib-dsbt.c.
anonymous enum |
Definition at line 41 of file solib-dsbt.c.
void _initialize_dsbt_solib | ( | void | ) |
Definition at line 1070 of file solib-dsbt.c.
References _, _initialize_dsbt_solib, add_setshow_zuinteger_cmd(), target_so_ops::bfd_open, class_maintenance, target_so_ops::clear_solib, target_so_ops::current_sos, dsbt_clear_solib(), dsbt_current_sos(), dsbt_free_so(), dsbt_in_dynsym_resolve_code(), dsbt_pspace_data_cleanup(), dsbt_relocate_section_addresses(), dsbt_so_ops, dsbt_solib_create_inferior_hook(), dsbt_special_symbol_handling(), target_so_ops::free_so, 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, show_dsbt_debug(), showdebuglist, solib_bfd_open(), target_so_ops::solib_create_inferior_hook, solib_dsbt_debug, solib_dsbt_pspace_data, and target_so_ops::special_symbol_handling.
Definition at line 784 of file solib-dsbt.c.
Referenced by enable_break().
static struct int_elf32_dsbt_loadmap* decode_loadmap | ( | gdb_byte * | buf | ) | [static, read] |
Definition at line 226 of file solib-dsbt.c.
References ext_elf32_dsbt_loadseg::addr, int_elf32_dsbt_loadseg::addr, extract_unsigned_integer(), gdbarch_byte_order(), ext_elf32_dsbt_loadmap::nsegs, int_elf32_dsbt_loadmap::nsegs, ext_elf32_dsbt_loadseg::p_memsz, int_elf32_dsbt_loadseg::p_memsz, ext_elf32_dsbt_loadseg::p_vaddr, int_elf32_dsbt_loadseg::p_vaddr, ext_elf32_dsbt_loadmap::segs, int_elf32_dsbt_loadmap::segs, target_gdbarch(), version, ext_elf32_dsbt_loadmap::version, int_elf32_dsbt_loadmap::version, xfree(), and xmalloc().
Referenced by dsbt_get_initial_loadmaps().
static CORE_ADDR displacement_from_map | ( | struct int_elf32_dsbt_loadmap * | map, |
CORE_ADDR | addr | ||
) | [static] |
Definition at line 528 of file solib-dsbt.c.
References int_elf32_dsbt_loadseg::addr, int_elf32_dsbt_loadmap::nsegs, int_elf32_dsbt_loadseg::p_memsz, int_elf32_dsbt_loadseg::p_vaddr, and int_elf32_dsbt_loadmap::segs.
Referenced by enable_break(), and lm_base().
static void dsbt_clear_solib | ( | void | ) | [static] |
Definition at line 1014 of file solib-dsbt.c.
References get_dsbt_info(), dsbt_info::lm_base_cache, dsbt_info::main_executable_lm_info, dsbt_info::main_lm_addr, lm_info::map, and xfree().
Referenced by _initialize_dsbt_solib().
static struct so_list* dsbt_current_sos | ( | void | ) | [static, read] |
Definition at line 633 of file solib-dsbt.c.
References _, core_bfd, dsbt_relocate_main_executable(), extract_unsigned_integer(), fetch_loadmap(), fprintf_unfiltered(), gdb_stdlog, gdbarch_byte_order(), get_dsbt_info(), hex_string_custom(), lm_addr(), lm_base(), so_list::lm_info, dsbt_info::main_executable_lm_info, dsbt_info::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_dsbt_debug, target_gdbarch(), target_read_memory(), target_read_string(), warning(), xcalloc(), and xfree().
Referenced by _initialize_dsbt_solib().
static void dsbt_free_so | ( | struct so_list * | so | ) | [static] |
Definition at line 1029 of file solib-dsbt.c.
References so_list::lm_info, lm_info::map, and xfree().
Referenced by _initialize_dsbt_solib().
static void dsbt_get_initial_loadmaps | ( | void | ) | [static] |
Definition at line 292 of file solib-dsbt.c.
References _, current_target, decode_loadmap(), dsbt_print_loadmap(), error(), dsbt_info::exec_loadmap, get_dsbt_info(), dsbt_info::interp_loadmap, solib_dsbt_debug, TARGET_OBJECT_FDPIC, and target_read_alloc().
Referenced by dsbt_relocate_main_executable(), enable_break(), and lm_base().
static int dsbt_in_dynsym_resolve_code | ( | CORE_ADDR | pc | ) | [static] |
Definition at line 761 of file solib-dsbt.c.
References get_dsbt_info(), in_plt_section(), interp_plt_sect_high, dsbt_info::interp_plt_sect_low, interp_text_sect_high, and dsbt_info::interp_text_sect_low.
Referenced by _initialize_dsbt_solib().
static void dsbt_print_loadmap | ( | struct int_elf32_dsbt_loadmap * | map | ) | [static] |
Definition at line 198 of file solib-dsbt.c.
References _, int_elf32_dsbt_loadseg::addr, int_elf32_dsbt_loadmap::nsegs, int_elf32_dsbt_loadseg::p_memsz, int_elf32_dsbt_loadseg::p_vaddr, print_core_address(), printf_filtered(), int_elf32_dsbt_loadmap::segs, target_gdbarch(), and int_elf32_dsbt_loadmap::version.
Referenced by dsbt_get_initial_loadmaps().
static void dsbt_pspace_data_cleanup | ( | struct program_space * | pspace, |
void * | arg | ||
) | [static] |
Definition at line 167 of file solib-dsbt.c.
References solib_dsbt_pspace_data, and xfree().
Referenced by _initialize_dsbt_solib().
static void dsbt_relocate_main_executable | ( | void | ) | [static] |
Definition at line 932 of file solib-dsbt.c.
References int_elf32_dsbt_loadseg::addr, ALL_OBJFILE_OSECTIONS, ANOFFSET, do_cleanups(), dsbt_get_initial_loadmaps(), dsbt_info::exec_loadmap, get_dsbt_info(), dsbt_info::main_executable_lm_info, make_cleanup(), lm_info::map, int_elf32_dsbt_loadmap::nsegs, obj_section_addr, objfile_relocate(), offset, section_offsets::offsets, int_elf32_dsbt_loadseg::p_memsz, int_elf32_dsbt_loadseg::p_vaddr, int_elf32_dsbt_loadmap::segs, symfile_objfile, xcalloc(), and xfree().
Referenced by dsbt_current_sos(), and dsbt_solib_create_inferior_hook().
static void dsbt_relocate_section_addresses | ( | struct so_list * | so, |
struct target_section * | sec | ||
) | [static] |
Definition at line 1036 of file solib-dsbt.c.
References int_elf32_dsbt_loadseg::addr, target_section::addr, target_section::endaddr, so_list::lm_info, lm_info::map, int_elf32_dsbt_loadmap::nsegs, int_elf32_dsbt_loadseg::p_memsz, int_elf32_dsbt_loadseg::p_vaddr, and int_elf32_dsbt_loadmap::segs.
Referenced by _initialize_dsbt_solib().
static void dsbt_solib_create_inferior_hook | ( | int | from_tty | ) | [static] |
Definition at line 1000 of file solib-dsbt.c.
References _, dsbt_relocate_main_executable(), enable_break(), and warning().
Referenced by _initialize_dsbt_solib().
static void dsbt_special_symbol_handling | ( | void | ) | [static] |
Definition at line 927 of file solib-dsbt.c.
Referenced by _initialize_dsbt_solib().
static int enable_break | ( | void | ) | [static] |
Definition at line 798 of file solib-dsbt.c.
References cmp_name(), create_solib_event_breakpoint(), displacement_from_map(), dsbt_get_initial_loadmaps(), enable_break_failure_warning(), exec_bfd, fprintf_unfiltered(), gdb_bfd_lookup_symbol(), gdb_bfd_unref(), gdb_stdlog, gdbarch_byte_order(), get_dsbt_info(), hex_string_custom(), dsbt_info::interp_loadmap, dsbt_info::interp_plt_sect_high, dsbt_info::interp_plt_sect_low, dsbt_info::interp_text_sect_high, dsbt_info::interp_text_sect_low, RETURN_MASK_ALL, solib_bfd_open(), solib_dsbt_debug, target_gdbarch(), target_has_execution, TIC6X_PTR_SIZE, TRY_CATCH, and xfree().
Referenced by dsbt_solib_create_inferior_hook().
static void enable_break_failure_warning | ( | void | ) | [static] |
Definition at line 774 of file solib-dsbt.c.
Referenced by enable_break().
static struct int_elf32_dsbt_loadmap* fetch_loadmap | ( | CORE_ADDR | ldmaddr | ) | [static, read] |
Definition at line 325 of file solib-dsbt.c.
References ext_elf32_dsbt_loadseg::addr, int_elf32_dsbt_loadseg::addr, extract_unsigned_integer(), gdbarch_byte_order(), memcpy(), int_elf32_dsbt_loadmap::nsegs, ext_elf32_dsbt_loadseg::p_memsz, int_elf32_dsbt_loadseg::p_memsz, ext_elf32_dsbt_loadseg::p_vaddr, int_elf32_dsbt_loadseg::p_vaddr, ext_elf32_dsbt_loadmap::segs, int_elf32_dsbt_loadmap::segs, target_gdbarch(), target_read_memory(), version, int_elf32_dsbt_loadmap::version, xfree(), and xmalloc().
Referenced by dsbt_current_sos().
static struct dsbt_info * get_dsbt_info | ( | void | ) | [static, read] |
Definition at line 179 of file solib-dsbt.c.
References current_program_space, dsbt_info::lm_base_cache, dsbt_info::main_lm_addr, solib_dsbt_pspace_data, and XZALLOC.
Referenced by dsbt_clear_solib(), dsbt_current_sos(), dsbt_get_initial_loadmaps(), dsbt_in_dynsym_resolve_code(), dsbt_relocate_main_executable(), enable_break(), and lm_base().
Definition at line 553 of file solib-dsbt.c.
References displacement_from_map(), dsbt_get_initial_loadmaps(), exec_bfd, dsbt_info::exec_loadmap, extract_unsigned_integer(), fprintf_unfiltered(), gdb_stdlog, gdbarch_byte_order(), get_dsbt_info(), GOT_MODULE_OFFSET, hex_string_custom(), dsbt_info::lm_base_cache, lookup_minimal_symbol(), dsbt_info::main_executable_lm_info, scan_dyntag(), solib_dsbt_debug, SYMBOL_VALUE_ADDRESS, symfile_objfile, target_gdbarch(), target_read_memory(), and TIC6X_PTR_SIZE.
Referenced by dsbt_current_sos().
static int open_symbol_file_object | ( | void * | from_ttyp | ) | [static] |
Definition at line 518 of file solib-dsbt.c.
Referenced by _initialize_dsbt_solib().
static int scan_dyntag | ( | int | dyntag, |
bfd * | abfd, | ||
CORE_ADDR * | ptr | ||
) | [static] |
Definition at line 414 of file solib-dsbt.c.
References target_section::addr, builtin_type::builtin_data_ptr, builtin_type(), current_target_sections, extract_typed_address(), sections_end, target_gdbarch(), target_read_memory(), and target_section::the_bfd_section.
Referenced by lm_base().
static void show_dsbt_debug | ( | struct ui_file * | file, |
int | from_tty, | ||
struct cmd_list_element * | c, | ||
const char * | value | ||
) | [static] |
Definition at line 1058 of file solib-dsbt.c.
References _, and fprintf_filtered().
Referenced by _initialize_dsbt_solib().
Referenced by _initialize_dsbt_solib(), and initialize_all_files().
struct target_so_ops dsbt_so_ops |
Definition at line 1064 of file solib-dsbt.c.
Referenced by _initialize_dsbt_solib(), and tic6x_uclinux_init_abi().
unsigned int solib_dsbt_debug = 0 [static] |
Definition at line 38 of file solib-dsbt.c.
Referenced by _initialize_dsbt_solib(), dsbt_current_sos(), dsbt_get_initial_loadmaps(), enable_break(), and lm_base().
struct program_space_data* solib_dsbt_pspace_data [static] |
Definition at line 164 of file solib-dsbt.c.
Referenced by _initialize_dsbt_solib(), dsbt_pspace_data_cleanup(), and get_dsbt_info().