Sorry, false alarm: latest source code has no troubles with IL
generation unless I make some changes to the IL.
I'll recheck my code later and let you know if there are any problems
in Cecil itself.

On Apr 14, 1:43 am, Buryak Alexander <[email protected]>
wrote:
> Found some troubles with saving IL code: load+save breaks some random
> methods and causes runtime errors like
> "System.BadImageFormatException : Bad IL range."
>
> I'll take a closer look tomorrow and give some examples of such
> functions for further investigation and bugfix.
> Old Cecil works with those functions properly.
>
> WBR,
> Alex
>
> On Apr 14, 1:09 am, Buryak Alexander <[email protected]>
> wrote:
>
>
>
> > Greetings.
>
> > I've switched to Cecil 0.9 successfully.
>
> > Good news: PDB files are written almost properly - thay are large,
> > debugger-valid and working fine.
> > Unless one annoying situation I've mentioned before (about "yieldy"
> > functions):http://www.google.com/url?sa=D&q=http://social.msdn.microsoft.com/For...
> > - these variables are still lost in the debugger.
>
> > By the way, two litte fixes:
>
> > 1. diff from MethodBodyRocks.GetParameter():
> >              if (method.HasThis) {
> > +                if (index == 0)
> > +                    return body.ThisParameter;
> >                  index--;
> > Otherwise Cecil crashes on accessing this in IL during SimplifyMacro()
> > method execution.
>
> > 2. in MetadataImporter.ImportAssemblyName() it's useful to check for
> > (name.PublicKeyToken == null) before taking key token length for byte
> > array - or Cecil crashes on assemblies without PublicKeyToken.
>
> > Great job anyway.
> > I'm looking forward to fixing "yieldy" bug - after that Cecil will be
> > perfect for me!
>
> > WBR,
> > Alex
>
> > On Apr 8, 9:21 pm, Jb Evain <[email protected]> wrote:
>
> > > On Thu, Apr 8, 2010 at 6:54 PM, Александр Буряк
>
> > > <[email protected]> wrote:
> > > > In 531630 VS successfully loads both assembly and PDB file.
> > > > The assembly works fine, but PDB is almost empty.
> > > > This thread author's case is identical as far as I've understood.
>
> > > The case of 531630 will be fixed as well.
>
> > > > Original PDB produced by compiler exposes all variables - debugger uses 
> > > > them
> > > > perfectly, ildasm can see them.
> > > > But it seems that loading+saving of that PDB looses such variables, 
> > > > ildasm
> > > > still sees them, but debugger - is not.
>
> > > That sucks. It's indeed maybe some special flags, I'll investigate and
> > > see if I can get it for monday.
>
> > > --
> > > Jb Evain  <[email protected]>

-- 
--
mono-cecil

To unsubscribe, reply using "remove me" as the subject.

Reply via email to