[PATCH] D34127: Make obj2yaml and yaml2obj support .debug$S and .debug$T sections

Zachary Turner via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jun 13 08:56:39 PDT 2017


zturner added inline comments.


================
Comment at: lld/test/COFF/Inputs/pdb1.yaml:33-34
+              Version:         'Microsoft (R) Optimizing Compiler'
+      - !Symbols
+        Records:         
+          - Kind:            S_GPROC32_ID
----------------
rnk wrote:
> Is there a way we can fold !Symbols and Records: together? They're both plural, but !Symbols always consists of a list of records.
Looked into this and while I think it's technically supported by the YAML spec (What goes under a tag is defined to be "application specific", so I guess it could be anything, and [[ http://www.yaml.org/spec/1.2/spec.html#id2761292 | example 2.24 ]] even seems to be an exact match for what we want to do (e.g. the `!shape` tag followed immediately by a list)), I don't think our YAML parser supports it.  In order to map a block sequence, we have to give it a name.  The specification for [[ http://www.yaml.org/spec/1.2/spec.html#style/block/sequence | block sequences ]] doesn't seem to require that a block sequence have a name, but otoh the syntax used in the yaml spec is hard to make sense of, so maybe I missed something.

TL;DR - Probably could do it, but non-trivial.


https://reviews.llvm.org/D34127





More information about the llvm-commits mailing list