xref: /llvm-project/lldb/include/lldb/Core/dwarf.h (revision fb8df8cb658278ceba9ef4b96e0b448aed32c1f6)
1 //===-- dwarf.h -------------------------------------------------*- C++ -*-===//
2 //
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 //
7 //===----------------------------------------------------------------------===//
8 
9 #ifndef LLDB_CORE_DWARF_H
10 #define LLDB_CORE_DWARF_H
11 
12 #include <cstdint>
13 
14 // Get the DWARF constant definitions from llvm
15 #include "llvm/BinaryFormat/Dwarf.h"
16 
17 namespace lldb_private {
18 namespace dwarf {
19   using namespace llvm::dwarf;
20 }
21 }
22 
23 typedef llvm::dwarf::Attribute dw_attr_t;
24 typedef llvm::dwarf::Form dw_form_t;
25 typedef llvm::dwarf::Tag dw_tag_t;
26 typedef uint64_t dw_addr_t; // Dwarf address define that must be big enough for
27                             // any addresses in the compile units that get
28                             // parsed
29 
30 typedef uint64_t dw_offset_t; // Dwarf Debug Information Entry offset for any
31                               // offset into the file
32 
33 /* Constants */
34 #define DW_DIE_OFFSET_MAX_BITSIZE 40
35 #define DW_INVALID_OFFSET (((uint64_t)1u << DW_DIE_OFFSET_MAX_BITSIZE) - 1)
36 #define DW_INVALID_INDEX 0xFFFFFFFFul
37 
38 // #define DW_ADDR_none 0x0
39 
40 #define DW_EH_PE_MASK_ENCODING 0x0F
41 
42 #endif // LLDB_CORE_DWARF_H
43