views:

81

answers:

2

Hi all,

Is it possible to compile a .cs directly in x86 code ? I mean, I want to observe what happened with IDA Pro, so I didn't want IL code but asm code.

Thanks

+3  A: 

Take a look at Ngen.exe.

MikeB
I have try a :ngen.exe /install myprogram.exeBut next with IDA, I have IL code, no x86.. :(
Thomas
Ngen will install the native image typically in your Windows directory under /assembly/NativeImages or something like that. Are you looking at your program there? Another option to view the assembly that I prefer is to enable address-level debugging in your Visual Studio debugging options and use the provided debug windows.
MikeB
Yes I have looked in WINDOWS\assembly\nativeimages... but next, it's IL code. I think it's not possible, or more simple to find the spec if I want to study the internals.
Thomas
A: 

IDA won't load native parts from NGEN'd assemblies, unfortunately. The only way I found was to use the Visual Studio debugger.

If you're not interested specifically in the Microsoft .NET framework internals, but in any other JIT as well, you can play with mono --aot, which produces normal PE or ELF executables (and even the readable assembler sources).

SK-logic