LLDB API:如何调用存储在SBValue中的对象方法

时间:2017-01-28 00:51:08

标签: c++ debugging lldb

我有一个sc_time类型的值,它有方法

inline double sc_time::to_double() const  

我可以从调试器调用此方法来获取返回值吗?它有可能吗?

// lldb::SBValue cur_time
cout << "IsInScope: " << cur_time.IsInScope() << endl;
cout << "Name: " << cur_time.GetName() << endl;
cout << "Type Name: " << cur_time.GetType().GetName() << endl;

返回

IsInScope: 1
Name: m_curr_time
Type Name: sc_core::sc_time

我试过

cur_time.CreateValueFromExpression("retval", "to_double()")
cur_time.CreateValueFromExpression("retval", "m_curr_time.to_double()")
cur_time.CreateValueFromExpression("retval", "this->to_double()")

没有工作

0 个答案:

没有答案