28 uint8_t flags = debug_macro_data.
GetU8(offset);
47 uint8_t entry_count = debug_macro_data.
GetU8(offset);
48 for (uint8_t i = 0; i < entry_count; i++) {
50 debug_macro_data.
GetU8(offset);
52 uint64_t operand_count = debug_macro_data.
GetULEB128(offset);
54 for (uint64_t j = 0; j < operand_count; j++) {
56 debug_macro_data.
GetU8(offset);
66 llvm::dwarf::MacroEntryType type =
67 static_cast<llvm::dwarf::MacroEntryType
>(debug_macro_data.
GetU8(offset));
71 const char *macro_str =
nullptr;
72 uint32_t debug_line_file_idx = 0;
78 macro_str = debug_macro_data.
GetCStr(offset);
79 if (type == DW_MACRO_define)
80 debug_macros_sp->AddMacroEntry(
83 debug_macros_sp->AddMacroEntry(
86 case DW_MACRO_define_strp:
87 case DW_MACRO_undef_strp:
90 str_offset = debug_macro_data.
GetU64(offset);
92 str_offset = debug_macro_data.
GetU32(offset);
93 macro_str = debug_str_data.
GetCStr(&str_offset);
94 if (type == DW_MACRO_define_strp)
95 debug_macros_sp->AddMacroEntry(
98 debug_macros_sp->AddMacroEntry(
101 case DW_MACRO_start_file:
103 debug_line_file_idx = debug_macro_data.
GetULEB128(offset);
104 debug_macros_sp->AddMacroEntry(
107 case DW_MACRO_end_file:
111 case DW_MACRO_import:
112 if (offset_is_64_bit)
113 new_offset = debug_macro_data.
GetU64(offset);
115 new_offset = debug_macro_data.
GetU32(offset);
125 type =
static_cast<llvm::dwarf::MacroEntryType
>(
126 debug_macro_data.
GetU8(offset));
static DebugMacroEntry CreateIndirectEntry(const DebugMacrosSP &debug_macros_sp)
static DebugMacroEntry CreateEndFileEntry()
static DebugMacroEntry CreateUndefEntry(uint32_t line, const char *str)
static DebugMacroEntry CreateDefineEntry(uint32_t line, const char *str)
static DebugMacroEntry CreateStartFileEntry(uint32_t line, uint32_t debug_line_file_idx)
static void ReadMacroEntries(const DWARFDataExtractor &debug_macro_data, const DWARFDataExtractor &debug_str_data, const bool offset_is_64_bit, lldb::offset_t *sect_offset, SymbolFileDWARF *sym_file_dwarf, DebugMacrosSP &debug_macros_sp)
bool ParseDebugMacros(CompileUnit &comp_unit) override
A class that represents a running process on the host machine.
std::shared_ptr< DebugMacros > DebugMacrosSP