1 //===-- DWARFDataExtractor.cpp ----------------------------------*- 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 #include "DWARFDataExtractor.h"
12 namespace lldb_private {
15 DWARFDataExtractor::GetDWARFInitialLength(lldb::offset_t *offset_ptr) const
17 uint64_t length = GetU32(offset_ptr);
18 m_is_dwarf64 = (length == UINT32_MAX);
20 length = GetU64(offset_ptr);
25 DWARFDataExtractor::GetDWARFOffset(lldb::offset_t *offset_ptr) const
27 return GetMaxU64(offset_ptr, m_is_dwarf64 ? 8 : 4);