NDK堆栈不工作 [英] ndk-stack not working

查看:240
本文介绍了NDK堆栈不工作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我NDK调用堆栈如下:

I am invoking ndk-stack as follows:

cat file_temp | ~/workspace/android-ndk-r6b/ndk-stack -sym /home/xyz/trunk/apk/obj/local/armeabi/

它发现了坠毁的指纹,但没有告诉我堆栈分析。打印的错误是:

It finds the crash fingerprint but fails to show me the stack analysis. The error printed is:

ndk-stack: elff/elf_file.cc:102: static ElfFile* ElfFile::Create(const char*): Assertion `read_bytes != -1 && read_bytes == sizeof(header)' failed. Stack frame #00  pc 43121300  Aborted

任何想法?

感谢。

推荐答案

这是NDK栈程序是无法读取的共享库的剥开版本。

This is the ndk-stack program being unable to read the unstripped version of your shared libraries.

具体发生崩溃,因为存在一个文件匹配的模块名称,但它不是大到足以容纳一个ELF头。

The specific crash occurs because a file exists matching the module name, but it's not large enough to contain an ELF header.

可以做的事:

  1. 检查包含在通过 -sym 提供的目录中的文件是正确的(而不是截断)。

  1. Check that the files contained in the directory supplied via -sym are correct (and not truncated).

删除截断的文件或文件超过几百个字节小。

Remove truncated files or files smaller than a few hundred bytes.

如果你好奇,源$ C ​​$下NDK-堆栈是Android源代码树中下 NDK /来源/主机工具/ NDK堆栈

If you're curious, the source code for ndk-stack is in the android source tree under ndk/sources/host-tools/ndk-stack

这篇关于NDK堆栈不工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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