[PATCH] D78782: Add .debug_ranges support to the DWARF YAML.

Greg Clayton via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Apr 27 19:24:53 PDT 2020


clayborg marked 3 inline comments as done.
clayborg added a comment.

In D78782#2004682 <https://reviews.llvm.org/D78782#2004682>, @jhenderson wrote:

> Does this patch add support in yaml2obj for debug_ranges (I get a bit lost as to what point this happens)? If it is newly supported, it should be tested in a yaml2obj test too.


Already take care of with the test I added:

  # RUN: yaml2obj %s | obj2yaml | FileCheck %s

I was looking around to see how the existing DWARF yaml code was tested and didn't find any great examples that split things up this way.



================
Comment at: llvm/test/tools/obj2yaml/macho-DWARF-debug-ranges.yaml:1
+# Test that yaml2obj and obj2yaml can create mach-o files with valid
+# __debug_ranges section.
----------------
jhenderson wrote:
> Something I'm trying to encourage where possible is to use '##' for comments in lit tests, as it makes the comments stand out from the functional parts of the test (lit and FileCheck run lines). You'll see that practice in many newer tests for obj2yaml/yaml2obj etc.
will do


================
Comment at: llvm/test/tools/obj2yaml/macho-DWARF-debug-ranges.yaml:13
+#                  [0x0000000000000000, 0x0000000000000030)
+#                  [0x0000000000001000, 0x0000000000002000))
+#               DW_AT_stmt_list   (0x00000000)
----------------
jhenderson wrote:
> It might be a good idea to add a test case for a base selection entry, with the first "address" being 0xffffffffffffffff, and then confirm that obj2yaml/yaml2obj can handle it and subsequent entries (or emit a sensible error if not).
good idea


================
Comment at: llvm/test/tools/obj2yaml/macho-DWARF-debug-ranges.yaml:32
+# 0x00000059:   NULL
+
+# RUN: yaml2obj %s | obj2yaml | FileCheck %s
----------------
Gotcha, I can do that


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D78782





More information about the llvm-commits mailing list