diff options
Diffstat (limited to 'gdb/dwarf2/section.h')
-rw-r--r-- | gdb/dwarf2/section.h | 25 |
1 files changed, 12 insertions, 13 deletions
diff --git a/gdb/dwarf2/section.h b/gdb/dwarf2/section.h index 85da485..fbdb025 100644 --- a/gdb/dwarf2/section.h +++ b/gdb/dwarf2/section.h @@ -43,6 +43,8 @@ the real section this "virtual" section is contained in, and BUFFER,SIZE describe the virtual section. */ +#include "dwarf2/types.h" + struct dwarf2_section_info { /* Return the name of this section. */ @@ -81,19 +83,6 @@ struct dwarf2_section_info If the section is compressed, uncompress it before returning. */ void read (struct objfile *objfile); - /* A helper function that returns the size of a section in a safe way. - If you are positive that the section has been read before using the - size, then it is safe to refer to the dwarf2_section_info object's - "size" field directly. In other cases, you must call this - function, because for compressed sections the size field is not set - correctly until the section has been read. */ - bfd_size_type get_size (struct objfile *objfile) - { - if (!readin) - read (objfile); - return size; - } - /* Issue a complaint that something was outside the bounds of this buffer. */ void overflow_complaint () const; @@ -125,4 +114,14 @@ struct dwarf2_section_info bool is_virtual; }; +using dwarf2_section_info_up = std::unique_ptr<dwarf2_section_info>; + +/* A pair-like structure to represent an offset into a section. */ + +struct section_and_offset +{ + const dwarf2_section_info *section; + sect_offset offset; +}; + #endif /* GDB_DWARF2_SECTION_H */ |