[Mono-list] Disassembler/bytecode manipulation

Alex.Villazon@cui.unige.ch Alex.Villazon@cui.unige.ch
Tue, 29 Oct 2002 16:12:10 +0100

Hi all,

   Is there a disassembler tool as a futur project (or available)?

   In fact, I'm interested in the manipulation of C# bytecode using C# code. I 
worked with those kinds of tools in Java (jakarta.apache.org/bcel), and I was 
wondering if it was possible to manipulate C# bytecode at load-time as in Java. 

   I found a tool included in MS .Net SDK (ILDASM.exe)... Is there an 
equivalent tool planned in Mono?

   I'm not familiar with C#/Mono, so I don't know if it is possible to modify 
C# bytecode at load-time. (Is there a "loader" class accessible to the user?)

   The idea is to implement a tool written in C#, which is capable to introduce 
a set of instructions in a compiled application (which does not modify the 
behavior of the application), and to generate a new executable that can be 
executed normally (the additional instructions are typically used for 

  We have implemented such kind of tools in Java (see http://abone.unige.ch) 
and we are interested to see if our ideas can be applied to C#.

  Some ideas?