[llvm-bugs] [Bug 44288] New: Consider hiding __beginN / __endN / __rangeN range-based for variables from debug info

via llvm-bugs llvm-bugs at lists.llvm.org
Thu Dec 12 14:05:10 PST 2019


            Bug ID: 44288
           Summary: Consider hiding __beginN / __endN / __rangeN
                    range-based for variables from debug info
           Product: clang
           Version: 8.0
          Hardware: PC
                OS: Windows NT
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: LLVM Codegen
          Assignee: unassignedclangbugs at nondot.org
          Reporter: rnk at google.com
                CC: llvm-bugs at lists.llvm.org, neeilans at live.com,
                    richard-llvm at metafoo.co.uk

I was debugging something in windbg and I saw this:

0:000> dx
/t /v
<unavailable>     class lld::coff::`anonymous namespace'::PDBLinker * this =
<value unavailable>
<unavailable>     class lld::coff::ObjFile * file = <value unavailable>
<unavailable>     struct lld::coff::CVIndexMap * externIndexMap = <value
0000007b`3e58bee0 struct lld::coff::CVIndexMap objectIndexMap = struct
0000007b`3e58c2a0 class llvm::Expected<const lld::coff::CVIndexMap &>
indexMapResult = class llvm::Expected<const lld::coff::CVIndexMap &>
0000007b`3e58bed0 struct lld::ScopedTimer t = struct lld::ScopedTimer
0000007b`3e58c190 class lld::coff::`anonymous namespace'::DebugSHandler dsh =
class lld::coff::`anonymous namespace'::DebugSHandler
<unavailable>     class llvm::pdb::DbiStreamBuilder * dbiBuilder = <value
<unavailable>     class lld::coff::SectionChunk ** __end2 = <value unavailable>
<unavailable>     class lld::coff::SectionChunk ** __begin2 = <value
<unavailable>     class llvm::ArrayRef<lld::coff::SectionChunk *> * __range2 =
<value unavailable>
<unavailable>     class lld::coff::SectionChunk * debugChunk = <value
<unavailable>     class llvm::FixedStreamArray<llvm::object::FpoData>
fpoRecords = <value unavailable>
<unavailable>     class llvm::BinaryStreamReader reader = <value unavailable>
<unavailable>     class llvm::ArrayRef<unsigned char> relocatedDebugContents =
<value unavailable>
<unavailable>     unsigned int count = <value unavailable>
<unavailable>     class llvm::FixedStreamArrayIterator<llvm::object::FpoData>
__begin4 = <value unavailable>
<unavailable>     class llvm::FixedStreamArrayIterator<llvm::object::FpoData>
__end4 = <value unavailable>
<unavailable>     class llvm::FixedStreamArray<llvm::object::FpoData> *
__range4 = <value unavailable>

Some of these variables are compiler synthesized and therefore uninteresting.
We should consider mot emitting debug info for them in the first place.

Alternatively, we could try mixing in scopes in our optimized debug info output
to hide some of these variables, which are not actually in scope at this point
in the program.

I am stopped at the mergeDebugT call here in LLD:

You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20191212/0d40a0d9/attachment.html>

More information about the llvm-bugs mailing list