aboutsummaryrefslogtreecommitdiff
path: root/lldb/include/lldb/Core/dwarf.h
blob: 968418e71c2f3b67ac9b50002c8e41401530d93d (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
//===-- dwarf.h -------------------------------------------------*- C++ -*-===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef LLDB_CORE_DWARF_H
#define LLDB_CORE_DWARF_H

#include "lldb/Utility/RangeMap.h"
#include <cstdint>

// Get the DWARF constant definitions from llvm
#include "llvm/BinaryFormat/Dwarf.h"

// and stuff them in our default namespace
using namespace llvm::dwarf;

typedef uint32_t dw_uleb128_t;
typedef int32_t dw_sleb128_t;
typedef uint16_t dw_attr_t;
typedef uint16_t dw_form_t;
typedef llvm::dwarf::Tag dw_tag_t;
typedef uint64_t dw_addr_t; // Dwarf address define that must be big enough for
                            // any addresses in the compile units that get
                            // parsed

typedef uint32_t dw_offset_t; // Dwarf Debug Information Entry offset for any
                              // offset into the file

/* Constants */
#define DW_INVALID_OFFSET (~(dw_offset_t)0)
#define DW_INVALID_INDEX 0xFFFFFFFFul

// #define DW_ADDR_none 0x0

#define DW_EH_PE_MASK_ENCODING 0x0F

typedef lldb_private::RangeVector<dw_addr_t, dw_addr_t, 2> DWARFRangeList;

#endif // LLDB_CORE_DWARF_H