<html>
<head>
<base href="https://bugs.llvm.org/">
</head>
<body><table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Bug ID</th>
<td><a class="bz_bug_link
bz_status_NEW "
title="NEW - In Dwarf output, source path not recognized in gdb if built from parallel folder hierarchy"
href="https://bugs.llvm.org/show_bug.cgi?id=43763">43763</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>In Dwarf output, source path not recognized in gdb if built from parallel folder hierarchy
</td>
</tr>
<tr>
<th>Product</th>
<td>new-bugs
</td>
</tr>
<tr>
<th>Version</th>
<td>9.0
</td>
</tr>
<tr>
<th>Hardware</th>
<td>PC
</td>
</tr>
<tr>
<th>OS</th>
<td>Windows NT
</td>
</tr>
<tr>
<th>Status</th>
<td>NEW
</td>
</tr>
<tr>
<th>Severity</th>
<td>enhancement
</td>
</tr>
<tr>
<th>Priority</th>
<td>P
</td>
</tr>
<tr>
<th>Component</th>
<td>new bugs
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>sylvain.audi@ubisoft.com
</td>
</tr>
<tr>
<th>CC</th>
<td>htmldeveloper@gmail.com, llvm-bugs@lists.llvm.org
</td>
</tr></table>
<p>
<div>
<pre>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 <a class="bz_bug_link
bz_status_NEW "
title="NEW - Incorrect source paths generated for relative-path source files"
href="show_bug.cgi?id=39503">bug 39503</a>?
Note 4:
The bug doesn't appear when trying with g++</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are on the CC list for the bug.</li>
</ul>
</body>
</html>