I've got some interest in valgrind for Android but haven't looked into it much.
This page might prove helpful. They don't build a custom ROM but still
> I agree, valgrind is very useful and I was thinking to get it working with
> andrdoid, but the page that describes how to get it running with android is
> far too long to to even read it (from one of mozilla/webkit developers who
> started valgrind porting to android). It looked like I need special build of
> android for valgrind, that is a big turn off for me. I have like 100 phones
> to run my builds on and I need tools that work well everywhere. I really
> miss debugging with VS on windows mobile phones, all that linux/gcc/gdb
> seems too far inferior to MS tools even though I'm full time on android NDK
> for the last couple of years. Basically, our android development/bugfixing
> totally relies on windows port and development tools that are available for
> windows, but obviously some parts of code simply cannot be tested/debugged
> on windows port.
> So, you say that you used valgrind on android. Is it a standalone valgrind
> apk/executable that can be installed/copied to an android-arm phone and
> using some scripts I can get it running? I don't need to dance 10 hour
> rituals to get it working. The thing is that so far I use visual studio and
> windows port of our stuff for testing and debugging (thanks microsoft for
> good tools :), and I only need android specific tools quite rarely, that's
> why I I'm saying that I don't want to waste 10 hours just to get it barely
> working. At the same time I agree, it's probably the only tool that I think
> is better than similar tools available on windows.
>
> to "disable" stripping in ndk, you can manually copy unstripped libs from
> obj\local\armeabi to libs. I use stripped libs, but then I run addr2line
> against unstripped ones to get backtraces.
>
>
>
> On Saturday, January 5, 2013 4:21:29 AM UTC-5, a1 wrote:
>>
>>
>>> There is lots of info on the web, but everything is useless and doesn't
>>> even mention what should be done for detection of the code that corrupted
>>> the stack.
>>> So, my questions is: what should be done to actually fix stack
>>> corruption? I use latest r8d NDK and I don't have any good debugging tools
>>> for android (and I obviously not going waste a day of my life trying to
>>> build valgrind for android), my main dev platformt is windows/VS2008.... so,
>>> please advise how do u fix that kind of problems in the stone age of the NDK
>>> development ;)
>>
>>
>> Now that's really smart, why "waste" a day with valgrind (which is rather
>> a few hours) which not only will allow to locate this kind of bug in no time
>> but will also help you debug other problems. Anyway if you decide to "waste"
>> a day I can provide a few pointers since I recently setup valgrind for
>> android (and I also mainly develop in vs).
>> First of all you need linux box, personally I've used virtualbox to
>> install ubuntu, current valgrind version already has support for android so
>> there is no hacking required. I used virtualized x86 system image as test
>> machine (so I build x86 version of valgrind).
>>
>> Now a bit of trickery was required to run this setup, there is a readme in
>> valgrind (
http://valgrind.org/docs/manual/dist.readme-android.html) which
>> cover building and installing. To run application with valgrind simply call
>> following: adb shell setprop wrap.your.package.name "logwrapper
>> /data/local/Inst/bin/valgrind" (you may add additional parameters there if
>> you like).
>> Few issues wort mentioning: first of all make sure that valgrind has +x
>> attribute, also there are several tutorials on web that suggest using shell
>> script to wrap application process - I've never were able to setup that
>> that's why I use valgrind directly in setprop, last thing: remember to kill
>> your application process after setting wrap.* property.
>>
>> Getting exact location of detected error is also a bit tricky, since
>> binaries in APK are stripped valgrind will report only symbols (function
>> names) and addresses, no line numbers, you can of course use addr2line but
>> you need base address of your .so extracted from /proc/<pid>/smaps.
>> BTW if someone know how to disable stripping in ndk-build (if possible)
>> that'd great, I tried to do so but ndk-build system is far too complicated
>> for my lowly make skills.
>>
>> --
>> Bart
>
> --
> You received this message because you are subscribed to the Google Groups
> "android-ndk" group.
> To view this discussion on the web visit
>
https://groups.google.com/d/msg/android-ndk/-/B9XDQE9y_D4J.
>
> To post to this group, send email to
[hidden email].
> To unsubscribe from this group, send email to
>
[hidden email].
> For more options, visit this group at
>
http://groups.google.com/group/android-ndk?hl=en.
You received this message because you are subscribed to the Google Groups "android-ndk" group.