Path: blob/main/contrib/llvm-project/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugMacro.h
39645 views
//===-- DWARFDebugMacro.h ----------------------------------------*- C++1//-*-===//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-exception6//7//===----------------------------------------------------------------------===//89#ifndef LLDB_SOURCE_PLUGINS_SYMBOLFILE_DWARF_DWARFDEBUGMACRO_H10#define LLDB_SOURCE_PLUGINS_SYMBOLFILE_DWARF_DWARFDEBUGMACRO_H1112#include <map>1314#include "lldb/Core/dwarf.h"15#include "lldb/Symbol/DebugMacros.h"16#include "lldb/lldb-types.h"1718namespace lldb_private {19class DWARFDataExtractor;20}2122namespace lldb_private::plugin {23namespace dwarf {24class SymbolFileDWARF;2526class DWARFDebugMacroHeader {27public:28enum HeaderFlagMask {29OFFSET_SIZE_MASK = 0x1,30DEBUG_LINE_OFFSET_MASK = 0x2,31OPCODE_OPERANDS_TABLE_MASK = 0x432};3334static DWARFDebugMacroHeader35ParseHeader(const DWARFDataExtractor &debug_macro_data,36lldb::offset_t *offset);3738bool OffsetIs64Bit() const { return m_offset_is_64_bit; }3940private:41static void SkipOperandTable(const DWARFDataExtractor &debug_macro_data,42lldb::offset_t *offset);4344uint16_t m_version = 0;45bool m_offset_is_64_bit = false;46uint64_t m_debug_line_offset = 0;47};4849class DWARFDebugMacroEntry {50public:51static void ReadMacroEntries(const DWARFDataExtractor &debug_macro_data,52const DWARFDataExtractor &debug_str_data,53const bool offset_is_64_bit,54lldb::offset_t *sect_offset,55SymbolFileDWARF *sym_file_dwarf,56DebugMacrosSP &debug_macros_sp);57};58} // namespace dwarf59} // namespace lldb_private::plugin6061#endif // LLDB_SOURCE_PLUGINS_SYMBOLFILE_DWARF_DWARFDEBUGMACRO_H626364