C++—LLDB API:如何调用SBValue中存储的对象方法
发布时间:2022-04-11 22:49:12 390
相关标签: # golang# c++
我有一个类型为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()")
都不管用
特别声明:以上内容(图片及文字)均为互联网收集或者用户上传发布,本站仅提供信息存储服务!如有侵权或有涉及法律问题请联系我们。
举报