<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 - “-use-unknown-locations” option support is missing for Codeview debug info"
href="https://bugs.llvm.org/show_bug.cgi?id=44522">44522</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>“-use-unknown-locations” option support is missing for Codeview debug info
</td>
</tr>
<tr>
<th>Product</th>
<td>libraries
</td>
</tr>
<tr>
<th>Version</th>
<td>trunk
</td>
</tr>
<tr>
<th>Hardware</th>
<td>PC
</td>
</tr>
<tr>
<th>OS</th>
<td>All
</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>Common Code Generator Code
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>steven.shi@intel.com
</td>
</tr>
<tr>
<th>CC</th>
<td>llvm-bugs@lists.llvm.org
</td>
</tr></table>
<p>
<div>
<pre>Problem Background:
<a href="http://lists.llvm.org/pipermail/llvm-dev/2020-January/138104.html">http://lists.llvm.org/pipermail/llvm-dev/2020-January/138104.html</a>
<a href="http://lists.llvm.org/pipermail/llvm-dev/2020-January/138139.html">http://lists.llvm.org/pipermail/llvm-dev/2020-January/138139.html</a>
We meet an LLD PDB issue that if we link assembly code with C code and set >=
-O1 level optimization, the executable's PDB will contain wrong zero Lines for
the assembly code in DEBUG_S_LINES subsection, and then our COFF source
debuggers will fail to do the source-level debug on the executable.
I checked the LLVM master code and find that the “-use-unknown-locations”
option and its related logic is only supported in Dwarf debug info as below.
These codes are missing in the Codeview side. It looks the
“-use-unknown-locations” option logic is not complex, could we port the code
logic into llvm\lib\CodeGen\AsmPrinter\CodeViewDebug.cpp as well?
llvm-project\llvm\lib\CodeGen\AsmPrinter\DwarfDebug.cpp:
... ...
static cl::opt<DefaultOnOff> UnknownLocations(
"use-unknown-locations", cl::Hidden,
cl::desc("Make an absence of debug location information explicit."),
cl::values(clEnumVal(Default, "At top of block or after label"),
clEnumVal(Enable, "In all cases"), clEnumVal(Disable, "Never")),
cl::init(Default));
... ...
// If user said Don't Do That, don't do that.
if (UnknownLocations == Disable)
return;
This issue blocks the LLVM toolchain debugging capability for UEFI firmware.
Please help to add the support. Thank you in advance!</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>