[llvm-bugs] [Bug 35892] New: Global variable always appears null

via llvm-bugs llvm-bugs at lists.llvm.org
Wed Jan 10 11:05:49 PST 2018


https://bugs.llvm.org/show_bug.cgi?id=35892

            Bug ID: 35892
           Summary: Global variable always appears null
           Product: libraries
           Version: trunk
          Hardware: PC
                OS: Windows NT
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: DebugInfo
          Assignee: unassignedbugs at nondot.org
          Reporter: zturner at google.com
                CC: amccarth at google.com, llvm-bugs at lists.llvm.org,
                    llvm at inglorion.net, rnk at google.com

Generate CMake like this:

cmake -G Ninja -DLLVM_ENABLE_PROJECTS="clang;lld" -DLLVM_TARGETS_TO_BUILD=X86
-DCMAKE_BUILD_TYPE=Debug
-DCMAKE_C_COMPILER=D:/src/llvmbuild/cl/Release/x64/bin/clang-cl.exe
-DCMAKE_CXX_COMPILER=D:/src/llvmbuild/cl/Release/x64/bin/clang-cl.exe
..\..\..\..\llvm-mono\llvm

This self-hosts using clang + msvc linker.  

Now debug lld in Visual Studio, putting a breakpoint in Writer::run().  On the
first line, try to print the value of `Config`.  It says the value is null. 
However, it's obvious from inspecting the code that the value cannot possibly
be null or else the program would crash.  So we have some bad debug info here.

-- 
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/20180110/3b2cc399/attachment-0001.html>


More information about the llvm-bugs mailing list