Repository navigation
Do not use PDB for methods that had their IL replaced - #1251
Conversation
| 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)) |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
Fixes first part of dotnet#1192.
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.
e8fe865 to
99e5c30
Compare
|
LGTM |
PDB info is useless for those.