既不能通过接口也不能用 Cobalt QA 版本base::debug::StackTrace
打印Backtrace
函数调用序列,那么有没有办法用 Cobalt QA 版本打印回溯?PrintBacktrace()
OutputToStream()
问问题
96 次
1 回答
0
In src/base/debug/stack_trace_starboard.cc
,StackTrace::PrintBacktrace()
将堆栈传递给 a PrintBacktraceOutputHandler
,最终输出到SbLogRaw()
, which in src/starboard/shared/posix/log_raw.cc
should write()
to STDERR_FILENO
,无论构建类型如何。
当我在 linux-x64x11_qa Cobalt 中尝试这个时:
base::debug::StackTrace().PrintBacktrace();
LOG(INFO) << base::debug::StackTrace().ToString();
我打印了两个堆栈跟踪:
SbEventHandle [0x4158e4]
starboard::shared::starboard::Application::DispatchStart() [0x4933b8]
starboard::shared::starboard::Application::Run() [0x49330e]
main [0x48c248]
<unknown> [0x7f272613cf45]
<unknown> [0x4156b9]
<unknown> [0x4156b9]
[0113/132642:INFO:main.cc(37)] SbEventHandle [0x415950]
starboard::shared::starboard::Application::DispatchStart() [0x4933b8]
starboard::shared::starboard::Application::Run() [0x49330e]
main [0x48c248]
<unknown> [0x7f272613cf45]
<unknown> [0x4156b9]
<unknown> [0x4156b9]
由于这最终会写到SbLogRaw()
,我会看看它在 QA 构建中的表现,以了解您的问题是什么。
于 2017-01-13T21:32:06.350 回答