Thanks. I've already written exactly that, after finding the code responsible for this in Mono.Cecil. Thank you anyway!
2011/5/14 Jb Evain <[email protected]> > Hey, > > On Sat, May 14, 2011 at 4:14 PM, Gábor Kozár <[email protected]> wrote: > > I was wondering, if it's possible to force Cecil to compute the > instruction > > offsets? > > public static void ComputeOffsets (this MethodBody body) > { > var offset = 0; > foreach (var instruction in body.Instructions) { > instruction.Offset = offset; > offset += instruction.GetSize (); > } > } > > Jb > > -- > -- > mono-cecil -- -- mono-cecil
