[PATCH] D80203: [ObjectYAML][DWARF] Add DWARF entry in ELFYAML.

Xing GUO via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu May 21 21:05:54 PDT 2020


Higuoxing updated this revision to Diff 265664.
Higuoxing added a comment.

Thanks for reviewing and giving me useful suggestions.

---------

Addressed comments.

- Get rid of unimplemented debug sections in `getUsedSectionNames()`, so that we don't need to process them in `initImplicitSections()`.
- Use `generateContentsFromDWARFEntry()` to generate section contents from "DWARF" entry. If the contents are successfully generated for "DWARF" entry, it returns true, otherwise, it returns false.
- Use `llvm-readelf` in tests.
- Remove test for .debug_info section. ("debug_info" entry can be parsed, but will not be emitted.)
- Add tests
  - c) Generate the .debug_str section when the "Size" is specified.
  - d) Test that yaml2obj emits an error message when both the "Size" and the "debug_str" entry at the same time.
  - e) Test that yaml2obj emits an error message when both the "Content" and the "debug_str" entry at the same time.
  - f) Test that all the properties can be overriden by the section header when the "debug_str" entry is used.
  - g) Test that all the properties can be overriden by the section header when the "debug_str" entry doesn't exist.
  - h) Check the default values of sh_entsize, sh_flags, sh_info and sh_addralign when the "debug_str" entry doesn't exist.
  - i) Set the address for the .debug_str section when the "debug_str" entry exists.
  - j) Set the address for the .debug_str section when the "debug_str" doesn't exists.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D80203

Files:
  llvm/include/llvm/ObjectYAML/DWARFYAML.h
  llvm/include/llvm/ObjectYAML/ELFYAML.h
  llvm/lib/ObjectYAML/DWARFYAML.cpp
  llvm/lib/ObjectYAML/ELFEmitter.cpp
  llvm/lib/ObjectYAML/ELFYAML.cpp
  llvm/test/tools/yaml2obj/ELF/DWARF/debug-str.yaml

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D80203.265664.patch
Type: text/x-patch
Size: 13498 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200522/1621b802/attachment.bin>


More information about the llvm-commits mailing list