Xing GUO via llvm-dev
2020-May-20 13:38 UTC
[llvm-dev] RFC: Add DWARF support for yaml2obj
Hi folks, I am going to implement DWARF support for yaml2obj. I really appreciate it that many of you have given me a lot of useful comments and suggestions in the previous thread [1]. I've had some offline discussions with James and done some updates to the previous proposal. This proposal addresses the issue of properly describing the DWARF sections in YAML both at a high level and at a low level. We add some extra value types (Tag/Value/Address/String) in the "debug_info" entry, which helps describe the DWARF sections at a high level by providing the logical structure of the DIEs. "yaml2obj" will traverse these DIEs and emit other debug sections properly. We are also able to hand-craft debug sections at a low level by hardcoding the contents, offsets, values, etc. Here's the proposal [2] which gives a brief introduction to the DWARF YAML. Any thoughts on that? Thanks in advance! ---------- [1] https://lists.llvm.org/pipermail/llvm-dev/2020-March/140518.html [2] https://docs.google.com/document/d/13wNr4JbXtzaOly-UsFt7vxI3LKXzik_lVU58ICqslWM/edit?usp=sharing -- Cheers, Xing
Adrian Prantl via llvm-dev
2020-May-20 16:21 UTC
[llvm-dev] RFC: Add DWARF support for yaml2obj
I think the example looks like it would be really useful for many categories of testcases! Will it still be possible to manually specify the .debug_abbrev section when this is desired after you are done? -- adrian
Xing GUO via llvm-dev
2020-May-21 08:47 UTC
[llvm-dev] RFC: Add DWARF support for yaml2obj
On 5/21/20, Adrian Prantl <aprantl at apple.com> wrote:> I think the example looks like it would be really useful for many categories > of testcases! > Will it still be possible to manually specify the .debug_abbrev section when > this is desired after you are done?Yes, I think it works. There are two ways to edit the .debug_abbrev section. i) Edit the "Attr:" and "Form:" entries of a DIE in the ".debug_info" section. This controls the generation of the ".debug_abbrev" section at a high level since "yaml2obj" generates the ".debug_abbrev" section according to the contents from debug information entries. ii) Edit the ".debug_abbrev" directly. This controls the generation of the ".debug_abbrev" section at a low level. We will have to hardcode the tag and attributes for each DIE. Editing the section in this way doesn't need a "debug_info" entry in the "DWARF". Additionally, if we have the "debug_info" entry and the "debug_abbrev" entry at the same time, the latter one will overwrite the tags and attributes generated by the former one. Does it make sense? -- Cheers, Xing
Maybe Matching Threads
- RFC: Add DWARF support for yaml2obj
- [LLVMdev] [lldb-dev] How is variable info retrieved in debugging for executables generated by llvm backend?
- RFC: Add DWARF support for yaml2obj
- [yaml2obj] GSoC-20: Add DWARF support to yaml2obj
- [LLVMdev] [lldb-dev] How is variable info retrieved in debugging for executables generated by llvm backend?