GDB (xrefs)
Classes | Macros | Functions
/tmp/gdb-7.10/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
 

Macros

#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_OBJFILES(obj)
 
#define ALL_OBJFILES_SAFE(obj, nxt)
 
#define ALL_OBJFILE_FILETABS(objfile, cu, s)
 
#define ALL_OBJFILE_COMPUNITS(objfile, cu)   for ((cu) = (objfile) -> compunit_symtabs; (cu) != NULL; (cu) = (cu) -> next)
 
#define ALL_OBJFILE_MSYMBOLS(objfile, m)
 
#define ALL_FILETABS(objfile, ps, s)
 
#define ALL_COMPUNITS(objfile, cu)
 
#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 (const 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 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)
 
int is_addr_in_objfile (CORE_ADDR addr, const struct objfile *objfile)
 
int shared_objfile_contains_address_p (struct program_space *pspace, CORE_ADDR address)
 
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)
 
const char * objfile_filename (const struct objfile *objfile)
 
const char * objfile_debug_name (const struct objfile *objfile)
 
void set_objfile_main_name (struct objfile *objfile, const char *name, enum language lang)
 

Macro Definition Documentation

#define ALL_COMPUNITS (   objfile,
  cu 
)
#define ALL_FILETABS (   objfile,
  ps,
 
)
Value:
ALL_OBJFILE_FILETABS (objfile, ps, s)
#define ALL_OBJFILES(obj)
Definition: objfiles.h:579

Definition at line 610 of file objfiles.h.

Referenced by find_line_symtab(), maintenance_print_symbols(), mi_cmd_file_list_exec_source_files(), select_source_symtab(), and sources_info().

#define ALL_MSYMBOLS (   objfile,
 
)
#define ALL_OBJFILE_COMPUNITS (   objfile,
  cu 
)    for ((cu) = (objfile) -> compunit_symtabs; (cu) != NULL; (cu) = (cu) -> next)
#define ALL_OBJFILE_FILETABS (   objfile,
  cu,
 
)
Value:
ALL_COMPUNIT_FILETABS (cu, s)
#define ALL_OBJFILE_COMPUNITS(objfile, cu)
Definition: objfiles.h:597

Definition at line 591 of file objfiles.h.

Referenced by coff_symtab_read(), dump_objfile(), forget_cached_source_info_for_objfile(), objfile_relocate1(), and print_objfile_statistics().

#define ALL_OBJFILE_MSYMBOLS (   objfile,
 
)
Value:
for ((m) = (objfile)->per_bfd->msymbols; \
MSYMBOL_LINKAGE_NAME (m) != NULL; \
(m)++)
#define MSYMBOL_LINKAGE_NAME(symbol)
Definition: symtab.h:409
tuple m
Definition: arm-linux.py:44

Definition at line 602 of file objfiles.h.

Referenced by coff_symfile_read(), dump_msymbols(), find_methods(), and scan_file_globals().

#define ALL_OBJFILE_OSECTIONS (   objfile,
  osect 
)
#define ALL_OBJFILES (   obj)
Value:
(obj) != NULL; \
(obj) = (obj)->next)
struct objfile * objfiles
Definition: progspace.h:188
struct objfile * next
Definition: objfiles.h:267
struct program_space * current_program_space
Definition: progspace.c:35

Definition at line 579 of file objfiles.h.

Referenced by add_nonlocal_symbols(), append_ocl_sos(), basic_lookup_transparent_type(), captured_main(), create_exception_master_breakpoint(), create_longjmp_master_breakpoint(), create_overlay_event_breakpoint(), create_std_terminate_master_breakpoint(), default_iterate_over_objfiles_in_search_order(), do_module_cleanup(), dwarf2_frame_find_fde(), expand_symtab_containing_pc(), expand_symtabs_matching(), find_line_symtab(), find_main_name(), find_methods(), find_pc_partial_function_gnu_ifunc(), find_pc_sect_compunit_symtab(), find_pretty_printer_from_objfiles(), find_probe_by_pc(), find_unwind_entry(), gdbpy_get_matching_xmethod_workers(), gdbpy_objfiles(), gdbscm_objfiles(), has_libpthread(), have_full_symbols(), have_minimal_symbols(), have_partial_symbols(), iterate_over_all_matching_symtabs(), iterate_over_symtabs(), jit_find_objf_with_entry_addr(), lookup_minimal_symbol_and_objfile(), lookup_static_symbol(), maintenance_info_sections(), make_symbol_overload_list_qualified(), map_symbol_filenames(), matching_obj_sections(), objfpy_lookup_objfile_by_build_id(), objfpy_lookup_objfile_by_name(), ppc_linux_spe_context_inferior_created(), ppscm_find_pretty_printer_from_objfiles(), qsort_cmp(), remove_symbol_file_command(), save_gdb_index_command(), search_minsyms_for_name(), select_source_symtab(), solib_read_symbols(), spu_objfile_from_frame(), try_thread_db_load_from_pdir(), VEC(), and windows_iterate_over_objfiles_in_search_order().

#define ALL_OBJFILES_SAFE (   obj,
  nxt 
)
Value:
(obj) != NULL? ((nxt)=(obj)->next,1) :0; \
(obj) = (nxt))
struct objfile * objfiles
Definition: progspace.h:188
struct program_space * current_program_space
Definition: progspace.c:35

Definition at line 584 of file objfiles.h.

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

#define ALL_OBJSECTIONS (   objfile,
  osect 
)
Value:
(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)
struct objfile * objfiles
Definition: progspace.h:188
struct obj_section * sections_end
Definition: objfiles.h:386
struct program_space * current_program_space
Definition: progspace.c:35

Definition at line 660 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_PSPACE_OBJFILES (   ss,
  obj 
)    for ((obj) = ss->objfiles; (obj) != NULL; (obj) = (obj)->next)
#define MINIMAL_SYMBOL_HASH_SIZE   2039
#define MULTI_OBJFILE_P ( )    (object_files && object_files->next)

Definition at line 696 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)])
#define OBJF_MAINLINE   (1 << 5)

Definition at line 455 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 161 of file objfiles.h.

#define SECT_OFF_BSS (   objfile)    (objfile)->sect_index_bss
#define SECT_OFF_DATA (   objfile)
Value:
? (internal_error (__FILE__, __LINE__, \
_("sect_index_data not initialized")), -1) \
void internal_error(const char *file, int line, const char *fmt,...)
Definition: errors.c:50
#define _(String)
Definition: gdb_locale.h:40
int sect_index_data
Definition: objfiles.h:373

Definition at line 671 of file objfiles.h.

Referenced by dtrace_get_probe_address(), find_targ_sec(), get_offsets(), parse_partial_symbols(), parse_symbol(), prim_record_minimal_symbol(), process_one_symbol(), record_minimal_symbol(), scan_xcoff_symtab(), stap_clear_semaphore(), stap_get_probe_address(), and stap_set_semaphore().

#define SECT_OFF_RODATA (   objfile)
Value:
? (internal_error (__FILE__, __LINE__, \
_("sect_index_rodata not initialized")), -1) \
void internal_error(const char *file, int line, const char *fmt,...)
Definition: errors.c:50
#define _(String)
Definition: gdb_locale.h:40
int sect_index_rodata
Definition: objfiles.h:375

Definition at line 677 of file objfiles.h.

Referenced by 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   
)
void build_objfile_section_table ( struct objfile )
DECLARE_REGISTRY ( 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().

CORE_ADDR entry_point_address ( void  )

Definition at line 392 of file objfiles.c.

References _, entry_point_address_query(), and error().

Referenced by call_function_by_hand_dummy(), and displaced_step_at_entry_point().

int entry_point_address_query ( CORE_ADDR entry_p)

Definition at line 377 of file objfiles.c.

References ANOFFSET, and symfile_objfile.

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

struct obj_section* find_pc_section ( CORE_ADDR  pc)
void free_all_objfiles ( void  )
void free_objfile ( struct objfile )
void free_objfile_separate_debug ( struct objfile )
struct gdbarch* get_objfile_arch ( const struct objfile )

Definition at line 368 of file objfiles.c.

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

Referenced by add_minsym(), add_partial_subprogram(), add_partial_symbol(), address_info(), basic_type(), block_gdbarch(), call_target_sbrk(), checkpoint_command(), coff_read_enum_type(), coff_symtab_read(), create_addrmap_from_index(), create_exception_master_breakpoint(), create_longjmp_master_breakpoint(), create_overlay_event_breakpoint(), create_std_terminate_master_breakpoint(), decode_base_type(), decode_frame_entry_1(), define_symbol(), dtrace_process_dof(), dump_msymbols(), dump_psymtab(), dump_symtab_1(), dw2_find_pc_sect_compunit_symtab(), dwarf2_add_field(), dwarf2_evaluate_loc_desc_full(), dwarf2_find_location_expression(), dwarf2_loc_desc_needs_frame(), dwarf2_locexpr_baton_eval(), dwarf2_ranges_read(), dwarf2_record_block_ranges(), 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_solib_trampoline_target(), finish_block_internal(), gdbpy_execute_objfile_script(), gdbpy_source_objfile_script(), get_sal_arch(), get_type_arch(), handle_stap_probe(), identify_source_line(), init_entry_point_info(), insert_exception_resume_from_probe(), internalize_unwinds(), line_info(), linux_infcall_mmap(), linux_infcall_munmap(), list_command(), list_overlays_command(), locexpr_describe_location_1(), locexpr_describe_location_piece(), loclist_describe_location(), lookup_global_symbol(), macho_add_oso_symfile(), maintenance_check_psymtabs(), maintenance_info_psymtabs(), mark_common_block_symbol_computed(), mi_cmd_symbol_list_lines(), minsym_found(), new_symbol_full(), objfile_type(), ocl_enable_break(), parse_partial_symbols(), parse_symbol(), print_msymbol_info(), process_full_comp_unit(), process_one_symbol(), process_psymtab_comp_unit_reader(), psym_find_pc_sect_compunit_symtab(), psymtab_to_symtab_1(), py_free_objfile(), python_new_objfile(), read_attribute_value(), read_call_site_scope(), read_dbx_symtab(), read_enum_type(), read_file_scope(), read_func_scope(), read_lexical_block_scope(), 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(), section_is_mapped(), simple_overlay_update_1(), simple_read_overlay_table(), skip_prologue_sal(), solib_global_lookup(), spu_catch_start(), symbol_arch(), 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  )
int have_minimal_symbols ( void  )
int have_partial_symbols ( void  )
static int in_plt_section ( CORE_ADDR  pc)
inlinestatic
void inhibit_section_map_updates ( struct program_space pspace)
int is_addr_in_objfile ( CORE_ADDR  addr,
const struct objfile objfile 
)
struct cleanup* make_cleanup_free_objfile ( struct objfile )

Definition at line 667 of file objfiles.c.

References do_free_objfile_cleanup(), and make_cleanup().

Referenced by compile_object_load(), reread_symbols(), and syms_from_objfile_1().

const char* objfile_debug_name ( const struct objfile objfile)
const char* objfile_filename ( const struct objfile objfile)

Definition at line 1510 of file objfiles.c.

References objfile::obfd.

Referenced by objfpy_lookup_objfile_by_name().

int objfile_has_full_symbols ( struct objfile objfile)

Definition at line 940 of file objfiles.c.

References objfile::compunit_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(), auto_load_objfile_script_1(), build_error_marker_type(), check_line_address(), clone_program_space(), coff_symtab_read(), compare_probes(), compile_object_load(), compile_object_run(), create_dwo_cu(), create_dwp_v2_section(), dbx_symfile_read(), die_containing_type(), do_module_cleanup(), 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(), elf_read_minimal_symbols(), execute_script_contents(), 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(), gdbscm_objfile_filename(), gdbscm_progspace_filename(), get_DW_AT_signature_type(), get_out_value_type(), get_regs_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(), 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_print_symbol_cache(), maintenance_print_symbol_cache_statistics(), maintenance_translate_address(), maybe_print_script_not_found_warning(), maybe_print_unsupported_script_warning(), objfpy_get_filename(), ofscm_print_objfile_smob(), open_and_init_dwp_file(), parse_probes(), print_objfile_statistics(), print_symbol_bcache_statistics(), process_imported_unit_die(), process_queue(), pspy_get_filename(), psscm_print_pspace_smob(), 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(), remove_symbol_file_command(), 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(), source_script_file(), 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(), VEC(), write_psymtabs_to_index(), and xcoff_initial_scan().

void objfile_purge_solibs ( void  )

Definition at line 1000 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  
)
void objfile_set_sym_fns ( struct objfile objfile,
const struct sym_fns sf 
)
void objfiles_changed ( void  )
int pc_in_section ( CORE_ADDR  ,
char *   
)

Definition at line 1384 of file objfiles.c.

References find_pc_section(), and obj_section::the_bfd_section.

Referenced by in_mips_stubs_section(), and in_plt_section().

void print_objfile_statistics ( void  )
void print_symbol_bcache_statistics ( void  )
void put_objfile_before ( struct objfile ,
struct objfile  
)

Definition at line 446 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 1427 of file objfiles.c.

References resume_section_map_updates().

Referenced by svr4_handle_solib_event().

void set_objfile_main_name ( struct objfile objfile,
const char *  name,
enum language  lang 
)
void set_objfile_per_bfd ( struct objfile obj)

Definition at line 183 of file objfiles.c.

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

Referenced by reread_symbols().

int shared_objfile_contains_address_p ( struct program_space pspace,
CORE_ADDR  address 
)
void terminate_minimal_symbol_table ( struct objfile objfile)
void unlink_objfile ( struct objfile )

Definition at line 480 of file objfiles.c.

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

Referenced by free_objfile(), and put_objfile_before().