Skip to content
This repository was archived by the owner on Nov 13, 2026. It is now read-only.

Do not use PDB for methods that had their IL replaced - #1251

Merged
jkotas merged 4 commits into
dotnet:masterfrom
MichalStrehovsky:generatedSymbols
May 10, 2016
Merged

jkotas merged 4 commits into
dotnet:masterfrom
MichalStrehovsky:generatedSymbols

Conversation

@MichalStrehovsky

Copy link
Copy Markdown
Member

PDB info is useless for those.

return null;

// If IL is not backed by EcmaMethodIL, the body was generated by the compiler and the PDB won't match.
if (!(uninstantiatedMethodIL is EcmaMethodIL))

@jkotas jkotas May 8, 2016 •

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This assumes that we always substitute EcmaMethodIL with non-EcmaMethodIL. It happens to be the case today, but it would be nice if we handled substituting one EcmaMethodIL with a different EcmaMethodIL (we are not that far from it with the MCG interop hook ...).

Would it make sense to change the return type of the new virtual method to MethodDesc (or maybe even Object)? It would identify where the IL actually came from.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I added a new virtual to MethodIL that describes the originating MethodDesc. I kept the other one I introduced because it's still useful to be able to get to the definition MethodIL for a particular InstantiatedMethodIL.

(It will be useful once I start the work to do the disassembly - I'm postponing that to a later pull request.).

We haven't seen this failing in the CI runs because those don't pick up
symbols for `System.Private.CoreLib` - the name `_this` conflicts with a
local name in `Array<T>`.

We're compiling `Array<T>` methods in CppCodeGen mode ever since I added
support for variant interface dispatch.
This is used to locate debugging information associated with a
`MethodIL`. `ILProvider` can do various substitutions redirecting
methods to other methods (e.g. MCG pregenerated interop) and this lets
the various other components to be oblivious to it.
@jkotas

jkotas commented May 10, 2016

Copy link
Copy Markdown
Member

LGTM

@jkotas
jkotas merged commit 5eb66f7 into dotnet:master May 10, 2016
@MichalStrehovsky
MichalStrehovsky deleted the generatedSymbols branch May 10, 2016 04:48
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants