27 uint8_t flags = debug_macro_data.
GetU8(offset);
46 uint8_t entry_count = debug_macro_data.
GetU8(offset);
47 for (uint8_t i = 0; i < entry_count; i++) {
49 debug_macro_data.
GetU8(offset);
51 uint64_t operand_count = debug_macro_data.
GetULEB128(offset);
53 for (uint64_t j = 0; j < operand_count; j++) {
55 debug_macro_data.
GetU8(offset);
65 llvm::dwarf::MacroEntryType type =
66 static_cast<llvm::dwarf::MacroEntryType
>(debug_macro_data.
GetU8(offset));
70 const char *macro_str =
nullptr;
77 macro_str = debug_macro_data.
GetCStr(offset);
78 if (type == DW_MACRO_define)
79 debug_macros_sp->AddMacroEntry(
82 debug_macros_sp->AddMacroEntry(
85 case DW_MACRO_define_strp:
86 case DW_MACRO_undef_strp:
89 str_offset = debug_macro_data.
GetU64(offset);
91 str_offset = debug_macro_data.
GetU32(offset);
92 macro_str = debug_str_data.
GetCStr(&str_offset);
93 if (type == DW_MACRO_define_strp)
94 debug_macros_sp->AddMacroEntry(
97 debug_macros_sp->AddMacroEntry(
100 case DW_MACRO_start_file:
102 debug_line_file_idx = debug_macro_data.
GetULEB128(offset);
103 debug_macros_sp->AddMacroEntry(
106 case DW_MACRO_end_file:
110 case DW_MACRO_import:
111 if (offset_is_64_bit)
112 new_offset = debug_macro_data.
GetU64(offset);
114 new_offset = debug_macro_data.
GetU32(offset);
124 type =
static_cast<llvm::dwarf::MacroEntryType
>(
125 debug_macro_data.
GetU8(offset));
static void ReadMacroEntries(const lldb_private::DWARFDataExtractor &debug_macro_data, const lldb_private::DWARFDataExtractor &debug_str_data, const bool offset_is_64_bit, lldb::offset_t *sect_offset, SymbolFileDWARF *sym_file_dwarf, lldb_private::DebugMacrosSP &debug_macros_sp)
bool ParseDebugMacros(lldb_private::CompileUnit &comp_unit) override
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)
A class that represents a running process on the host machine.
std::shared_ptr< DebugMacros > DebugMacrosSP