[llvm-bugs] [Bug 44522] New: “-use-unknown-locations” option support is missing for Codeview debug info
via llvm-bugs
llvm-bugs at lists.llvm.org
Sat Jan 11 19:08:29 PST 2020
https://bugs.llvm.org/show_bug.cgi?id=44522
Bug ID: 44522
Summary: “-use-unknown-locations” option support is missing for
Codeview debug info
Product: libraries
Version: trunk
Hardware: PC
OS: All
Status: NEW
Severity: enhancement
Priority: P
Component: Common Code Generator Code
Assignee: unassignedbugs at nondot.org
Reporter: steven.shi at intel.com
CC: llvm-bugs at lists.llvm.org
Problem Background:
http://lists.llvm.org/pipermail/llvm-dev/2020-January/138104.html
http://lists.llvm.org/pipermail/llvm-dev/2020-January/138139.html
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!
--
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/20200112/73f98ab0/attachment-0001.html>
More information about the llvm-bugs
mailing list