Technique for iterating through variables and find

2020-07-08 21:42发布

问题:

i want to iterate through variables in memory in my process (loaded through a plugin dynamically), and look for instances of a specific type.

Previously i can find the specific types (or all types in memory). I can create instances of types, i could get instances that were contained as fields in a different type, but i don't know anyway just to "search" for instances of a specific type.

回答1:

One way would be to use windbg and sos. You can !dumpheap with a -type flag.