内存调试工具为Android NDK C ++ code [英] Memory debugging tools for Android NDK C++ code

查看:129
本文介绍了内存调试工具为Android NDK C ++ code的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有谁知道的内存调试工具(如Valgrind的)下的Andr​​oid NDK本地C ++ code?

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

推荐答案

我们有一个使用相当多的本土code的一个项目。作为该问题的意见的一个暗示,最好的方法是测试code上的另一个环境。

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.

我们有一个单独的项目,建立在Linux和调用我们在Android的code使用C / C ++函数。一旦你在这一点上,所有的好的工具,你是用来(GDB,Valgrind的,等等)都可以给你。

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... ;)

这篇关于内存调试工具为Android NDK C ++ code的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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