1 //===-- DWARFDebugArangeSet.h -----------------------------------*- C++ -*-===//
3 // The LLVM Compiler Infrastructure
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
10 #ifndef LLVM_DEBUGINFO_DWARFDEBUGARANGESET_H
11 #define LLVM_DEBUGINFO_DWARFDEBUGARANGESET_H
13 #include "llvm/ADT/iterator_range.h"
14 #include "llvm/Support/DataExtractor.h"
21 class DWARFDebugArangeSet {
24 // The total length of the entries for that set, not including the length
27 // The offset from the beginning of the .debug_info section of the
28 // compilation unit entry referenced by the table.
30 // The DWARF version number.
32 // The size in bytes of an address on the target architecture. For segmented
33 // addressing, this is the size of the offset portion of the address.
35 // The size in bytes of a segment descriptor on the target architecture.
36 // If the target system uses a flat address space, this value is 0.
43 uint64_t getEndAddress() const { return Address + Length; }
47 typedef std::vector<Descriptor> DescriptorColl;
48 typedef iterator_range<DescriptorColl::const_iterator> desc_iterator_range;
52 DescriptorColl ArangeDescriptors;
55 DWARFDebugArangeSet() { clear(); }
57 bool extract(DataExtractor data, uint32_t *offset_ptr);
58 void dump(raw_ostream &OS) const;
60 uint32_t getCompileUnitDIEOffset() const { return HeaderData.CuOffset; }
62 desc_iterator_range descriptors() const {
63 return desc_iterator_range(ArangeDescriptors.begin(),
64 ArangeDescriptors.end());
66 uint32_t getNumDescriptors() const { return ArangeDescriptors.size(); }