This is an archive of the discontinued LLVM Phabricator instance.

[DWARFYAML] Add support for emitting custom range list content.
ClosedPublic

Authored by Higuoxing on Jul 26 2020, 10:52 PM.

Details

Summary

This patch adds support for emitting custom range list content.

We are able to handcraft a custom range list via the following syntax.

debug_rnglists:
  - Lists:
      - Entries:
          - Operator: DW_RLE_startx_endx
            Values:   [ 0x1234, 0x1234 ]
      - Content: '1234567890abcdef'
      - Content: 'abcdef1234567890'

Diff Detail

Event Timeline

Higuoxing created this revision.Jul 26 2020, 10:52 PM

Remove one check line to suppress errors on Windows platform.

Unsurprisingly, I like this. :) It's simple, and can be used by obj2yaml (I hope) to represent unparsable range lists.

llvm/lib/ObjectYAML/DWARFYAML.cpp
250–251

I'm not sure if there's anything wrong with this, but the docs seem to recommend using a validate method to do this kind of thing...

Higuoxing updated this revision to Diff 280818.Jul 27 2020, 1:47 AM
Higuoxing marked an inline comment as done.

Address comments.

Thanks for reviewing!

jhenderson accepted this revision.Jul 28 2020, 5:36 AM

I agree, this looks good. LGTM.

This revision is now accepted and ready to land.Jul 28 2020, 5:36 AM
This revision was landed with ongoing or failed builds.Jul 28 2020, 7:11 AM
This revision was automatically updated to reflect the committed changes.