zircon目前支持的基本调测功能
- zircon shell下执行log_listener
2 .在zircon shell中执行alt+tab 切换控制台(仅支持x64) - zircon shell 执行 dlog命令。支持dlog -p 进程号 查看指定进程打印
- 如果以pave方式启动,可以在服务器端使用./out/build-zircon/tools/loglistener工具查看单板打印
- 自动回溯Automagic backtraces
fuchsia中默认程序是通过crashanalyzer启动,程序崩溃后会自动打印堆栈回溯和寄存器信息
代码中打印堆栈回溯
用户态打印堆栈:
#include <lib/backtrace-request/backtrace-request.h>
void my_function() {
backtrace_request();
}
内核线程中打印堆栈:
#include <kernel/thread.h>
void my_function() {
thread_print_backtrace(get_current_thread(), __GET_FRAME(0));
}