-
Notifications
You must be signed in to change notification settings - Fork 5.4k
Description
For a PInvoke method, there are two separate MethodDescs created:
- A
PInvokeMethodDescwhich is created from the metadata and holds a pointer to the native code target IP (once it is initialized) - A
DynamicMethodDesc(PInvoke ILStub) which is created by the JIT when the JIT generates the stub that calls into the native method.
Prior to #117901, the DynamicMethodDesc would point to the native ILStub and the ILStub codepointers could lookup the DynamicMethodDesc using EECodeInfo infrastructure. If needed, the PInvokeMethodDesc could be found using the resolver on the DynamicMethodDesc.
After the changes (relevant diff), the ILStub codepointers were modified to lookup the PInvokeMethodDesc directly. While this simplifies finding the PInvokeMethodDesc, this causes the ILStubManager to no longer recognize the code as an ILStub. In turn the debugger treats the method as a normal managed code instead of a stub.
One possible solution would be to map the PInvokeMethodDesc back to the DynamicMethodDesc and add support to the ILStubManager for this scenario. There may be other places in the diagnostics which will need to be updated.
Metadata
Metadata
Assignees
Labels
Type
Projects
Status