获得堆栈跟踪在Android NDK库崩溃的最佳方式堆栈、方式、Android、NDK

2023-09-04 12:59:57 作者:"冷心冷血冷感情

在我的本地库Android应用程序我想补充的SIGSEGV,SIGILL等信号处理程序和它的作品,但我不知道我怎么能获得堆栈跟踪。

In my android app in native library I add signal handler for SIGSEGV, SIGILL etc. And it works, but I don't know how I could obtain stacktrace.

我已经试过的开卷的*功能,但它们在信号处理程序停止。我试着从信号处理到餐桌和跟踪家长在pthread的,但它被禁止权利。

I've tried Unwind* functions but they stops on signal handler. I've tried to fork from signal handler and trace parent over pthread, but it forbidden by rights.

有谁知道这个任务很好的解决方案,无需读取设备的日志? 日Thnx

Does anyone know good solution for this task without reading device log? Thnx

推荐答案

我觉得谷歌Breakpad 正是你所期待的。

I think Google Breakpad is exactly what you are looking for.