Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Does Mono have the equivalent of ILDASM?

Tags:

mono

ildasm

Is there an equivalent of ILDASM for Mono?

like image 745
Iain Holder Avatar asked Oct 31 '09 22:10

Iain Holder


People also ask

What is ILDasm in c#?

The IL Disassembler is a companion tool to the IL Assembler (Ilasm.exe). Ildasm.exe takes a portable executable (PE) file that contains intermediate language (IL) code and creates a text file suitable as input to Ilasm.exe. This tool is automatically installed with Visual Studio.


1 Answers

Yes, monodis is Mono's equivalent for ildasm.

 $ cat a.cs     public class Foo     {         public static void Main()         {             System.Console.WriteLine("Hello world");         }     }  $ monodis a.exe     .assembly extern mscorlib     {       .ver 1:0:5000:0       .publickeytoken = (B7 7A 5C 56 19 34 E0 89 ) // .z\V.4..     }     .assembly 'a'     {       .hash algorithm 0x00008004       .ver  0:0:0:0     }     .module a.exe // GUID = {034ADE1A-22D2-4B2B-960B-AE9DBFB2FCE7}         .class public auto ansi beforefieldinit Foo         extends [mscorlib]System.Object       {          // method line 1         .method public hidebysig  specialname  rtspecialname                 instance default void '.ctor' ()  cil managed          {             // Method begins at RVA 0x20ec         // Code size 7 (0x7)         .maxstack 8         IL_0000:  ldarg.0          IL_0001:  call instance void object::'.ctor'()         IL_0006:  ret          } // end of method Foo::.ctor          // method line 2         .method public static  hidebysig                 default void Main ()  cil managed          {             // Method begins at RVA 0x20f4         .entrypoint         // Code size 11 (0xb)         .maxstack 8         IL_0000:  ldstr "Hello world"         IL_0005:  call void class [mscorlib]System.Console::WriteLine(string)         IL_000a:  ret          } // end of method Foo::Main        } // end of class Foo  
like image 148
Mark Rushakoff Avatar answered Oct 06 '22 23:10

Mark Rushakoff