【发布时间】:2016-12-19 16:31:08
【问题描述】:
典型的调试模式:
class Button : public MyBaseViewClass
{
...
};
....
void MyBaseViewClass::Resized()
{
//<---- here I want to stop in case MyBaseViewClass is really a Button, but not a ScrollBar, Checkbox or something else. I.e. I want a breakpoint condition on a dynamic (most derived) type
}
strstr(typeid(*this).name(), "Button") 上的断点之类的简单方法不起作用,因为 typeid lldb 控制台告诉:
(lldb) p typeid(*this)
error: you need to include <typeinfo> before using the 'typeid' operator
error: 1 errors parsing expression
在拨打电话之前在控制台中肯定 #include 没有帮助
【问题讨论】: