[llvm-bugs] [Bug 38944] New: Windows debug symbols don't show vtcast information
via llvm-bugs
llvm-bugs at lists.llvm.org
Thu Sep 13 14:51:42 PDT 2018
https://bugs.llvm.org/show_bug.cgi?id=38944
Bug ID: 38944
Summary: Windows debug symbols don't show vtcast information
Product: new-bugs
Version: unspecified
Hardware: PC
OS: Windows NT
Status: NEW
Severity: enhancement
Priority: P
Component: new bugs
Assignee: unassignedbugs at nondot.org
Reporter: dmajor at mozilla.com
CC: llvm-bugs at lists.llvm.org, rnk at google.com,
zturner at google.com
struct MyInterface
{
virtual int F() = 0;
};
struct MyClass1 : public MyInterface
{
int F() { return 1; }
} g_myClass1;
struct MyClass2 : public MyInterface
{
int F() { return 2; }
} g_myClass2;
int main(int argc, char* argv[])
{
MyInterface* volatile ptr;
ptr = &g_myClass1;
if (argc) ptr = &g_myClass2;
__debugbreak();
int result = ptr->F();
return result;
}
clang-cl -c -GR- -Z7 x.cpp
lld-link -debug -nodefaultlib -entry:main x.obj
windbg -g x.exe
At the breakpoint, open the Locals window (Alt+3).
With cl.exe + link.exe, you can expand the `ptr` node and see a vtcast option:
- ptr 0x00007ff7`13ffff10 struct MyInterface *
+ __vtcast_MyClass2 struct MyClass2
+ __vfptr 0x00007ff7`13fec050 x!MyClass2::`vftable' = Array [1]
With clang-cl + lld-link, `ptr` isn't even expandable:
ptr 0x00007ff7`c8b73008 struct MyInterface *
Reduced from https://bugzilla.mozilla.org/show_bug.cgi?id=1490743
--
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/20180913/f6b8c1a5/attachment.html>
More information about the llvm-bugs
mailing list