获得堆栈跟踪在Android NDK库崩溃的最佳方式 [英] Best way to obtain stacktrace on Android NDK library crash

查看:350
本文介绍了获得堆栈跟踪在Android NDK库崩溃的最佳方式的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在我的本地库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.

这篇关于获得堆栈跟踪在Android NDK库崩溃的最佳方式的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆