Valgrind的不能在Android操作系统执行MEMCHECK工具? [英] Valgrind cannot execute memcheck tool on Android OS?
问题描述
I've compiled Valgrind for ARM using this with minor alterations.
与规定的方法安装在手机上后,我收到以下错误:
After installing on a phone with the method specified, I get the following error:
# /data/local/Inst/bin/valgrind
valgrind: failed to start tool 'memcheck' for platform 'arm-linux': Permission denied
在进一步考察,就可以查找它试图做的事:
On closer investigation, it is possible to find what it's trying to do:
# /data/local/Inst/bin/valgrind -d -v
--25068:1:debuglog DebugLog system started by Stage 1, level 1 logging requested
--25068:1:launcher no tool requested, defaulting to 'memcheck'
--25068:1:launcher no client specified, defaulting platform to 'arm-linux'
--25068:1:launcher launching /data/local/Inst/lib/valgrind/memcheck-arm-linux
valgrind: failed to start tool 'memcheck' for platform 'arm-linux': Permission denied
然而,可执行文件是存在的,具有正确的权限:
However, the executable is there and has the right permissions:
# ls -l /data/local/Inst/lib/valgrind/memcheck-arm-linux
-rwxrwxrwx root root 9261240 2013-10-28 17:00 memcheck-arm-linux
此外,尝试执行它的产量没有问题,从而消除了动态链接的问题,以及:
Furthermore, trying to execute it yields no problem, which eliminates dynamic linking problems as well:
/data/local/Inst/lib/valgrind/memcheck-arm-linux
valgrind: You cannot run '/data/local/Inst/lib/valgrind/memcheck-arm-linux' directly.
valgrind: You should use $prefix/bin/valgrind.
在这一点上,我主要的想法,任何帮助将大大AP preciated。
At this point, I'm mostly out of ideas, any help would be greatly appreciated.
我所知道的<一个href=\"http://stackoverflow.com/questions/19121524/getting-a-valgrind-for-android-problems-with-valgrinds-looking-for-memcheck\">this类似的帖子,但我敢肯定(基于与D的输出)preFIX是正确的。
I'm aware of this similar post, but I'm sure (based on the output with "-d") the prefix is right.
的潜在线索:的这个工作了几个ROM前-s,但不幸的是,这当前是完全相同的,它的工作previously 具有完全相同的Valgrind的构建。
Potential clue: this worked a few "ROM"-s before, but unfortunately, this current one is the exact same on which it worked previously, with the exact same Valgrind build.
的的轻微改动:的,因为是建立在64位系统上完成,_64被附加到路径工具链在适当情况下。我可以张贴的完整剧本,但它应该是无关的。鬼才,潜在的。
The minor alterations: since the build was done on a 64 bit system, _64 was appended to toolchain paths where appropriate. I can post the full script, but it should be irrelevant. Famous last words, potentially.
推荐答案
最近我碰到了相同的问题。
在我的设备/数据/本地/研究所及其所有内容都是由一个名为壳的用户所拥有。
自叹不如,当我尝试用root用户来执行Valgrind的,我得到了上面提到的错误,但只要我登录的非特权用户,我可以没有任何问题的valgrind运行。
I recently ran into the exact same problem. On my device /data/local/Inst and all of its content is owned by a user named "shell". Strange enough, when I try to execute valgrind with the root user, I get the above-mentioned error, but as soon as I log in with the unprivileged user, I can run valgrind without any issues.
从您发布的信息,我走,你Valgrind的安装作为根用户,我想你也执行它作为根。
From the information you posted, I take, that you installed valgrind as the root user, and I assume you also executed it as root.
因此,这里是得到它的工作对我的步骤:
So here are the steps that got it working for me:
- /数据/本地/研究所是由一个非特权用户拥有
- 用相同的非特权用户安装的valgrind
- 同样,使用相同的用户执行的valgrind
希望这有助于。
这篇关于Valgrind的不能在Android操作系统执行MEMCHECK工具?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!