[PATCH] D82073: [ObjectYAML][ELF] Add support for emitting the .debug_info section.

James Henderson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jun 18 02:41:53 PDT 2020


jhenderson added inline comments.


================
Comment at: llvm/test/tools/yaml2obj/ELF/DWARF/debug-info.yaml:190-191
+        TotalLength: 0x1234
+      Version:    5
+      UnitType:   DW_UT_type
+      AbbrOffset: 0x1234
----------------
You probably also want Version 4 and testing for different `UnitType` values.


================
Comment at: llvm/test/tools/yaml2obj/ELF/DWARF/debug-info.yaml:197
+          Values:
+            - Value: 0x1234 ## DW_FORM_addr
+            - BlockData:    ## DW_FORM_block2
----------------
To ensure there are no truncation issues, all these values probably should be the same width as their permissable data could be (e.g. 8 bytes for DW_FORM_data8, 4 for DW_FORM_data4 etc, so 0x1234567890abcdef, 0x12345678 etc).


================
Comment at: llvm/test/tools/yaml2obj/ELF/DWARF/debug-info.yaml:231
+                - 0x34
+            - Value: 0x1234 ## DW_FORM_flag_present (unimplemented)
+            - Value: 0x1234 ## DW_FORM_strx (unimplemented)
----------------
FWIW, DW_FORM_flag_present doesn't have a corresponding value in .debug_info, so maybe you can omit it from here. It probably needs leaving in the .debug_abbrev table though.


================
Comment at: llvm/test/tools/yaml2obj/ELF/DWARF/debug-info.yaml:456
+
+## g) Test that all the properties can be overridden by the section header when
+## the "debug_info" entry exists.
----------------
Higuoxing wrote:
> In order not to bring too much difficulty. The common tests are very similar to the tests in other DWARF sections, except this one. The property of the `.debug_abbrev` section is overridden as well in this test.
I'm not sure I follow. What's the point of overriding .debug_abbrev too? It will at least need explaining in a comment.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D82073





More information about the llvm-commits mailing list