lldb:大多数派生类型的条件断点

时间:2016-08-12 15:37:02

标签: c++ xcode lldb

典型的调试模式:

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(),&#34; Button&#34;)这样的简单方法不起作用,因为在typeid lldb控制台上告诉:

(lldb) p typeid(*this)
error: you need to include <typeinfo> before using the 'typeid' operator
error: 1 errors parsing expression

在拨打电话前确实#include在控制台中没有帮助

0 个答案:

没有答案