<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 - clang windows is emitting column information"
href="https://bugs.llvm.org/show_bug.cgi?id=36493">36493</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>clang windows is emitting column information
</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>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>DebugInfo
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>zturner@google.com
</td>
</tr>
<tr>
<th>CC</th>
<td>llvm-bugs@lists.llvm.org
</td>
</tr></table>
<p>
<div>
<pre>In theory, CodeView supports column information. However, most windows
debuggers don't recognize it and -- worse -- behave incorrectly in the presence
of column information. If you compile this program with clang on Windows:
int f(int, int);
# 1 "F:\\git\\fastbuild\\Code\\Tools\\FBuild\\FBuildApp\\Main.cpp"
int g;
int i() {
# 83
return f(g, g);
}
it will generate LLVM assembly that looks like this:
.cv_loc 0 1 83 15 #
F:\git\fastbuild\Code\Tools\FBuild\FBuildApp\Main.cpp:83:15
movl "?g@@3HA", %eax
.cv_loc 0 1 83 12 #
F:\git\fastbuild\Code\Tools\FBuild\FBuildApp\Main.cpp:83:12
movl "?g@@3HA", %ecx
.cv_loc 0 1 83 10 #
F:\git\fastbuild\Code\Tools\FBuild\FBuildApp\Main.cpp:83:10
movl %ecx, (%esp)
What this is trying to say is that there are 3 different addresses for line 83,
corresponding to columns 10, 12, and 15 respectively. But the debugger simply
interprets this as "there are 3 addresses for line 83", and as a result you
have to hit the step button 3 times to get to the next statement.
This seems like a regression, as I don't recall us emitting this before. At
the very least, the debugger was working on step over before as far as I
remember.
We will need to stop emitting cv_loc directives at column granularity. Note
that -dwarf-column-info was not passed on the command line here. The arguments
used were:
r"d:\src\llvmbuild\cl\Release\x64\bin\clang++.exe",
"-std=c++11",
r"Main.cpp",
"-c",
"-g3",
"-gcodeview",
"-Wall",
"-Werror",
"-Wfatal-errors",
"-Wextra",
"-DWIN32_LEAN_AND_MEAN",
"-D_WIN32",
"-D__WINDOWS__",
"-DWIN32",
"-D_CRT_SECURE_NO_WARNINGS",
"-D_WINSOCK_DEPRECATED_NO_WARNINGS",
"-m32",
"-D_X86_=1",
"-D_INTEGRAL_MAX_BITS=64",
"-D_MT",
"-fms-compatibility",
"-fms-extensions",
"-fmsc-version=1900",
"-Wno-#pragma-messages",
"-Wno-unknown-pragmas",
"-Wno-unused-function",
"-Wno-microsoft",
"-Wno-unused-value",
"-Wno-ignored-attributes",
"-Wno-incompatible-ms-struct",
"-Wno-nonportable-include-path",
"-Wno-ignored-pragma-intrinsic",
"-Wno-invalid-token-paste",
"-Wno-implicit-exception-spec-mismatch",
"-Wshadow",
"-fno-rtti",
"-Xclang",
"-flto-visibility-public-std",
"-DDEBUG",
"-DPROFILING_ENABLED",
"-O0",
"-S"]</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>