GDB (xrefs)
Classes | Defines | Functions
/home/stan/gdb/src/gdb/objfiles.h File Reference
#include "gdb_obstack.h"
#include "symfile.h"
#include "progspace.h"
#include "registry.h"
#include "gdb_bfd.h"

Go to the source code of this file.

Classes

struct  entry_info
struct  obj_section
struct  objstats
struct  objfile_per_bfd_storage
struct  objfile

Defines

#define obj_section_offset(s)   (((s)->objfile->section_offsets)->offsets[gdb_bfd_section_index ((s)->objfile->obfd, (s)->the_bfd_section)])
#define obj_section_addr(s)
#define obj_section_endaddr(s)
#define OBJSTAT(objfile, expr)   (objfile -> stats.expr)
#define OBJSTATS   struct objstats stats
#define MINIMAL_SYMBOL_HASH_SIZE   2039
#define OBJF_REORDERED   (1 << 0) /* Functions are reordered */
#define OBJF_SHARED   (1 << 1) /* From a shared library */
#define OBJF_READNOW   (1 << 2) /* Immediate full read */
#define OBJF_USERLOADED   (1 << 3) /* User loaded */
#define OBJF_PSYMTABS_READ   (1 << 4)
#define OBJF_MAINLINE   (1 << 5)
#define OBJF_NOT_FILENAME   (1 << 6)
#define ALL_PSPACE_OBJFILES(ss, obj)   for ((obj) = ss->objfiles; (obj) != NULL; (obj) = (obj)->next)
#define ALL_PSPACE_OBJFILES_SAFE(ss, obj, nxt)
#define ALL_OBJFILES(obj)
#define ALL_OBJFILES_SAFE(obj, nxt)
#define ALL_OBJFILE_SYMTABS(objfile, s)   for ((s) = (objfile) -> symtabs; (s) != NULL; (s) = (s) -> next)
#define ALL_OBJFILE_PRIMARY_SYMTABS(objfile, s)
#define ALL_OBJFILE_MSYMBOLS(objfile, m)   for ((m) = (objfile) -> msymbols; SYMBOL_LINKAGE_NAME(m) != NULL; (m)++)
#define ALL_SYMTABS(objfile, s)
#define ALL_PSPACE_SYMTABS(ss, objfile, s)
#define ALL_PRIMARY_SYMTABS(objfile, s)
#define ALL_PSPACE_PRIMARY_SYMTABS(pspace, objfile, s)
#define ALL_MSYMBOLS(objfile, m)
#define ALL_OBJFILE_OSECTIONS(objfile, osect)
#define ALL_OBJSECTIONS(objfile, osect)
#define SECT_OFF_DATA(objfile)
#define SECT_OFF_RODATA(objfile)
#define SECT_OFF_TEXT(objfile)
#define SECT_OFF_BSS(objfile)   (objfile)->sect_index_bss
#define MULTI_OBJFILE_P()   (object_files && object_files->next)

Functions

void print_objfile_statistics (void)
void print_symbol_bcache_statistics (void)
struct objfileallocate_objfile (bfd *, const char *name, int)
struct gdbarchget_objfile_arch (struct objfile *)
int entry_point_address_query (CORE_ADDR *entry_p)
CORE_ADDR entry_point_address (void)
void build_objfile_section_table (struct objfile *)
void terminate_minimal_symbol_table (struct objfile *objfile)
struct objfileobjfile_separate_debug_iterate (const struct objfile *, const struct objfile *)
void put_objfile_before (struct objfile *, struct objfile *)
void objfile_to_front (struct objfile *)
void add_separate_debug_objfile (struct objfile *, struct objfile *)
void unlink_objfile (struct objfile *)
void free_objfile (struct objfile *)
void free_objfile_separate_debug (struct objfile *)
struct cleanupmake_cleanup_free_objfile (struct objfile *)
void free_all_objfiles (void)
void objfile_relocate (struct objfile *, const struct section_offsets *)
void objfile_rebase (struct objfile *, CORE_ADDR)
int objfile_has_partial_symbols (struct objfile *objfile)
int objfile_has_full_symbols (struct objfile *objfile)
int objfile_has_symbols (struct objfile *objfile)
int have_partial_symbols (void)
int have_full_symbols (void)
void objfile_set_sym_fns (struct objfile *objfile, const struct sym_fns *sf)
void objfiles_changed (void)
void objfile_purge_solibs (void)
int have_minimal_symbols (void)
struct obj_sectionfind_pc_section (CORE_ADDR pc)
int pc_in_section (CORE_ADDR, char *)
static int in_plt_section (CORE_ADDR pc)
 DECLARE_REGISTRY (objfile)
void inhibit_section_map_updates (struct program_space *pspace)
void resume_section_map_updates (struct program_space *pspace)
void resume_section_map_updates_cleanup (void *arg)
void default_iterate_over_objfiles_in_search_order (struct gdbarch *gdbarch, iterate_over_objfiles_in_search_order_cb_ftype *cb, void *cb_data, struct objfile *current_objfile)
void set_objfile_per_bfd (struct objfile *obj)
const char * objfile_name (const struct objfile *objfile)

Define Documentation

#define ALL_MSYMBOLS (   objfile,
 
)
#define ALL_OBJFILE_MSYMBOLS (   objfile,
 
)    for ((m) = (objfile) -> msymbols; SYMBOL_LINKAGE_NAME(m) != NULL; (m)++)
#define ALL_OBJFILE_OSECTIONS (   objfile,
  osect 
)
#define ALL_OBJFILE_PRIMARY_SYMTABS (   objfile,
 
)
#define ALL_OBJFILE_SYMTABS (   objfile,
 
)    for ((s) = (objfile) -> symtabs; (s) != NULL; (s) = (s) -> next)
#define ALL_OBJFILES (   obj)
#define ALL_OBJFILES_SAFE (   obj,
  nxt 
)
Value:
for ((obj) = current_program_space->objfiles;   \
       (obj) != NULL? ((nxt)=(obj)->next,1) :0; \
       (obj) = (nxt))

Definition at line 558 of file objfiles.h.

Referenced by free_all_objfiles(), jit_inferior_exit_hook(), and objfile_purge_solibs().

#define ALL_OBJSECTIONS (   objfile,
  osect 
)
Value:
for ((objfile) = current_program_space->objfiles,                       \
         (objfile) != NULL ? ((osect) = (objfile)->sections_end) : 0;   \
       (objfile) != NULL                                                \
         && (osect) == (objfile)->sections_end;                         \
       ((osect) == (objfile)->sections_end                              \
        ? ((objfile) = (objfile)->next,                                 \
           (objfile) != NULL ? (osect) = (objfile)->sections_end : 0)   \
        : 0))                                                           \
    ALL_OBJFILE_OSECTIONS (objfile, osect)

Definition at line 642 of file objfiles.h.

Referenced by find_pc_mapped_section(), find_pc_overlay(), gcore_create_callback(), list_overlays_command(), maintenance_translate_address(), map_overlay_command(), objfile_find_memory_regions(), overlay_invalidate_all(), simple_overlay_update(), spu_overlay_update(), sym_info(), and unmap_overlay_command().

#define ALL_PRIMARY_SYMTABS (   objfile,
 
)
Value:
ALL_OBJFILES (objfile)          \
    ALL_OBJFILE_PRIMARY_SYMTABS (objfile, s)

Definition at line 594 of file objfiles.h.

Referenced by find_pc_sect_symtab(), make_symbol_overload_list_qualified(), and search_symbols().

#define ALL_PSPACE_OBJFILES (   ss,
  obj 
)    for ((obj) = ss->objfiles; (obj) != NULL; (obj) = (obj)->next)
#define ALL_PSPACE_OBJFILES_SAFE (   ss,
  obj,
  nxt 
)
Value:
for ((obj) = ss->objfiles;                      \
       (obj) != NULL? ((nxt)=(obj)->next,1) :0; \
       (obj) = (nxt))

Definition at line 548 of file objfiles.h.

#define ALL_PSPACE_PRIMARY_SYMTABS (   pspace,
  objfile,
 
)
Value:
ALL_PSPACE_OBJFILES (ss, objfile)                       \
    ALL_OBJFILE_PRIMARY_SYMTABS (objfile, s)

Definition at line 598 of file objfiles.h.

#define ALL_PSPACE_SYMTABS (   ss,
  objfile,
 
)
Value:
ALL_PSPACE_OBJFILES (ss, objfile)                       \
    ALL_OBJFILE_SYMTABS (objfile, s)

Definition at line 586 of file objfiles.h.

#define ALL_SYMTABS (   objfile,
 
)
#define MINIMAL_SYMBOL_HASH_SIZE   2039
#define MULTI_OBJFILE_P ( )    (object_files && object_files->next)

Definition at line 678 of file objfiles.h.

Referenced by maintenance_translate_address(), and sym_info().

#define obj_section_addr (   s)
#define obj_section_endaddr (   s)
#define obj_section_offset (   s)    (((s)->objfile->section_offsets)->offsets[gdb_bfd_section_index ((s)->objfile->obfd, (s)->the_bfd_section)])

Definition at line 126 of file objfiles.h.

Referenced by arm_exidx_new_objfile(), macho_symfile_offsets(), and pc_in_unmapped_range().

#define OBJF_MAINLINE   (1 << 5)

Definition at line 430 of file objfiles.h.

Referenced by symbol_file_add_with_addrs(), and thread_db_new_objfile().

#define OBJF_NOT_FILENAME   (1 << 6)
#define OBJF_PSYMTABS_READ   (1 << 4)
#define OBJF_READNOW   (1 << 2) /* Immediate full read */
#define OBJF_REORDERED   (1 << 0) /* Functions are reordered */
#define OBJF_SHARED   (1 << 1) /* From a shared library */
#define OBJF_USERLOADED   (1 << 3) /* User loaded */
#define OBJSTAT (   objfile,
  expr 
)    (objfile -> stats.expr)
#define OBJSTATS   struct objstats stats

Definition at line 157 of file objfiles.h.

#define SECT_OFF_BSS (   objfile)    (objfile)->sect_index_bss
#define SECT_OFF_DATA (   objfile)
#define SECT_OFF_RODATA (   objfile)
Value:
((objfile->sect_index_rodata == -1) \
      ? (internal_error (__FILE__, __LINE__, \
                         _("sect_index_rodata not initialized")), -1)   \
      : objfile->sect_index_rodata)

Definition at line 659 of file objfiles.h.

Referenced by elf_symtab_read(), process_one_symbol(), and read_dbx_symtab().

#define SECT_OFF_TEXT (   objfile)

Function Documentation

void add_separate_debug_objfile ( struct objfile ,
struct objfile  
)
struct objfile* allocate_objfile ( bfd *  ,
const char *  name,
int   
) [read]
void build_objfile_section_table ( struct objfile )
void default_iterate_over_objfiles_in_search_order ( struct gdbarch gdbarch,
iterate_over_objfiles_in_search_order_cb_ftype cb,
void *  cb_data,
struct objfile current_objfile 
)

Definition at line 1481 of file objfiles.c.

References ALL_OBJFILES.

Referenced by gdbarch_alloc().

Definition at line 358 of file objfiles.c.

References symfile_objfile.

Referenced by enable_break(), entry_point_address(), and inside_entry_func().

struct obj_section* find_pc_section ( CORE_ADDR  pc) [read]
void free_all_objfiles ( void  )
void free_objfile ( struct objfile )
void free_objfile_separate_debug ( struct objfile )
struct gdbarch* get_objfile_arch ( struct objfile ) [read]

Definition at line 349 of file objfiles.c.

References objfile_per_bfd_storage::gdbarch, and objfile::per_bfd.

Referenced by add_class_symtab_symbol(), add_minsym(), address_info(), basic_type(), call_target_sbrk(), checkpoint_command(), coff_read_enum_type(), coff_symtab_read(), cp_lookup_symbol_imports_or_template(), create_exception_master_breakpoint(), create_longjmp_master_breakpoint(), create_overlay_event_breakpoint(), create_std_terminate_master_breakpoint(), decode_base_type(), decode_frame_entry_1(), default_read_var_value(), define_symbol(), dump_msymbols(), dump_psymtab(), dump_symtab_1(), dw2_find_pc_sect_symtab(), dwarf2_add_field(), dwarf2_evaluate_loc_desc_full(), dwarf2_find_location_expression(), dwarf2_loc_desc_needs_frame(), dwarf_decode_lines_1(), dwarf_expr_push_dwarf_reg_entry_value(), edit_command(), elf_gnu_ifunc_record_cache(), elf_gnu_ifunc_resolve_by_got(), elf_rel_plt_read(), elf_symtab_read(), end_psymtab(), enter_line_range(), enter_linenos(), filter_overlapping_sections(), finalize_symtab(), find_function_in_inferior(), find_pc_sect_symtab_from_partial(), find_solib_trampoline_target(), finish_block_internal(), get_sal_arch(), get_type_arch(), handle_stap_probe(), ia64_hpux_solib_add_after_attach(), identify_source_line(), info_probes_for_ops(), init_entry_point_info(), insert_exception_resume_from_probe(), internalize_unwinds(), line_info(), list_command(), list_overlays_command(), locexpr_describe_location_1(), locexpr_describe_location_piece(), loclist_describe_location(), lookup_symbol_global(), macho_add_oso_symfile(), maintenance_check_psymtabs(), maintenance_info_psymtabs(), mark_common_block_symbol_computed(), mi_cmd_symbol_list_lines(), minsym_found(), objfile_type(), ocl_enable_break(), parse_partial_symbols(), parse_symbol(), print_msymbol_info(), process_one_symbol(), process_psymtab_comp_unit_reader(), psymtab_to_symtab_1(), py_free_objfile(), python_new_objfile(), read_call_site_scope(), read_dbx_symtab(), read_enum_type(), read_one_struct_field(), read_partial_die(), read_range_type(), read_subrange_type(), read_tag_pointer_type(), read_tag_string_type(), record_minimal_symbol(), save_objfile_types(), scan_xcoff_symtab(), scope_info(), section_is_mapped(), simple_overlay_update_1(), simple_read_overlay_table(), skip_prologue_sal(), som_symtab_read(), spu_catch_start(), stap_can_evaluate_probe_arguments(), stap_gen_info_probes_table_values(), stap_parse_probe_arguments(), tui_set_source_content(), tui_update_source_windows_with_line(), value_allocate_space_in_inferior(), value_fn_field(), and write_exp_msymbol().

int have_full_symbols ( void  )

Definition at line 1060 of file objfiles.c.

References ALL_OBJFILES, and objfile::minimal_symbol_count.

Referenced by start_command(), and symbol_not_found_error().

static int in_plt_section ( CORE_ADDR  pc) [inline, static]
void inhibit_section_map_updates ( struct program_space pspace)
struct cleanup* make_cleanup_free_objfile ( struct objfile ) [read]

Definition at line 677 of file objfiles.c.

References do_free_objfile_cleanup(), and make_cleanup().

Referenced by reread_symbols(), and syms_from_objfile_1().

int objfile_has_full_symbols ( struct objfile objfile)

Definition at line 979 of file objfiles.c.

References objfile::symtabs.

Referenced by have_full_symbols(), and objfile_has_symbols().

int objfile_has_partial_symbols ( struct objfile objfile)
int objfile_has_symbols ( struct objfile objfile)
const char* objfile_name ( const struct objfile objfile)

Definition at line 1499 of file objfiles.c.

References objfile::obfd, and objfile::original_name.

Referenced by address_info(), allocate_psymtab(), allocate_symtab(), auto_load_objfile_script(), build_error_marker_type(), clone_program_space(), coff_symtab_read(), compare_probes(), create_dwo_cu(), create_dwp_v2_section(), dbx_symfile_read(), die_containing_type(), dump_msymbols(), dump_objfile(), dump_psymtab(), dump_subexp_body_standard(), dump_symtab_1(), dw2_expand_symtabs_matching(), dw2_symtab_iter_next(), dwarf2_build_frame_info(), dwarf2_build_psymtabs_hard(), dwarf2_fetch_constant_bytes(), dwarf2_fetch_die_loc_sect_off(), dwarf2_get_dwz_file(), dwarf2_physname(), dwarf2_ranges_read(), dwarf2_read_index(), dwarf2_record_block_ranges(), dwarf_decode_lines_1(), elf_symfile_read(), filter_overlapping_sections(), find_separate_debug_file_by_buildid(), find_separate_debug_file_by_debuglink(), find_separate_debug_file_in_section(), fixup_go_packaging(), follow_die_ref(), follow_die_ref_or_sig(), follow_die_sig(), get_DW_AT_signature_type(), get_signatured_type(), handle_stap_probe(), has_libpthread(), info_probes_for_ops(), install_minimal_symbols(), is_known_support_routine(), load_partial_dies(), locexpr_describe_location_piece(), lookup_die_type(), lookup_dwo_cutu(), lookup_dwo_unit(), lookup_dwp_signatured_type(), macho_check_dsym(), macho_symfile_relocate(), macho_symtab_read(), maintenance_check_symtabs(), maintenance_info_psymtabs(), maintenance_info_symtabs(), maintenance_print_msymbols(), maintenance_print_objfiles(), maintenance_translate_address(), match_main(), objfpy_get_filename(), open_and_init_dwp_file(), parse_probes(), print_objfile_statistics(), print_symbol_bcache_statistics(), process_imported_unit_die(), process_queue(), pspy_get_filename(), read_addr_index_1(), read_call_site_scope(), read_common_block(), read_import_statement(), read_one_sym(), read_partial_die(), read_str_index(), read_subrange_type(), read_typedef(), require_partial_symbols(), reread_symbols(), save_gdb_index_command(), scan_file_globals(), scan_partial_symbols(), separate_debug_file_exists(), solib_aix_get_toc_value(), solib_read_symbols(), som_solib_section_offsets(), source_gdb_script_for_objfile(), sym_info(), symbol_file_clear(), target_info(), target_translate_tls_address(), thread_db_new_objfile(), try_thread_db_load_from_pdir(), try_thread_db_load_from_pdir_1(), type_name_no_tag_or_error(), write_psymtabs_to_index(), and xcoff_initial_scan().

void objfile_purge_solibs ( void  )

Definition at line 1039 of file objfiles.c.

References ALL_OBJFILES_SAFE, objfile::flags, free_objfile(), OBJF_SHARED, and OBJF_USERLOADED.

Referenced by no_shared_libraries().

void objfile_rebase ( struct objfile ,
CORE_ADDR   
)
void objfile_relocate ( struct objfile ,
const struct section_offsets  
)
struct objfile* objfile_separate_debug_iterate ( const struct objfile ,
const struct objfile  
) [read]
void objfile_set_sym_fns ( struct objfile objfile,
const struct sym_fns sf 
)
void objfile_to_front ( struct objfile )

Definition at line 448 of file objfiles.c.

References objfile::next, and object_files.

void objfiles_changed ( void  )
int pc_in_section ( CORE_ADDR  ,
char *   
)
void print_objfile_statistics ( void  )
void put_objfile_before ( struct objfile ,
struct objfile  
)

Definition at line 425 of file objfiles.c.

References _, internal_error(), objfile::next, object_files, and unlink_objfile().

Referenced by add_separate_debug_objfile().

void resume_section_map_updates ( struct program_space pspace)
void resume_section_map_updates_cleanup ( void *  arg)

Definition at line 1466 of file objfiles.c.

References resume_section_map_updates().

Referenced by svr4_handle_solib_event().

void set_objfile_per_bfd ( struct objfile obj)

Definition at line 188 of file objfiles.c.

References get_objfile_bfd_data(), objfile::obfd, and objfile::per_bfd.

Referenced by reread_symbols().

void terminate_minimal_symbol_table ( struct objfile objfile)

Create the terminating entry of OBJFILE's minimal symbol table. If OBJFILE->msymbols is zero, allocate a single entry from OBJFILE->objfile_obstack; otherwise, just initialize OBJFILE->msymbols[OBJFILE->minimal_symbol_count].

Definition at line 1268 of file minsyms.c.

References language_unknown, arm-linux::m, memset(), objfile::minimal_symbol_count, mst_unknown, MSYMBOL_TYPE, objfile::msymbols, objfile::objfile_obstack, and SYMBOL_SET_LANGUAGE.

Referenced by allocate_objfile(), jit_object_close_impl(), and reread_symbols().

void unlink_objfile ( struct objfile )

Definition at line 479 of file objfiles.c.

References _, internal_error(), objfile::next, and object_files.

Referenced by free_objfile(), and put_objfile_before().

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Defines