1 //===-- DWARFDataExtractor.h ------------------------------------*- C++ -*-===//
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
7 //===----------------------------------------------------------------------===//
9 #ifndef liblldb_DWARFDataExtractor_h_
10 #define liblldb_DWARFDataExtractor_h_
12 #include "lldb/Core/dwarf.h"
13 #include "lldb/Utility/DataExtractor.h"
14 #include "llvm/DebugInfo/DWARF/DWARFDataExtractor.h"
16 namespace lldb_private {
18 class DWARFDataExtractor : public DataExtractor {
20 DWARFDataExtractor() = default;
22 DWARFDataExtractor(const DWARFDataExtractor &data, lldb::offset_t offset,
23 lldb::offset_t length)
24 : DataExtractor(data, offset, length) {}
26 uint64_t GetDWARFInitialLength(lldb::offset_t *offset_ptr) const;
28 dw_offset_t GetDWARFOffset(lldb::offset_t *offset_ptr) const;
30 size_t GetDWARFSizeofInitialLength() const { return 4; }
31 size_t GetDWARFSizeOfOffset() const { return 4; }
33 llvm::DWARFDataExtractor GetAsLLVM() const;
37 #endif // liblldb_DWARFDataExtractor_h_