36 complaint (_(
"debug info runs off end of %s section"
45 return s.containing_section;
55 gdb_assert (!
section->is_virtual);
57 gdb_assert (
section->s.section !=
nullptr);
58 return section->s.section->owner;
68 gdb_assert (!
section->is_virtual);
78 gdb_assert (sectp != NULL);
79 return bfd_section_name (sectp);
87 gdb_assert (abfd !=
nullptr);
88 return bfd_get_filename (abfd);
106 gdb_assert (sectp != NULL);
107 return bfd_section_flags (sectp);
115 return s.section == NULL ||
size == 0;
123 gdb_byte *buf, *retbuf;
141 gdb_assert (sectp != NULL);
142 if ((sectp->flags & SEC_RELOC) != 0)
144 error (_(
"Dwarf Error: DWP format V2 with relocations is not"
145 " supported in section %s [in module %s]"),
161 if ((sectp->flags & SEC_RELOC) == 0)
182 gdb_assert (abfd != NULL);
184 if (bfd_seek (abfd, sectp->filepos,
SEEK_SET) != 0
185 || bfd_read (buf,
size, abfd) !=
size)
187 error (_(
"Dwarf Error: Can't read DWARF data"
188 " in section %s [in module %s]"),
189 bfd_section_name (sectp), bfd_get_filename (abfd));
195 const char *form_name)
201 error (_(
"Dwarf Error: %s used without required section"),
204 error (_(
"Dwarf Error: %s used without %s section [in module %s]"),
207 if (str_offset >=
size)
208 error (_(
"%s pointing outside of %s section [in module %s]"),
210 gdb_assert (HOST_CHAR_BIT == 8);
211 if (
buffer[str_offset] ==
'\0')
213 return (
const char *) (
buffer + str_offset);
#define complaint(FMT,...)
const gdb_byte * gdb_bfd_map_section(asection *sectp, bfd_size_type *size)
void read(struct objfile *objfile)
bfd_size_type virtual_offset
const char * get_name() const
asection * get_bfd_section() const
void overflow_complaint() const
const char * read_string(struct objfile *objfile, LONGEST str_offset, const char *form_name)
struct dwarf2_section_info * containing_section
const char * get_file_name() const
union dwarf2_section_info::@54 s
struct bfd * get_bfd_owner() const
struct dwarf2_section_info * get_containing_section() const
auto_obstack objfile_obstack
bfd_byte * symfile_relocate_debug_section(struct objfile *objfile, asection *sectp, bfd_byte *buf)