Closed yasaminmahmoodi closed 6 years ago
May I ask which version of valgrind you're using? Valgrind-3.10 and below defines get_fnname(Addr a,HChar* fnname,Int n_fnname), which has 3 arguments. Valgrind-3.11 and above defines get_fnname(Addr a,const HChar** fnname), which has only 2.
You are right. Now with latest version of valgrind I could make and install taintgrind. Still another problem. it made exe file of taintgrind-amd64-linux in inst/lib/valgrind. but when I try to use taintgrind tool it give this error: failed to start tool 'taintgrind-amd64-linux' for platform 'amd64-linux': No such file or directory
Can you post the commands you used to make, install and run valgrind and taintgrind? That will help to debug the issue.
exactly the same as the comment is posted here,
./autogen.sh
./configure --prefix=pwd
/inst
make && make install
for valgrind.
and:
../autogen.sh
./configure --prefix=pwd
/../inst
make && make install
for taintgrind
My guess is you are executing the wrong binary or your paths are mixed up.
try this to be sure:
wget ftp://sourceware.org/pub/valgrind/valgrind-3.13.0.tar.bz2
tar xjf valgrind-3.13.0.tar.bz2 || exit 1
cd valgrind-3.13.0 || exit 1
INST_DIR=`pwd`
mkdir -p $INST_DIR 2> /dev/null
./autogen.sh
./configure --prefix=$INST_DIR
make
make install
git clone https://github.com/wmkhoo/taintgrind
cd taintgrind
../autogen.sh
./configure --prefix=$INST_DIR
make
make install
cd $INST_DIR/bin
./valgrind -t taintgrind -- ls
Everything is fine until the end line. But when I type this command: ./valgrind -t taintgrind -- ls, it says command not found
then it looks like your valgrind is not compiling. in my bin directory are: callgrind_annotate callgrind_control cg_annotate cg_diff cg_merge ms_print valgrind valgrind-di-server valgrind-listener vgdb
For the last line, instead of
./valgrind -t taintgrind -- ls
try
./valgrind --tool=taintgrind -- ls
Closing for now. If there are further related issues, reopen it.
I am trying to build taintgrind. in make and make install steps it gives 2 errors: error: incompatible type for argument 1 of ‘vgPlain_getfnname’ VG(get_fnname)(pc, buf);
error: too few arguments to function ‘vgPlain_get_fnname’
define VG(str) VGAPPEND(vgPlain, str)