Is it possible to disassemble / inspect the native code produced by the .Net JITer / ngen? (for purely academic purposes)
In attempting to answer this question I became intrigued about what sort of optimisations the JITer would perform - rather than speculate wildly I'd really like to be able to see for myself what is really hapenning.
So far I've:
But now I'm a bit stuck - as far as I was aware .Net assemblies are in the portable execuable format, but the normal tools that I might use to disassemble such a file (objdump) just barf:
C:\Users\justin\Desktop>objdump -d ConsoleApplication1.ni.exe
objdump: ConsoleApplication1.ni.exe: File format not recognized
Is it feasible to peek inside a native image in this way? Failing that is there some alternative way that I might be able to satisfy my curiosity? (for example disassembling the code in a running process)
I've had some success with windbg and dumpbin in the past, when trying this sort of thing.