[Mono-list] Managed disassembler?

Jackson Harper jackson@ximian.com
Mon, 26 Apr 2004 14:08:26 -0700


Hello,

	Currently PERWAPI seems to be unfinished/unreleased and has been for
some time. If you are willing to do some work Mono.PEToolkit
(mcs/class/Mono.PEToolkit) actually does what you would need, but will
need a little API love to make it work the way you want. Also look at
the command line interface for monodis, it does everything you need and
you could either A) Pinvoke into it (might require some love too), or B)
call it and parse its text.

Hope this helps,
Jackson


On Mon, 2004-04-26 at 11:49, Stuart Ballard wrote:
> I'm looking for any kind of C# API for reading IL assemblies and 
> introspecting on the contents of the methods. I don't need to go as far 
> as getting all the information to produce dissassembled ilasm source 
> code, but that's a superset of my needs: if someone had produced a 
> managed disassembler, it would be more than enough for what I want to 
> achieve.
> 
> What I actually need is just to identify all method calls and references 
> to types outside the assembly I'm loading.
> 
> At first I thought I'd just take the necessary parts of monodis, but it 
> turns out that's unmanaged C code. Is that just historical accident?
> 
> PEAPI appears to be write-only as does S.R.Emit. There is mention of a 
> PERWAPI read-write API on the PEAPI homepage, but googling for that only 
> gives PEAPI and a couple of blog entries. One of the blog entries 
> mentions AbsIL, with a 404 link to research.microsoft.com (so unlikely 
> to be Free Software).
> 
> Anyone have any other suggestions?
> 
> Thanks,
> Stuart.