本文整理汇总了C++中SBStream::Clear方法的典型用法代码示例。如果您正苦于以下问题:C++ SBStream::Clear方法的具体用法?C++ SBStream::Clear怎么用?C++ SBStream::Clear使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SBStream
的用法示例。
在下文中一共展示了SBStream::Clear方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: listener_func
void listener_func() {
while (!g_done) {
SBEvent event;
bool got_event = g_listener.WaitForEvent(1, event);
if (got_event) {
if (!event.IsValid())
throw Exception("event is not valid in listener thread");
// send process description
SBProcess process = SBProcess::GetProcessFromEvent(event);
SBStream description;
for (int i = 0; i < process.GetNumThreads(); ++i) {
// send each thread description
description.Clear();
SBThread thread = process.GetThreadAtIndex(i);
thread.GetDescription(description);
g_thread_descriptions.push(description.GetData());
// send each frame function name
uint32_t num_frames = thread.GetNumFrames();
for(int j = 0; j < num_frames; ++j) {
const char* function_name = thread.GetFrameAtIndex(j).GetSymbol().GetName();
if (function_name)
g_frame_functions.push(function_name);
}
}
}
}
}