[Mono-dev] How to patch a compiled managed method code ?

Denis ERCHOFF d_erchoff at hotmail.com
Tue Jun 13 13:23:00 EDT 2006


Hi,

I have a function as

function Foo()
{
...

JUMP MethodRef.
}

Once this method compiled i want to patch it in memory. I want to replace 
the MethodRef with another MethodRef.

1) Having a MonoMethod pointer, how to retrieve the compiled block of this 
method ?
2) Are there some mono functions to parse a compiled block easily ?
3) How to retrieve the JUMP offset and how to patch it ?

Thanks.

Denis.





More information about the Mono-devel-list mailing list