gdb: Convert language la_get_symbol_name_matcher field to a method
[deliverable/binutils-gdb.git] / gdb / dwarf2 / comp-unit.h
index b4483ac1f7acfd3197b7e97c0857ea6a8b44c396..35bca8f8e9d7e55c7e21ab5afcd148764338fd49 100644 (file)
@@ -27,6 +27,7 @@
 #ifndef GDB_DWARF2_COMP_UNIT_H
 #define GDB_DWARF2_COMP_UNIT_H
 
+#include "dwarf2/leb.h"
 #include "gdbtypes.h"
 
 /* The data in a compilation unit header, after target2host
@@ -78,6 +79,20 @@ struct comp_unit_head
     sect_offset top = sect_off + get_length ();
     return off >= bottom && off < top;
   }
+
+  /* Read an offset from the data stream.  The size of the offset is
+     given by cu_header->offset_size.  */
+  LONGEST read_offset (bfd *abfd, const gdb_byte *buf,
+                      unsigned int *bytes_read) const
+  {
+    LONGEST offset = ::read_offset (abfd, buf, offset_size);
+    *bytes_read = offset_size;
+    return offset;
+  }
+
+  /* Read an address from BUF.  BYTES_READ is updated.  */
+  CORE_ADDR read_address (bfd *abfd, const gdb_byte *buf,
+                         unsigned int *bytes_read) const;
 };
 
 /* Expected enum dwarf_unit_type for read_comp_unit_head.  */
@@ -97,18 +112,11 @@ extern const gdb_byte *read_comp_unit_head
    The contents of the header are stored in HEADER.
    The result is a pointer to the start of the first DIE.  */
 extern const gdb_byte *read_and_check_comp_unit_head
-  (struct dwarf2_per_objfile *dwarf2_per_objfile,
+  (dwarf2_per_objfile *per_objfile,
    struct comp_unit_head *header,
    struct dwarf2_section_info *section,
    struct dwarf2_section_info *abbrev_section,
    const gdb_byte *info_ptr,
    rcuh_kind section_kind);
 
-/* Read an offset from the data stream.  The size of the offset is
-   given by cu_header->offset_size.  */
-
-extern LONGEST read_offset (bfd *abfd, const gdb_byte *buf,
-                           const struct comp_unit_head *cu_header,
-                           unsigned int *bytes_read);
-
 #endif /* GDB_DWARF2_COMP_UNIT_H */
This page took 0.024892 seconds and 4 git commands to generate.