[PATCH] D103549: [POC] Put annotation strings into debuginfo.

2021-06-02 Thread Yonghong Song via Phabricator via cfe-commits
yonghong-song added a comment. @dblaikie Thanks for the pointer! I will work on the new patch, starting with DW_AT_BTF_annotation (to limit the scope where annotations will be processed) and post a new patch soon. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://revie

[PATCH] D103549: [POC] Put annotation strings into debuginfo.

2021-06-02 Thread Alexei Starovoitov via Phabricator via cfe-commits
ast added a comment. > Yep LLVM does have some custom attributes and such, eg: > https://github.com/llvm/llvm-project/blob/effb87dfa810a28e763f914fe3e6e984782cc846/llvm/include/llvm/BinaryFormat/Dwarf.def#L592 This is great insight! That should work. We need to make sure that DW_AT_LLVM_annotat

[PATCH] D103549: [POC] Put annotation strings into debuginfo.

2021-06-02 Thread David Blaikie via Phabricator via cfe-commits
dblaikie added a comment. In D103549#2794462 , @yonghong-song wrote: >> As for supporting it in DWARF, probably with a custom attribute >> (DW_AT_BTF_annotation? (or "LLVM" instead of "BTF" perhaps, I'm not sure)) >> with a standard form (DW_FORM_strp/

[PATCH] D103549: [POC] Put annotation strings into debuginfo.

2021-06-02 Thread Yonghong Song via Phabricator via cfe-commits
yonghong-song added a comment. > As for supporting it in DWARF, probably with a custom attribute > (DW_AT_BTF_annotation? (or "LLVM" instead of "BTF" perhaps, I'm not sure)) > with a standard form (DW_FORM_strp/strxN/etc - the usual way we emit strings). This is a good idea. Could you give some

[PATCH] D103549: [POC] Put annotation strings into debuginfo.

2021-06-02 Thread David Blaikie via Phabricator via cfe-commits
dblaikie added a comment. Generally arbitrary strings are best avoided where possible owing to lack of structure, type safety, semantics, etc. But they might be suitable here since they're opaque to everything from the frontend to the backend. As for supporting it in DWARF, probably with a cust

[PATCH] D103549: [POC] Put annotation strings into debuginfo.

2021-06-02 Thread Yonghong Song via Phabricator via cfe-commits
yonghong-song created this revision. yonghong-song added a project: debug-info. Herald added subscribers: dexonsmith, pengfei, JDevlieghere, hiraditya, kristof.beyls, mgorny. yonghong-song requested review of this revision. Herald added projects: clang, LLVM. Herald added subscribers: llvm-commits