https://bugs.llvm.org/show_bug.cgi?id=36493
Bug ID: 36493
Summary: clang windows is emitting column information
Product: libraries
Version: trunk
Hardware: PC
OS: Windows NT
Status: NEW
Severity: enhancement
Priority: P
Component: DebugInfo
Assignee: unassignedb...@nondot.org
Reporter: ztur...@google.com
CC: llvm-bugs@lists.llvm.org
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"]
--
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs