[PATCH] D86867: [obj2yaml] Add support for dumping the .debug_str section.

James Henderson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Sep 3 00:43:56 PDT 2020


jhenderson added inline comments.


================
Comment at: llvm/test/tools/obj2yaml/ELF/DWARF/debug-str.yaml:13
+# RUN:   FileCheck %s --check-prefixes=BASIC,COMMON \
+# RUN:     -DTYPE=STRTAB -DFLAGS="[ SHF_MERGE, SHF_STRINGS ]" -DADDRALIGN=0001 -DENTSIZE=0001
+
----------------
Here and in each other case, rather than having to put leading 0s in every value, you could switch to FileCheck numeric variables. I think the invocation is something like:

```
# RUN: FIleCheck ... -D#%x,ADDRALIGN=1
...
#  COMMON-NEXT:   AddressAlign: 0x[[#%.16x, ADDRALIGN]]
```


================
Comment at: llvm/tools/obj2yaml/elf2yaml.cpp:209
+      if (SecName == "debug_str")
+        return !(RawSec->EntSize && (uint64_t)*RawSec->EntSize == 1) ||
+               RawSec->Flags.getValueOr(ELFYAML::ELF_SHF(0)) !=
----------------
I'm struggling with this code. Under what circumstances can `RawSec->EntSize` by None here? Similar question for the Flags below.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D86867/new/

https://reviews.llvm.org/D86867



More information about the llvm-commits mailing list