24#include <unordered_map>
33#include "gdbsupport/gdb_obstack.h"
34#include "gdbsupport/hash_enum.h"
35#include "gdbsupport/function-view.h"
36#include "gdbsupport/packed.h"
93typedef std::unique_ptr<dwarf2_per_cu_data, dwarf2_per_cu_data_deleter>
181 std::atomic<packed<dwarf_unit_type, 1>>
m_unit_type {(dwarf_unit_type)0};
215 std::unique_ptr<file_and_directory>
fnd;
334 gdb_assert (ut != 0);
341 packed<dwarf_unit_type, 1> nope = (dwarf_unit_type)0;
349 gdb_assert_not_reached ();
366 if (
m_lang.compare_exchange_strong (nope,
lang))
370 if (
m_lang.compare_exchange_strong (nope,
lang))
372 gdb_assert_not_reached ();
488 std::vector<dwarf2_section_info>
types;
553 std::unordered_map<sect_offset, std::vector<sect_offset>,
554 gdb::hash_enum<sect_offset>>
671 unsigned int *bytes_read_ptr);
676 unsigned int offset_size);
716 unrelocated_addr
adjust (unrelocated_addr addr);
721 CORE_ADDR
relocate (unrelocated_addr addr);
742 gdb::optional<std::queue<dwarf2_queue_item>>
queue;
752 typedef std::unique_ptr<type_unit_group_unshareable>
755 std::unordered_map<type_unit_group *, type_unit_group_unshareable_up>
759 std::unordered_map<signatured_type *, struct type *>
m_type_map;
785 unsigned int addr_index);
796 bool resolve_abstract_p =
false);
824 const char **var_name =
nullptr);
837 asection **,
const gdb_byte **,
858 bool *symbol_found_p)
override
860 *symbol_found_p =
false;
871 CORE_ADDR adjusted_pc);
875 CORE_ADDR pc,
struct obj_section *section,
int warn_if_readin)
885 gdb::function_view<symbol_filename_ftype> fun,
886 bool need_fullname)
override;
897 gdb::function_view<expand_symtabs_file_matcher_ftype> file_matcher,
898 gdb::function_view<expand_symtabs_exp_notify_ftype> expansion_notify);
910 gdb::function_view<expand_symtabs_symbol_matcher_ftype> symbol_matcher,
911 gdb::function_view<
bool (
offset_type)> match_callback,
920 gdb::function_view<expand_symtabs_file_matcher_ftype> file_matcher);
936 int is_dwz, sect_offset sect_off, ULONGEST length);
bool operator==(const all_units_iterator &other) const
dwarf2_per_cu_data * operator*() const
all_units_iterator & operator++()
dwarf2_per_bfd * m_per_bfd
bool operator!=(const all_units_iterator &other) const
all_units_iterator(dwarf2_per_bfd *per_bfd, bool start)
dwarf2_per_bfd * m_per_bfd
all_units_iterator begin()
all_units_range(dwarf2_per_bfd *per_bfd)
CORE_ADDR get_frame_pc(frame_info_ptr frame)
htab_up create_quick_file_names_table(unsigned int nr_initial_entries)
struct type * dwarf2_fetch_die_type_sect_off(sect_offset sect_off, dwarf2_per_cu_data *per_cu, dwarf2_per_objfile *per_objfile, const char **var_name=nullptr)
bool dw2_expand_symtabs_matching_symbol(mapped_index_base &index, const lookup_name_info &lookup_name_in, gdb::function_view< expand_symtabs_symbol_matcher_ftype > symbol_matcher, gdb::function_view< bool(offset_type)> match_callback, dwarf2_per_objfile *per_objfile)
const gdb_byte * dwarf2_fetch_constant_bytes(sect_offset sect_off, dwarf2_per_cu_data *per_cu, dwarf2_per_objfile *per_objfile, obstack *obstack, LONGEST *len)
bool producer_is_clang(struct dwarf2_cu *cu)
dwarf2_per_cu_data_up create_cu_from_index_list(dwarf2_per_bfd *per_bfd, struct dwarf2_section_info *section, int is_dwz, sect_offset sect_off, ULONGEST length)
const char * read_indirect_string_at_offset(dwarf2_per_objfile *per_objfile, LONGEST str_offset)
void finalize_all_units(dwarf2_per_bfd *per_bfd)
void dw_expand_symtabs_matching_file_matcher(dwarf2_per_objfile *per_objfile, gdb::function_view< expand_symtabs_file_matcher_ftype > file_matcher)
std::unique_ptr< signatured_type > signatured_type_up
bool read_addrmap_from_aranges(dwarf2_per_objfile *per_objfile, dwarf2_section_info *section, addrmap *mutable_map)
struct dwarf2_locexpr_baton dwarf2_fetch_die_loc_cu_off(cu_offset offset_in_cu, dwarf2_per_cu_data *per_cu, dwarf2_per_objfile *per_objfile, gdb::function_view< CORE_ADDR()> get_frame_pc)
void dwarf2_get_section_info(struct objfile *, enum dwarf2_section_enum, asection **, const gdb_byte **, bfd_size_type *)
unrelocated_addr dwarf2_read_addr_index(dwarf2_per_cu_data *per_cu, dwarf2_per_objfile *per_objfile, unsigned int addr_index)
struct cmd_list_element * set_dwarf_cmdlist
bool dw2_expand_symtabs_matching_one(dwarf2_per_cu_data *per_cu, dwarf2_per_objfile *per_objfile, gdb::function_view< expand_symtabs_file_matcher_ftype > file_matcher, gdb::function_view< expand_symtabs_exp_notify_ftype > expansion_notify)
std::unique_ptr< dwarf2_per_cu_data, dwarf2_per_cu_data_deleter > dwarf2_per_cu_data_up
struct cmd_list_element * show_dwarf_cmdlist
struct type * dwarf2_get_die_type(cu_offset die_offset, dwarf2_per_cu_data *per_cu, dwarf2_per_objfile *per_objfile)
htab_up allocate_signatured_type_table()
struct dwarf2_locexpr_baton dwarf2_fetch_die_loc_sect_off(sect_offset sect_off, dwarf2_per_cu_data *per_cu, dwarf2_per_objfile *per_objfile, gdb::function_view< CORE_ADDR()> get_frame_pc, bool resolve_abstract_p=false)
dwarf2_per_objfile * get_dwarf2_per_objfile(struct objfile *objfile)
unsigned int dwarf_line_debug
void forget_cached_source_info(void)
struct compunit_symtab * find_compunit_symtab_by_address(struct objfile *objfile, CORE_ADDR address) override
void print_stats(struct objfile *objfile, bool print_bcache) override
struct symtab * find_last_source_symtab(struct objfile *objfile) override
void expand_all_symtabs(struct objfile *objfile) override
void map_symbol_filenames(struct objfile *objfile, gdb::function_view< symbol_filename_ftype > fun, bool need_fullname) override
bool has_unexpanded_symtabs(struct objfile *objfile) override
enum language lookup_global_symbol_language(struct objfile *objfile, const char *name, domain_enum domain, bool *symbol_found_p) override
bool has_symbols(struct objfile *objfile) override
struct compunit_symtab * find_pc_sect_compunit_symtab(struct objfile *objfile, struct bound_minimal_symbol msymbol, CORE_ADDR pc, struct obj_section *section, int warn_if_readin) override final
virtual dwarf2_per_cu_data * find_per_cu(dwarf2_per_bfd *per_bfd, CORE_ADDR adjusted_pc)
struct dwarf2_per_cu_data * per_cu
dwarf2_per_objfile * per_objfile
dwarf2_section_info rnglists
dwarf2_section_info loclists
dwarf2_section_info macro
DISABLE_COPY_AND_ASSIGN(dwarf2_per_bfd)
htab_up quick_file_names_table
struct addrmap * index_addrmap
dwarf2_per_cu_data_up allocate_per_cu()
dwarf2_section_info macinfo
gdb::array_view< dwarf2_per_cu_data_up > all_comp_units
dwarf2_per_cu_data * get_cu(int index) const
void map_info_sections(struct objfile *objfile)
void locate_sections(bfd *abfd, asection *sectp, const dwarf2_debug_sections &names)
dwarf2_section_info ranges
std::unique_ptr< dwarf_scanner_base > index_table
gdb::array_view< dwarf2_per_cu_data_up > all_type_units
std::unique_ptr< struct dwz_file > dwz_file
dwarf2_section_info str_offsets
dwarf2_per_bfd(bfd *obfd, const dwarf2_debug_sections *names, bool can_copy)
std::vector< dwarf2_section_info > types
dwarf2_section_info line_str
dwarf2_section_info frame
signatured_type_up allocate_signatured_type(ULONGEST signature)
dwarf2_section_info eh_frame
dwarf2_section_info debug_aranges
std::unordered_map< sect_offset, std::vector< sect_offset >, gdb::hash_enum< sect_offset > > abstract_to_concrete
std::unique_ptr< struct dwp_file > dwp_file
dwarf2_section_info abbrev
dwarf2_section_info gdb_index
std::unique_ptr< index_cache_resource > index_cache_res
std::vector< dwarf2_per_cu_data_up > all_units
std::vector< dwarf2_per_cu_data * > just_read_cus
void operator()(dwarf2_per_cu_data *data)
std::atomic< bool > scanned
struct dwarf2_section_info * section
bool imported_symtabs_empty() const
unsigned int reading_dwo_directly
packed< unsigned int, 1 > mark
void set_version(short version)
void set_lang(enum language lang)
void imported_symtabs_free()
unsigned char m_dwarf_version
std::unique_ptr< file_and_directory > fnd
struct quick_file_names * file_names
const comp_unit_head * get_header() const
dwarf_unit_type unit_type(bool strict_p=true) const
void set_length(unsigned int length, bool strict_p=true)
std::vector< dwarf2_per_cu_data * > * imported_symtabs
packed< bool, 1 > m_header_read_in
void imported_symtabs_push(dwarf2_per_cu_data *p)
enum language lang(bool strict_p=true) const
size_t imported_symtabs_size() const
packed< bool, 1 > addresses_seen
void free_cached_file_names()
std::atomic< packed< dwarf_unit_type, 1 > > m_unit_type
unsigned int is_debug_types
int ref_addr_size() const
std::atomic< packed< language, LANGUAGE_BYTES > > m_lang
packed< bool, 1 > files_read
unsigned int length() const
void set_unit_type(dwarf_unit_type unit_type)
unrelocated_addr adjust(unrelocated_addr addr)
std::unordered_map< type_unit_group *, type_unit_group_unshareable_up > m_type_units
std::unordered_map< signatured_type *, struct type * > m_type_map
compunit_symtab * get_symtab(const dwarf2_per_cu_data *per_cu) const
CORE_ADDR relocate(unrelocated_addr addr)
type_unit_group_unshareable * get_type_unit_group_unshareable(type_unit_group *tu_group)
void remove_cu(dwarf2_per_cu_data *per_cu)
const char * read_line_string(const gdb_byte *buf, const struct comp_unit_head *cu_header, unsigned int *bytes_read_ptr)
std::unique_ptr< type_unit_group_unshareable > type_unit_group_unshareable_up
void set_type_for_signatured_type(signatured_type *sig_type, struct type *type)
void set_cu(dwarf2_per_cu_data *per_cu, std::unique_ptr< dwarf2_cu > cu)
struct type * get_type_for_signatured_type(signatured_type *sig_type) const
gdb::optional< std::queue< dwarf2_queue_item > > queue
std::unordered_map< dwarf2_per_cu_data *, std::unique_ptr< dwarf2_cu > > m_dwarf2_cus
void set_symtab(const dwarf2_per_cu_data *per_cu, compunit_symtab *symtab)
struct dwarf2_per_bfd * per_bfd
bool symtab_set_p(const dwarf2_per_cu_data *per_cu) const
std::vector< compunit_symtab * > m_symtabs
dwarf2_cu * get_cu(dwarf2_per_cu_data *per_cu)
dwarf2_per_objfile(struct objfile *objfile, dwarf2_per_bfd *per_bfd)
dwarf2_queue_item(dwarf2_per_cu_data *cu, dwarf2_per_objfile *per_objfile, enum language lang)
dwarf2_per_objfile * per_objfile
DISABLE_COPY_AND_ASSIGN(dwarf2_queue_item)
enum language pretend_language
dwarf2_per_cu_data * per_cu
signatured_type(ULONGEST signature)
sect_offset type_offset_in_section
cu_offset type_offset_in_tu
int nr_stmt_less_type_units
int nr_all_type_units_reallocs
int nr_uniq_abbrev_tables