[llvm-bugs] [Bug 41839] New: clang produces debug info with wrong path with "-xassembler"

via llvm-bugs llvm-bugs at lists.llvm.org
Fri May 10 17:55:33 PDT 2019


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

            Bug ID: 41839
           Summary: clang produces debug info with wrong path with
                    "-xassembler"
           Product: clang
           Version: unspecified
          Hardware: PC
                OS: Windows NT
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: Driver
          Assignee: unassignedclangbugs at nondot.org
          Reporter: efriedma at quicinc.com
                CC: aprantl at apple.com, dblaikie at gmail.com,
                    llvm-bugs at lists.llvm.org, neeilans at live.com,
                    paul_robinson at playstation.sony.com,
                    richard-llvm at metafoo.co.uk

Steps to reproduce:

1. compile as assembler file to an object file, with the current directory
different from the directory containing the assembler file ("cd /; clang
-xassembler /some/path/foo.s -o /some/path/foo.o -c").
2. Run objdump -S; observe there is no interleaved assembly.
3. Repeat step 1, except use "-xassembler-with-cpp"
4. Run objdump -S; observe there is interleaved assembly.
5. Repeat step 1, except "cd" to the directory containing the assembler file
before invoking the compiler.
6. Run objdump -S; observe there is interleaved assembly.

I'm not sure I completely understand the issue; I'm not that familiar with
DWARF.  But I think what's happening is that we're not encoding the necessary
paths into the object file, and we end up trying to compute a path relative to
the compilation directory.

It looks like clang has some code in CGDebugInfo::CreateCompileUnit which
processes the "-main-file-name" differently from
MCContext::setGenDwarfRootFile; I think that's related.

-- 
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/20190511/ab197d98/attachment.html>


More information about the llvm-bugs mailing list