[lldb] Support zero-padding in formatter sections (#119934)

This commit is contained in:
Adrian Prantl
2024-12-13 16:09:31 -08:00
committed by GitHub
parent d015578961
commit f22cff7675
3 changed files with 37 additions and 8 deletions

View File

@@ -50,6 +50,13 @@ static void ForEachFormatterInModule(
uint8_t addr_size = section.getAddressSize();
llvm::DataExtractor::Cursor cursor(0);
while (cursor && cursor.tell() < section_size) {
while (cursor && cursor.tell() < section_size) {
// Skip over 0 padding.
if (section.getU8(cursor) == 0)
continue;
cursor.seek(cursor.tell() - 1);
break;
}
uint64_t version = section.getULEB128(cursor);
uint64_t record_size = section.getULEB128(cursor);
if (version == 1) {