hi,
i am new to valgrind and was planning to use valgrind function wrapping for 
testing my system (particularly to hit the error and rare cases in the system 
which are hard to occur). here are a couple of questions:
#1. all examples i saw in the documentation are with C functions. There is a 
mention of C++ doing wrapping based on wildcard matches in soname and function 
name. if i understand this correctly, i cannot specify the wrapper using 
class::member syntax -- it should be flattened names, correct? is there any 
experience/examples of this? 

#2. if yes, what are the limitations (e.g. does the member function need to be 
defined outside the class definition? this is just an example - pls add any 
other limitations that you are aware of)

#3. how do i specify wrappers to functions with object reference as 
parameters? what about default parameters - how to specify in the wrappers? 
variable number of arguments ...? feel free to add any other such limitations.

#4. will function wrapping work across dynamic binding/polymorphism? do i need 
to do anything special for it to work correctly? (as long as i specify as the 
wrapper for the appropriate class's function i hope it should work in that 
valgrind would act once the dynamic binding is resolved, rite?)

#5. my system's code uses the STL for C++. is there any caveats in this 
regard? i would imagine not but just wanted to be sure before i started.

#6. i noticed one of the caveats was the limited number of options available 
for calling the original function. is there a way around it (since the system 
i have to test doesnt naturally fall in that restriction)? what i want to do 
is to use the wrapper function under certain circumstances (controlled by user 
e.g. to inject faults) and use the original function otherwise. with that in 
view i was planning to call the original function from the wrapper function 
and was getting cramped by this caveat. what suggestions do you have for 
getting around this problem?

#7. is there any inbuilt/efficient valgrind mechanism to know the call stack 
at a given location? if so where can i get more information on that?


look forward to your responses
thanx
-venky
 


------------------------------------------------------------------------------
Are you an open source citizen? Join us for the Open Source Bridge conference!
Portland, OR, June 17-19. Two days of sessions, one day of unconference: $250.
Need another reason to go? 24-hour hacker lounge. Register today!
http://ad.doubleclick.net/clk;215844324;13503038;v?http://opensourcebridge.org
_______________________________________________
Valgrind-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/valgrind-users

Reply via email to