[Mono-dev] the inmortal debugger...

alcides viamontes dignor_sign at yahoo.es
Mon Sep 11 15:36:46 EDT 2006


 --- Miguel de Icaza <miguel at ximian.com> escribió:

> Hello,
> 
> >   The last commit in the module "debugger" in the
> svn
> > repository is from 7 weeks ago, right?. Version
> .30
> > doesn't support spitting out generic instances
> fields
> > and locals. Are there any plans for those
> features?
> 
> Please file a bug report so we can track this.
> 
> Miguel
> 


Bug reports have a very precise format, and after a
week in the depths of mono and the mono-debugger, I
can put it concisely this way: mono-debugger knows
very little about generics . 

If you want an example, take a look at mono-debug.c,
there is a hook that reports the MonoClass'es
initialized by the runtime to the debugger, so the
debugger can know about the runtime offset of fields
and methods. It have a very interesting sentence near
the beggining which is, more or less:

   if (klass->generic_class || ...)
       return ;  // So, do nothing

Another: in the csharp part, (languages/mono), types
are often looked up straight by token (going through
the Cecil mechanisms), which is right if you have a
token for each type, but sadly, that's far from being
correct. There is, luckly, an exception, one relative
to locals and a wonderful function named
GetLocalTypeFromSignature. But this exception is
meaningless anyway for generics because somebody
dismissed the generic MonoClass*, and I guess it's
almost impossible to build correctly the offset
location of fields just from the type information. And
signatures can't be used as a mean of identifying
types because they are not unique (according to the
CLI specification, you can use in many places a
TypeDef or a TypeRef indistinctly, right?). 
And if you fix all this (as I already did), you're
left with generic method instantiations!

Ok, qué pongo en el Bug-Report ?





		
______________________________________________ 
LLama Gratis a cualquier PC del Mundo. 
Llamadas a fijos y móviles desde 1 céntimo por minuto. 
http://es.voice.yahoo.com



More information about the Mono-devel-list mailing list