|
From: Zhen Li <zeh...@rw...> - 2012-03-21 11:30:05
|
Dear Valgrind developers,
I'm new to Valgrind and now trying to develop a custom tool based on it. I have some questions...
My environment is Valgrind 3.7.0, Ubuntu 11.10 x86/amd64, normal Intel Xeon server.
1. I want to log all "enter/exit function" events. I try to find them by following criteria:
for entry: VG_(get_fnname_if_entry)(...)
for exit:
for statement in bb: if ( st->tag == Ist_Exit && st->Ist.Exit.jk == Ijk_Ret )
for statement in the end of bb: if ( bbIn->jumpkind == Ijk_Ret )
and I try to use VG_(get_fnname) to get the name of the function. However the return value of VG_(get_fnname) is strange. Sometimes it's correct, but sometimes it's just empty or meaningless string (unreadable..). At the function return point if VG_(get_fnname) return an empty string, I don't know whether the function last entered should exit here or not. How can I know when a function enter and exit precisely?
2. In some case I want to pass in maximum 16 arguments to a function that inserted in the VexIR. However, I found on amd64 architecture (host_amd64_isel.c) the maximum number of arguments can be passed is limited to 6. I'm not familiar with amd64 architecture so I want to know is this a limitation in nature or just in Valgrind? If it's just in Valgrind, is there any possible solution to allow more parameters be passed?
Cheers,
Zhen
--
Zhen Li
German Research School for
Simulation Sciences GmbH
Laboratory for Parallel Programming
52062 Aachen | Germany
Tel +49 241 80 93970
Web www.grs-sim.de(http://www.grs-sim.de/)
Members: Forschungszentrum Jülich GmbH | RWTH Aachen University
|