#ifndef DebugBase_dwarf_h_
#define DebugBase_dwarf_h_
#include <stdint.h>
#include <stdbool.h>
#include "llvm/Support/Dwarf.h"
using namespace llvm::dwarf;
typedef uint32_t dw_uleb128_t;
typedef int32_t dw_sleb128_t;
typedef uint16_t dw_attr_t;
typedef uint8_t dw_form_t;
typedef uint16_t dw_tag_t;
typedef uint64_t dw_addr_t;
#ifdef DWARFUTILS_DWARF64
#define DWARF_REF_ADDR_SIZE 8
typedef uint64_t dw_offset_t; #else
#define DWARF_REF_ADDR_SIZE 4
typedef uint32_t dw_offset_t; #endif
#define DW_INVALID_ADDRESS (~(dw_addr_t)0)
#define DW_INVALID_OFFSET (~(dw_offset_t)0)
#define DW_INVALID_INDEX 0xFFFFFFFFul
#define DW_EH_PE_MASK_ENCODING 0x0F
#define DW_OP_APPLE_array_ref 0xEE // first pops index, then pops array; pushes array[index]
#define DW_OP_APPLE_extern 0xEF // ULEB128 index of external object (i.e., an entity from the program that was used in the expression)
#define DW_OP_APPLE_uninit 0xF0
#define DW_OP_APPLE_assign 0xF1 // pops value off and assigns it to second item on stack (2nd item must have assignable context)
#define DW_OP_APPLE_address_of 0xF2 // gets the address of the top stack item (top item must be a variable, or have value_type that is an address already)
#define DW_OP_APPLE_value_of 0xF3 // pops the value off the stack and pushes the value of that object (top item must be a variable, or expression local)
#define DW_OP_APPLE_deref_type 0xF4 // gets the address of the top stack item (top item must be a variable, or a clang type)
#define DW_OP_APPLE_expr_local 0xF5 // ULEB128 expression local index
#define DW_OP_APPLE_constf 0xF6 // 1 byte float size, followed by constant float data
#define DW_OP_APPLE_scalar_cast 0xF7 // Cast top of stack to 2nd in stack's type leaving all items in place
#define DW_OP_APPLE_clang_cast 0xF8 // pointer size clang::Type * off the stack and cast top stack item to this type
#define DW_OP_APPLE_clear 0xFE // clears the entire expression stack, ok if the stack is empty
#define DW_OP_APPLE_error 0xFF // Stops expression evaluation and returns an error (no args)
#endif // DebugBase_dwarf_h_