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: unassignedb...@nondot.org
Reporter: dma...@mozilla.com
CC: llvm-bugs@lists.llvm.org, r...@google.com,
ztur...@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.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs