ReadyToSpy
I am writing this issue as a proposed new feature in ILSpy called ReadyToSpy.
Background
.NET Core introduced ReadyToRun, a new file format that contains pre-compiled native code, together with some useful metadata to describe the native code.
.NET Core 'provided' a tool named R2RDump for inspecting those data. The tool can be configured to dump all the information to stdout. The information includes CPU native instructions, information to report to GC, how to unwind the stack, how the debugger understands the native code, and more.
Core Proposal
I propose we can display that information in ILSpy. This can be viewed in the natural ILSpy way.
Benefits
- Make the information available:
The R2RDump tool is not available as part of .NET Core install, as a result, people probably do not know this tool exists.
- Make the information more accessible:
Working with a giant text file can be inconvenient. The tree structure provided by the ILSpy makes the information more accessible.
- Make the information more understandable:
I have ways to make the information more understandable by weaving it with the code. For example, in dotnet/diagnostics#452, @neeraj9 and I made the line mapping information more understandable by weaving it with the disassembly. We can do the same here.
- Make the information more interactive:
I noticed that in ILSpy, I could make links. The links could potentially make navigating the disassembly easier.
Progress
I have started prototyping the idea, and I am able to display some raw disassembly with ILSpy. The prototype code is available in my fork using private bits from my refactoring to make the information accessible outside of the R2RDump tool. I also used the iced disassembler by @0xd4d.
Here is what I see in my prototype:

This is very raw right now and we can certainly do better than that.
Next steps
I think it is a great opportunity for us to collaborate, and I am looking forward to it.
@siegfriedpammer, @dgrunwald
ReadyToSpy
I am writing this issue as a proposed new feature in ILSpy called ReadyToSpy.
Background
.NET Core introduced ReadyToRun, a new file format that contains pre-compiled native code, together with some useful metadata to describe the native code.
.NET Core 'provided' a tool named
R2RDumpfor inspecting those data. The tool can be configured to dump all the information tostdout. The information includes CPU native instructions, information to report to GC, how to unwind the stack, how the debugger understands the native code, and more.Core Proposal
I propose we can display that information in ILSpy. This can be viewed in the natural ILSpy way.
Benefits
The
R2RDumptool is not available as part of .NET Core install, as a result, people probably do not know this tool exists.Working with a giant text file can be inconvenient. The tree structure provided by the ILSpy makes the information more accessible.
I have ways to make the information more understandable by weaving it with the code. For example, in dotnet/diagnostics#452, @neeraj9 and I made the line mapping information more understandable by weaving it with the disassembly. We can do the same here.
I noticed that in ILSpy, I could make links. The links could potentially make navigating the disassembly easier.
Progress
I have started prototyping the idea, and I am able to display some raw disassembly with ILSpy. The prototype code is available in my fork using private bits from my refactoring to make the information accessible outside of the
R2RDumptool. I also used theiceddisassembler by @0xd4d.Here is what I see in my prototype:

This is very raw right now and we can certainly do better than that.
Next steps
I think it is a great opportunity for us to collaborate, and I am looking forward to it.
@siegfriedpammer, @dgrunwald