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/Support/DataExtractor.h"
20 class DWARFDebugArangeSet {
23 // The total length of the entries for that set, not including the length
26 // The offset from the beginning of the .debug_info section of the
27 // compilation unit entry referenced by the table.
29 // The DWARF version number.
31 // The size in bytes of an address on the target architecture. For segmented
32 // addressing, this is the size of the offset portion of the address.
34 // The size in bytes of a segment descriptor on the target architecture.
35 // If the target system uses a flat address space, this value is 0.
42 uint64_t getEndAddress() const { return Address + Length; }
46 typedef std::vector<Descriptor> DescriptorColl;
47 typedef DescriptorColl::const_iterator DescriptorConstIter;
51 DescriptorColl ArangeDescriptors;
54 DWARFDebugArangeSet() { clear(); }
56 bool extract(DataExtractor data, uint32_t *offset_ptr);
57 void dump(raw_ostream &OS) const;
59 uint32_t getCompileUnitDIEOffset() const { return HeaderData.CuOffset; }
60 uint32_t getNumDescriptors() const { return ArangeDescriptors.size(); }
61 const Descriptor *getDescriptor(uint32_t i) const {
62 if (i < ArangeDescriptors.size())
63 return &ArangeDescriptors[i];