[llvm-bugs] [Bug 43763] New: In Dwarf output, source path not recognized in gdb if built from parallel folder hierarchy
via llvm-bugs
llvm-bugs at lists.llvm.org
Tue Oct 22 11:30:24 PDT 2019
https://bugs.llvm.org/show_bug.cgi?id=43763
Bug ID: 43763
Summary: In Dwarf output, source path not recognized in gdb if
built from parallel folder hierarchy
Product: new-bugs
Version: 9.0
Hardware: PC
OS: Windows NT
Status: NEW
Severity: enhancement
Priority: P
Component: new bugs
Assignee: unassignedbugs at nondot.org
Reporter: sylvain.audi at ubisoft.com
CC: htmldeveloper at gmail.com, llvm-bugs at lists.llvm.org
This bug was detected when cross compiling for linux on windows, but it
probably is reproduceable from linux directly.
It happens when we build a file from a subdirectory paallel to that file, the
output obj file is not recognized directly by gdb.
Repro (from the zip file attached):
1) on windows, run build.bat
2) now under linux, using the 2 output obj files:
$ gdb main.obj
GNU gdb (GDB) 8.3
(etc... skipping gdb the header)
Reading symbols from main.obj...
(gdb) b main.cpp:1
Breakpoint 1 at 0xd: file source\sourcesubdir/main.cpp, line 3.
(gdb) quit
$
$ gdb mainsub.obj
GNU gdb (GDB) 8.3
(etc... skipping gdb the header)
Reading symbols from mainsub.obj...
(gdb) b main.cpp:1
No source file named main.cpp. <=== PROBLEM HERE
Make breakpoint pending on future shared library load? (y or [n])
(gdb)
(gdb) b source\sourcesubdir\main.cpp:1
Breakpoint 1 at 0xd: file
D:\saudi\clang_bug_final/source\sourcesubdir\main.cpp, line 3.
Note 1:
build.bat runs the same command line using absolute paths from 2 different
folder :
a) a folder that is an ancestor of the cpp file
b) a folder that is parallel to the hierarchy of the cpp file (bug scenario)
Note 2:
The problem seems to be in MCDwarf.cpp, in CDwarfLineTableHeader::tryGetFile.
The code paths change between the 2 scenarios, as Directory == CompilationDir
on one (the one that works) and not on the other.
Note 3:
Is this maybe somewhat related with bug 39503?
Note 4:
The bug doesn't appear when trying with g++
--
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/20191022/eb3ad59c/attachment.html>
More information about the llvm-bugs
mailing list