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>>
604 unsigned int *bytes_read_ptr);
609 unsigned int offset_size);
666 gdb::optional<std::queue<dwarf2_queue_item>>
queue;
676 typedef std::unique_ptr<type_unit_group_unshareable>
679 std::unordered_map<type_unit_group *, type_unit_group_unshareable_up>
683 std::unordered_map<signatured_type *, struct type *>
m_type_map;
709 unsigned int addr_index);
720 bool resolve_abstract_p =
false);
748 const char **var_name =
nullptr);
761 asection **,
const gdb_byte **,
CORE_ADDR get_frame_pc(frame_info_ptr frame)
CORE_ADDR dwarf2_read_addr_index(dwarf2_per_cu_data *per_cu, dwarf2_per_objfile *per_objfile, unsigned int addr_index)
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)
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)
std::unique_ptr< signatured_type > signatured_type_up
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 *)
struct cmd_list_element * set_dwarf_cmdlist
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)
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
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
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
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
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
unsigned int length() const
void set_unit_type(dwarf_unit_type unit_type)
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
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