On Wed, Jun 24, 2009 at 2:49 PM, Venky Venkatesh (venky)<[email protected]> wrote: > > [VV]: the original functions that I want to wrap (and call from the > wrapper via an if-then-else) do not have the standard set of supported > signatures (I mean the CALL_FN_*_*). With this limitation, I cannot call > the original function from the wrapped function. So is there any other > way I could get around this problem e.g. > 1. Add any other means of calling the original function - not sure how > hard it is add. > -- OR -- > 2. Install and remove the wrapper dynamically (so that the calls to > original function can be suitably directed to the wrapper or the > original) - if so can you point to information of how to do that? > -- OR -- > 3. Any entirely different valgrind method to accomplish the original > goal of selective calling of wrapper and original functions (for the > fault injection testing that I set out to do) - may be I am rat-holing > using the wrong valgrind construct for the job.
If you want to call the original you have to use CALL_FN_*_*. Section 3.2.6 of http://www.valgrind.org/docs/manual/manual-core-adv.html#manual-core-adv.wrapping explains that there are limitations to the signature, butt the macro set could be extended if necessary. If you want the set to be extended you might have to do some hacking yourself. > BTW, I am assuming that there is no limitation on the signature of the > orignal function with regards to doing I_WRAP_SONAME_FNNAME_ZZ (as there > are for CALL_FN_*_*) - the manual doesn't call out explicitly. As far as I know there are no such limitations. Nick ------------------------------------------------------------------------------ _______________________________________________ Valgrind-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/valgrind-users
