[obj2yaml] Stop parsing the debug_str section when it encounters a string without...
authorXing GUO <higuoxing@gmail.com>
Tue, 8 Sep 2020 08:08:42 +0000 (16:08 +0800)
committerXing GUO <higuoxing@gmail.com>
Tue, 8 Sep 2020 08:09:36 +0000 (16:09 +0800)
commit3cda69872362526b1672ae23de4ac968b7564c2b
treef3da2c9394bd02b38de63f7b066bd751536eb408
parent69230e75f120141979248becac30ceaca4ab2e87
[obj2yaml] Stop parsing the debug_str section when it encounters a string without the null terminator.

When obj2yaml encounters a string without the null terminator, it should
stop parsing the debug_str section. This patch addresses comments in
[D86867](https://reviews.llvm.org/D86867#inline-803291).

Reviewed By: jhenderson

Differential Revision: https://reviews.llvm.org/D87261
llvm/test/ObjectYAML/MachO/DWARF-debug_str.yaml
llvm/test/tools/obj2yaml/ELF/DWARF/debug-str.yaml
llvm/tools/obj2yaml/dwarf2yaml.cpp
llvm/tools/obj2yaml/elf2yaml.cpp
llvm/tools/obj2yaml/macho2yaml.cpp
llvm/tools/obj2yaml/obj2yaml.h