1 //===-- DWARFDebugMacro.h ----------------------------------------*- C++
4 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
5 // See https://llvm.org/LICENSE.txt for license information.
6 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
8 //===----------------------------------------------------------------------===//
10 #ifndef SymbolFileDWARF_DWARFDebugMacro_h_
11 #define SymbolFileDWARF_DWARFDebugMacro_h_
15 #include "lldb/Core/dwarf.h"
16 #include "lldb/Symbol/DebugMacros.h"
17 #include "lldb/lldb-types.h"
19 namespace lldb_private {
21 class DWARFDataExtractor;
23 } // namespace lldb_private
25 class SymbolFileDWARF;
27 class DWARFDebugMacroHeader {
30 OFFSET_SIZE_MASK = 0x1,
31 DEBUG_LINE_OFFSET_MASK = 0x2,
32 OPCODE_OPERANDS_TABLE_MASK = 0x4
35 static DWARFDebugMacroHeader
36 ParseHeader(const lldb_private::DWARFDataExtractor &debug_macro_data,
37 lldb::offset_t *offset);
39 bool OffsetIs64Bit() const { return m_offset_is_64_bit; }
43 SkipOperandTable(const lldb_private::DWARFDataExtractor &debug_macro_data,
44 lldb::offset_t *offset);
47 bool m_offset_is_64_bit;
48 uint64_t m_debug_line_offset;
51 class DWARFDebugMacroEntry {
54 ReadMacroEntries(const lldb_private::DWARFDataExtractor &debug_macro_data,
55 const lldb_private::DWARFDataExtractor &debug_str_data,
56 const bool offset_is_64_bit, lldb::offset_t *sect_offset,
57 SymbolFileDWARF *sym_file_dwarf,
58 lldb_private::DebugMacrosSP &debug_macros_sp);
61 #endif // SymbolFileDWARF_DWARFDebugMacro_h_