GDB (xrefs)
Loading...
Searching...
No Matches
Classes | Macros | Typedefs | Functions
objfiles.h File Reference
#include "hashtab.h"
#include "gdbsupport/gdb_obstack.h"
#include "objfile-flags.h"
#include "symfile.h"
#include "progspace.h"
#include "registry.h"
#include "gdb_bfd.h"
#include <atomic>
#include <bitset>
#include <vector>
#include "gdbsupport/next-iterator.h"
#include "gdbsupport/safe-iterator.h"
#include "bcache.h"
#include "gdbarch.h"
#include "gdbsupport/refcounted-object.h"
#include "jit.h"
#include "quick-symbol.h"
#include <forward_list>

Go to the source code of this file.

Classes

struct  entry_info
 
struct  objstats
 
struct  minimal_symbol_iterator
 
struct  objfile_per_bfd_storage
 
class  separate_debug_iterator
 
struct  obj_section
 
struct  objfile
 
class  objfile::section_iterator
 
struct  objfile_deleter
 

Macros

#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 OBJSTAT(objfile, expr)   (objfile -> stats.expr)
 
#define OBJSTATS   struct objstats stats
 
#define MINIMAL_SYMBOL_HASH_SIZE   2039
 

Typedefs

typedef iterator_range< separate_debug_iteratorseparate_debug_range
 
typedef std::unique_ptr< objfile, objfile_deleterobjfile_up
 

Functions

void print_objfile_statistics (void)
 
int entry_point_address_query (CORE_ADDR *entry_p)
 
CORE_ADDR entry_point_address (void)
 
void build_objfile_section_table (struct objfile *)
 
void free_objfile_separate_debug (struct objfile *)
 
void objfile_relocate (struct objfile *, const section_offsets &)
 
void objfile_rebase (struct objfile *, CORE_ADDR)
 
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)
 
bool is_addr_in_objfile (CORE_ADDR addr, const struct objfile *objfile)
 
bool 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)
 
bool pc_in_section (CORE_ADDR, const char *)
 
static int in_plt_section (CORE_ADDR pc)
 
scoped_restore_tmpl< int > inhibit_section_map_updates (struct program_space *pspace)
 
void default_iterate_over_objfiles_in_search_order (gdbarch *gdbarch, iterate_over_objfiles_in_search_order_cb_ftype cb, 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)
 
const char * objfile_flavour_name (struct objfile *objfile)
 
void set_objfile_main_name (struct objfile *objfile, const char *name, enum language lang)
 
struct typeobjfile_int_type (struct objfile *of, int size_in_bytes, bool unsigned_p)
 
void objfile_register_static_link (struct objfile *objfile, const struct block *block, const struct dynamic_prop *static_link)
 
const struct dynamic_propobjfile_lookup_static_link (struct objfile *objfile, const struct block *block)
 

Macro Definition Documentation

◆ MINIMAL_SYMBOL_HASH_SIZE

#define MINIMAL_SYMBOL_HASH_SIZE   2039

◆ OBJSTAT

#define OBJSTAT ( objfile,
expr )   (objfile -> stats.expr)

◆ OBJSTATS

#define OBJSTATS   struct objstats stats

Definition at line 170 of file objfiles.h.

◆ SECT_OFF_BSS

#define SECT_OFF_BSS ( objfile)    (objfile)->sect_index_bss

◆ SECT_OFF_DATA

#define SECT_OFF_DATA ( objfile)
Value:
? (internal_error (_("sect_index_data not initialized")), -1) \
: objfile->sect_index_data)
int sect_index_data
Definition objfiles.h:799

Definition at line 129 of file objfiles.h.

Referenced by objfile::data_section_offset(), find_targ_sec(), remote_target::get_offsets(), parse_partial_symbols(), parse_symbol(), process_one_symbol(), minimal_symbol_reader::record(), record_minimal_symbol(), record_minimal_symbol(), and scan_xcoff_symtab().

◆ SECT_OFF_RODATA

#define SECT_OFF_RODATA ( objfile)
Value:
? (internal_error (_("sect_index_rodata not initialized")), -1) \
: objfile->sect_index_rodata)
int sect_index_rodata
Definition objfiles.h:801

Definition at line 134 of file objfiles.h.

Referenced by process_one_symbol(), and read_dbx_symtab().

◆ SECT_OFF_TEXT

#define SECT_OFF_TEXT ( objfile)

Typedef Documentation

◆ objfile_up

typedef std::unique_ptr<objfile, objfile_deleter> objfile_up

Definition at line 899 of file objfiles.h.

◆ separate_debug_range

Definition at line 371 of file objfiles.h.

Function Documentation

◆ build_objfile_section_table()

void build_objfile_section_table ( struct objfile * objfile)
extern

◆ default_iterate_over_objfiles_in_search_order()

void default_iterate_over_objfiles_in_search_order ( gdbarch * gdbarch,
iterate_over_objfiles_in_search_order_cb_ftype cb,
objfile * current_objfile )
extern

Definition at line 1247 of file objfiles.c.

References current_program_space, and program_space::objfiles().

◆ entry_point_address()

CORE_ADDR entry_point_address ( void )
extern

◆ entry_point_address_query()

int entry_point_address_query ( CORE_ADDR * entry_p)
extern

◆ find_pc_section()

struct obj_section * find_pc_section ( CORE_ADDR pc)
extern

◆ free_objfile_separate_debug()

void free_objfile_separate_debug ( struct objfile * objfile)
extern

◆ have_full_symbols()

int have_full_symbols ( void )
extern

◆ have_minimal_symbols()

int have_minimal_symbols ( void )
extern

Definition at line 812 of file objfiles.c.

References current_program_space, and program_space::objfiles().

Referenced by start_command(), and symbol_not_found_error().

◆ have_partial_symbols()

int have_partial_symbols ( void )
extern

◆ in_plt_section()

static int in_plt_section ( CORE_ADDR pc)
inlinestatic

◆ inhibit_section_map_updates()

scoped_restore_tmpl< int > inhibit_section_map_updates ( struct program_space * pspace)
extern

Definition at line 1197 of file objfiles.c.

References get_objfile_pspace_data().

Referenced by svr4_handle_solib_event().

◆ is_addr_in_objfile()

bool is_addr_in_objfile ( CORE_ADDR addr,
const struct objfile * objfile )
extern

◆ objfile_debug_name()

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

◆ objfile_filename()

const char * objfile_filename ( const struct objfile * objfile)

Definition at line 1270 of file objfiles.c.

References objfile::obfd.

Referenced by gdbpy_lookup_objfile().

◆ objfile_flavour_name()

const char * objfile_flavour_name ( struct objfile * objfile)

Definition at line 1289 of file objfiles.c.

References objfile::obfd.

Referenced by language_defn::read_var_value().

◆ objfile_has_full_symbols()

int objfile_has_full_symbols ( struct objfile * objfile)
extern

Definition at line 740 of file objfiles.c.

References objfile::compunit_symtabs.

Referenced by have_full_symbols(), and objfile_has_symbols().

◆ objfile_has_symbols()

int objfile_has_symbols ( struct objfile * objfile)
extern

◆ objfile_int_type()

struct type * objfile_int_type ( struct objfile * of,
int size_in_bytes,
bool unsigned_p )
extern

Definition at line 1299 of file objfiles.c.

References TRY_TYPE.

Referenced by dwarf2_cu::addr_sized_int_type(), and read_tag_string_type().

◆ objfile_lookup_static_link()

const struct dynamic_prop * objfile_lookup_static_link ( struct objfile * objfile,
const struct block * block )
extern

Definition at line 226 of file objfiles.c.

References static_link_htab_entry::block, and objfile::static_links.

Referenced by block::static_link().

◆ objfile_name()

const char * objfile_name ( const struct objfile * objfile)

Definition at line 1259 of file objfiles.c.

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

Referenced by allocate_symtab(), auto_load_objfile_script(), auto_load_objfile_script_1(), build_error_marker_type(), lnp_state_machine::check_line_address(), clone_program_space(), coff_symtab_read(), collect_probes(), compare_probes(), compile_object_load(), create_dwp_v2_or_v5_section(), dbx_symfile_read(), die_containing_type(), do_module_cleanup(), expr::dump_for_expression(), dump_msymbols(), dump_objfile(), dump_psymtab(), dump_symtab_1(), dw2_expand_marked_cus(), dw2_symtab_iter_next(), dwarf2_build_frame_info(), dwarf2_build_psymtabs_hard(), dwarf2_fetch_constant_bytes(), dwarf2_fetch_die_loc_sect_off(), dwarf2_physname(), dwarf2_ranges_process(), dwarf2_read_debug_names(), dwarf2_read_gdb_index(), dwarf2_rnglists_process(), dwarf2_string_attr(), dwarf_decode_macro_bytes(), elf_read_minimal_symbols(), execute_script_contents(), filter_overlapping_sections(), find_separate_debug_file(), find_separate_debug_file_by_buildid(), find_separate_debug_file_by_debuglink(), find_separate_debug_file_in_section(), dw2_debug_names_iterator::find_vec_in_debug_names(), dw2_debug_names_iterator::find_vec_in_debug_names(), fixup_go_packaging(), follow_die_ref(), follow_die_ref_or_sig(), follow_die_sig(), gdbscm_objfile_filename(), gdbscm_progspace_filename(), get_alignment(), get_DW_AT_signature_type(), get_out_value_type(), get_regs_type(), get_signatured_type(), handle_stap_probe(), handle_variant(), handle_variant_part(), ignore_probe_p(), info_address_command(), info_probes_for_spops(), info_sources_worker(), info_symbol_command(), info_target_command(), minimal_symbol_reader::install(), is_known_support_routine(), jit_object_close_impl(), libpthread_objfile_p(), locexpr_describe_location_piece(), lookup_die_type(), lookup_dwo_cutu(), 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_one_line_table(), maintenance_print_psymbols(), maintenance_print_symbol_cache(), maintenance_print_symbol_cache_statistics(), maintenance_print_symbols(), maintenance_translate_address(), maybe_print_script_not_found_warning(), maybe_print_unsupported_script_warning(), maybe_set_alignment(), dw2_debug_names_iterator::next(), objfpy_get_filename(), objfpy_repr(), ofscm_print_objfile_smob(), open_and_init_dwp_file(), parse_probes_in_pspace(), print_objfile_statistics(), process_full_comp_unit(), process_imported_unit_die(), process_queue(), process_structure_scope(), pspy_get_filename(), psscm_print_pspace_smob(), quirk_rust_enum(), read_addr_index_1(), read_addrmap_from_aranges(), read_array_type(), read_call_site_scope(), read_common_block(), read_import_statement(), read_loclist_index(), read_one_sym(), read_rnglist_index(), read_str_index(), read_stub_str_index(), read_subrange_type(), read_tag_pointer_type(), read_typedef(), remove_symbol_file_command(), objfile::require_partial_symbols(), reread_symbols(), save_gdb_index_command(), scan_file_globals(), separate_debug_file_exists(), solib_aix_get_toc_value(), solib_read_symbols(), source_script_file(), symbol_file_clear(), target_translate_tls_address(), try_open_dwop_file(), try_thread_db_load_from_pdir_1(), type_name_or_error(), and xcoff_initial_scan().

◆ objfile_purge_solibs()

void objfile_purge_solibs ( void )
extern

◆ objfile_rebase()

void objfile_rebase ( struct objfile * objfile,
CORE_ADDR slide )
extern

◆ objfile_register_static_link()

void objfile_register_static_link ( struct objfile * objfile,
const struct block * block,
const struct dynamic_prop * static_link )
extern

◆ objfile_relocate()

void objfile_relocate ( struct objfile * objfile,
const section_offsets & new_offsets )
extern

◆ objfile_set_sym_fns()

void objfile_set_sym_fns ( struct objfile * objfile,
const struct sym_fns * sf )
extern

◆ objfiles_changed()

void objfiles_changed ( void )
extern

◆ pc_in_section()

bool pc_in_section ( CORE_ADDR pc,
const char * name )
extern

Definition at line 1175 of file objfiles.c.

References find_pc_section(), name, and obj_section::the_bfd_section.

Referenced by in_mips_stubs_section(), and in_plt_section().

◆ print_objfile_statistics()

void print_objfile_statistics ( void )
extern

◆ set_objfile_main_name()

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

◆ set_objfile_per_bfd()

void set_objfile_per_bfd ( struct objfile * obj)

◆ shared_objfile_contains_address_p()

bool shared_objfile_contains_address_p ( struct program_space * pspace,
CORE_ADDR address )
extern