On Mar 30, 10:27 pm, Jb Evain <[email protected]> wrote: > Hi, > > On Tue, Mar 30, 2010 at 9:20 PM, Pavels <[email protected]> wrote: > > Hi, I have a problem. > > I use mono.cecil to modify a WPF .exe file. Visual Studio creates pdb > > file that is 131 KB, after modification with mono.cecil (and > > mono.cecil.pdb) the pdb file is only 40 KB. > > Are you concerned because of the size of your pdb? Or is it unusable > after Cecil manipulated it? > > -- > Jb Evain <[email protected]>
It is unusable after Cecil manipulation. Visual Studio manages to Attach to process for debugging, but even if i set a breakpoint, it is never hit (shows empty breakpoint). The manipulations i'm doing are : CilWorker MSILWorker = prop.SetMethod.Body.CilWorker; Instruction callRaisePropertyChanged = MSILWorker.Create(OpCodes.Call, raisePropertyChanged); if (prop.SetMethod.Body.Instructions.Contains(callRaisePropertyChanged)) break; Instruction ldarg0 = MSILWorker.Create(OpCodes.Ldarg_0); Instruction propertyName = MSILWorker.Create(OpCodes.Ldstr, prop.Name); MSILWorker.InsertBefore(prop.SetMethod.Body.Instructions[prop.SetMethod.Body.Instructions.Count - 1], ldarg0); MSILWorker.InsertAfter(ldarg0, propertyName); MSILWorker.InsertAfter(propertyName, callRaisePropertyChanged); MSILWorker.InsertAfter(callRaisePropertyChanged, MSILWorker.Create(OpCodes.Nop)); -- I add a method call on property set method. -- -- mono-cecil To unsubscribe from this group, send email to mono-cecil+unsubscribegooglegroups.com or reply to this email with the words "REMOVE ME" as the subject.
