diff options
author | Xing GUO <higuoxing@gmail.com> | 2020-09-08 16:08:42 +0800 |
---|---|---|
committer | Xing GUO <higuoxing@gmail.com> | 2020-09-08 16:09:36 +0800 |
commit | 3cda69872362526b1672ae23de4ac968b7564c2b (patch) | |
tree | f3da2c9394bd02b38de63f7b066bd751536eb408 /llvm/tools/obj2yaml/elf2yaml.cpp | |
parent | [flang] Convert release notes to markdown (diff) | |
download | llvm-project-3cda69872362526b1672ae23de4ac968b7564c2b.tar.gz llvm-project-3cda69872362526b1672ae23de4ac968b7564c2b.tar.bz2 llvm-project-3cda69872362526b1672ae23de4ac968b7564c2b.zip |
[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
Diffstat (limited to 'llvm/tools/obj2yaml/elf2yaml.cpp')
-rw-r--r-- | llvm/tools/obj2yaml/elf2yaml.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/tools/obj2yaml/elf2yaml.cpp b/llvm/tools/obj2yaml/elf2yaml.cpp index 9f524479bb04..264bc4d1dbf3 100644 --- a/llvm/tools/obj2yaml/elf2yaml.cpp +++ b/llvm/tools/obj2yaml/elf2yaml.cpp @@ -415,7 +415,7 @@ Optional<DWARFYAML::Data> ELFDumper<ELFT>::dumpDWARFSections( if (RawSec->Name == ".debug_aranges") Err = dumpDebugARanges(*DWARFCtx.get(), DWARF); else if (RawSec->Name == ".debug_str") - dumpDebugStrings(*DWARFCtx.get(), DWARF); + Err = dumpDebugStrings(*DWARFCtx.get(), DWARF); // If the DWARF section cannot be successfully parsed, emit raw content // instead of an entry in the DWARF section of the YAML. |