From: Xing GUO Date: Thu, 25 Jun 2020 00:06:56 +0000 (+0800) Subject: [DWARFYAML][debug_gnu_*] 'Descriptor' field should be 1-byte. NFC. X-Git-Tag: llvmorg-12-init~2021 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=93bc571d472dddc188b0d169af38dc3eff128bb6;p=platform%2Fupstream%2Fllvm.git [DWARFYAML][debug_gnu_*] 'Descriptor' field should be 1-byte. NFC. The 'Descriptor' field of .debug_gnu_pubnames and .debug_gnu_pubtypes section should be 1-byte rather than 4-byte. This patch helps resolve this issue. --- diff --git a/llvm/lib/ObjectYAML/DWARFEmitter.cpp b/llvm/lib/ObjectYAML/DWARFEmitter.cpp index f1b46d7..4f8fa73 100644 --- a/llvm/lib/ObjectYAML/DWARFEmitter.cpp +++ b/llvm/lib/ObjectYAML/DWARFEmitter.cpp @@ -191,7 +191,7 @@ Error DWARFYAML::emitPubSection(raw_ostream &OS, for (auto Entry : Sect.Entries) { writeInteger((uint32_t)Entry.DieOffset, OS, IsLittleEndian); if (Sect.IsGNUStyle) - writeInteger((uint32_t)Entry.Descriptor, OS, IsLittleEndian); + writeInteger((uint8_t)Entry.Descriptor, OS, IsLittleEndian); OS.write(Entry.Name.data(), Entry.Name.size()); OS.write('\0'); }