[PATCH] D41827: [DEBUG] Initial adaptation of NVPTX target for debug info emission.

Alexey Bataev via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jan 19 08:17:45 PST 2018


ABataev added inline comments.


================
Comment at: lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp:760
+    const TargetLoweringObjectFile &TLOF = Asm->getObjFileLowering();
+    if (DD->useSectionsAsReferences()) {
+      LabelBegin = TLOF.getDwarfInfoSection()->getBeginSymbol();
----------------
ABataev wrote:
> echristo wrote:
> > So there's a difference between a begin symbol for a section and the section itself. You're doing the former and not the latter it looks like? And also I think you're breaking the possibility of multiple cus in a single module.
> I checked it, multiple CUs are handled correctly. But the reference to CU is generated as `.b64 .debug_info+offset`, which is supported by PTX. Don't forget, that PTX format is very limited in support of DWARF sections and we will genarte only `.debug_abbrevs` and `.debug_info` sections.
After some thoughts, I realized that generally speaking, you're correct here. We need an additional offset for the compilation unit. I 'll fix this.


Repository:
  rL LLVM

https://reviews.llvm.org/D41827





More information about the llvm-commits mailing list