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: [email protected]
Reporter: [email protected]
CC: [email protected], [email protected],
[email protected], [email protected],
[email protected],
[email protected]
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._______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs