[PATCH] D94670: [DebugInfo][NFC] add a new DIE type to represent label + offset

ChenZheng via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Feb 1 06:02:46 PST 2021


shchenz added a comment.

In D94670#2533394 <https://reviews.llvm.org/D94670#2533394>, @ikudrin wrote:

> In D94670#2532465 <https://reviews.llvm.org/D94670#2532465>, @hubert.reinterpretcast wrote:
>
>> In D94670#2531880 <https://reviews.llvm.org/D94670#2531880>, @ikudrin wrote:
>>
>>> Is it possible to use a .set pseudo-op <https://www.ibm.com/support/knowledgecenter/en/ssw_aix_72/assembler/idalangref_set_pseudoop.html> to define a symbol that can be referenced from other sections?
>>
>> See https://reviews.llvm.org/D94670#2501150. It seems to work. Do you have a suggestion on how to make use of it from the MC layer here?
>
> If it works, it can probably be used in `MCContext::getXCOFFSection()` to create `Begin` symbols for DWARF sections except for `XCOFF::SSUBTYP_DWABREV`. If I understand it right, that should eliminate the need for platform-specific calculating of offsets in the general code, as well as for the new `DIELabelPlusOffset` class, and for `emitLabelPlusOffset()` to handle negative offsets.

Thanks for your comments @ikudrin and also the good comments for D95518 <https://reviews.llvm.org/D95518> (I am working on it right now).

For the begin symbol change in `MCContext::getXCOFFSection()`, since `getXCOFFSection` is not MCStreamer type aware, if I create a `.dwline` symbol as `.set L...dwline, L...dwline.tmp-12` in `MCContext`, will it impact the object mode debug_line section generation? For object mode, I still want to generate the debug unit length in the debug line header.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D94670



More information about the llvm-commits mailing list