Memory debugging tools for Android NDK C++ code

隐身守侯 提交于 2019-12-18 19:12:27

问题


Does anyone know of memory debugging tools (like Valgrind) for native C++ code under Android NDK?


回答1:


We have a project that uses quite a bit of native code. As hinted in one of the comments for the question, the best approach is to test that code on another environment.

We have a separate project that builds in Linux and calls the C/C++ functions we use in our Android code. Once you are at that point, all the nice tools you are used to (gdb, Valgrind, etc.) are available to you.

A lot more productive than doing the same thing on the phone (assuming you could even find a good tool).

The tricky part is to have a good test harness, but that should be a given to any project that started off on the right path... ;)



来源:https://stackoverflow.com/questions/4446093/memory-debugging-tools-for-android-ndk-c-code

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!