Skip to content

ReadyToSpy #1864

Description

@cshung

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

  1. 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.

  1. 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.

  1. 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.

  1. 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:
image

This is very raw right now and we can certainly do better than that.

Next steps

  • Getting an agreement with the ILSpy owner whether or not we wanted this feature.
  • Define the feature in more detail and define the plan to work on it.

I think it is a great opportunity for us to collaborate, and I am looking forward to it.

@siegfriedpammer, @dgrunwald

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions