1 //===-- DWARFDebugRangeList.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_DWARFDEBUGRANGELIST_H
11 #define LLVM_DEBUGINFO_DWARFDEBUGRANGELIST_H
13 #include "llvm/Support/DataExtractor.h"
20 class DWARFDebugRangeList {
22 struct RangeListEntry {
23 // A beginning address offset. This address offset has the size of an
24 // address and is relative to the applicable base address of the
25 // compilation unit referencing this range list. It marks the beginning
26 // of an address range.
27 uint64_t StartAddress;
28 // An ending address offset. This address offset again has the size of
29 // an address and is relative to the applicable base address of the
30 // compilation unit referencing this range list. It marks the first
31 // address past the end of the address range. The ending address must
32 // be greater than or equal to the beginning address.
37 // Offset in .debug_ranges section.
40 std::vector<RangeListEntry> Entries;
43 DWARFDebugRangeList() { clear(); }
45 void dump(raw_ostream &OS) const;
46 bool extract(DataExtractor data, uint32_t *offset_ptr);
51 #endif // LLVM_DEBUGINFO_DWARFDEBUGRANGELIST_H