microsoft / clrmd

Microsoft.Diagnostics.Runtime is a set of APIs for introspecting processes and dumps.
MIT License
1.05k stars 254 forks source link

Fix the way of getting ClrMethod from method handle or instruction pointer #1240

Closed hez2010 closed 6 months ago

hez2010 commented 6 months ago

The existing implementation is not able to get the method from an instantiated method handle or instruction pointer, as type.Methods only contains typical uninstantiated MethodDescs. Change the way how we get ClrMethod to support getting instantiated method as well.

leculver commented 6 months ago

I was just debugging this and created a PR before I saw yours, so you beat me to it. :)

I'll merge yours instead, thanks for the submission! I'll push a build tomorrow morning to NuGet