On Mon, 2013-11-11 at 03:07 +0000, Jun Yuan wrote:
> Hello,
>
> >From what I understand about the document, I will have to put
> LD_PRELOAD=/pathtowrapper/libwrapper.so before launching valgrind through
> "exec /data/local/Inst/bin/valgrind $VALPARAMS $*". My question is, I suppose
> I will have to compile my wrapper.c using the exact same configuration used
> to build valgrind-- the NDK compiler, NDK linker, etc -- am I correct? I only
> used wrapper on my laptop linux-x86, not sure how different they would be.
>
> Thanks for any input!
>
> -Jun
I do not think it is mandatory have wrappers function in a
LD_PRELOADed .so file. I think you can write a wrapper function
in your "main" executable, statically linked.
See e.g. memcheck/tests/wrap1.c as an example.
Philippe
|