[all-commits] [llvm/llvm-project] 67ce11: [llvm-dwarfdump] Warn user when it encounters no n...

Xing GUO via All-commits all-commits at lists.llvm.org
Wed Sep 2 17:51:01 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 67ce11405b08609afb35e218ed7d28ef5e16a55f
      https://github.com/llvm/llvm-project/commit/67ce11405b08609afb35e218ed7d28ef5e16a55f
  Author: Xing GUO <higuoxing at gmail.com>
  Date:   2020-09-03 (Thu, 03 Sep 2020)

  Changed paths:
    M llvm/lib/DebugInfo/DWARF/DWARFContext.cpp
    M llvm/test/tools/llvm-dwarfdump/debug-str.yaml

  Log Message:
  -----------
  [llvm-dwarfdump] Warn user when it encounters no null terminated strings.

When llvm-dwarfdump encounters no null terminated strings, we should
warn user about it rather than ignore it and print nothing.

Before this patch, when llvm-dwarfdump dumps a .debug_str section whose
content is "abc", it prints:

```
.debug_str contents:
```

After this patch:

```
.debug_str contents:
warning: no null terminated string at offset 0x0
```

Reviewed By: jhenderson, MaskRay

Differential Revision: https://reviews.llvm.org/D86998




More information about the All-commits mailing list