peverify failed for the instrumented file.

Dec 14, 2010 at 12:39 AM


I use the CCI to instrument a class to write the running information,such as the field state and return value for the methods , into a file, but when I use the "Peverify" to verify the generated DLL file, it show one error: "The 'this' parameter to the call must be the calling method's 'this' parameter". Do you have any idea for that?



Dec 17, 2010 at 4:07 PM

Can you post the code you're using to create the method? And some more details about your process? You're decompiling first?

Dec 17, 2010 at 4:45 PM

Thanks for you reply, I think I got know what is the reason for the error.  I want to collect the field state during the run time, so I insert a new statement "Console.WriteLine(pre)" before the return statement for each method, in which, "pre" is the global filed definition.  I think the error is because I should insert "Console.WriteLine(this.pre)" instead of "Console.WriteLine(this.pre)", right?  But the problem is I don't know how to express the argument "this.pre" using CCI.