In WinDbg, I used !name2ee to find a baseclass's EEClass and MethodTable. How can I find all instances that inherit from that specific type?
Find all instances that inherit from base class
706 Views Asked by avivr At
1
There are 1 best solutions below
Related Questions in DEBUGGING
- How to pass the value of a function of one class to a function of another with the @property decorator
- Visual Studio C++, breakpoints not stopping debugging DLL (GODOT GDExtention)
- Playwright JS: Getting an error when debugging using line numbers
- C++ skips line when promting for user to enter name of person being added to a string array
- Xcode: Can't Attach to process
- unity navmeshsurface prefab not found or whatever
- It seems to be a bug about "base::trace()" or "methods:::.TraceWithMethods()"?
- How to check reference counting issues when doing direct manipulations of CPython objects?
- How to scroll to the bottom of console window in PyCharm2019 automatically?
- need help debugging prolog
- Is there a way to deactivate (but not delete) conditional breakpoints when debugging?
- How can i debug a python exe which is created by using pyinstaller?
- Increment or Decrement volume programmatically on Xiaomi device adjusts it by 10 steps instead of one step
- Checking request JSON with image data
- Why cannot I set font of `xlabel` in `plotmf` in MATLAB?
Related Questions in CLR
- Making a CLI CPP project from static library to DLL is causing LNK2020 linking errors
- Does CLR add overhead fields to type which value is null?
- Where and how are IL opcodes implemented in the .NET runtime source code
- SQL Server Error 15441 - Database is no longer enabled for subscriptions
- What does 'has a SUC' mean?
- Looking for clr/cli code where a structure is returned from c# method to win32 vc++ dll
- Visual Studio 2022 CLR Empty Project (.NET Framework) entry point is not working, even after being set
- Creating a stored procedure in SQL Server using the CLR assembly (C#)
- Do we have to use `CompareExchange` rather than `Exchange` in a hybridLock lock that uses AutoResetEvent?
- what Win32 funcntion does WaitOneCore call internally?
- The Common Language Runtime (CLR) was loaded in an unsupported manner
- How to get a list of all packages that a .NET solution ACTUALLY requires?
- How to call a delegate in C# (Windows forms) from an unmanaged C++ dll
- Exception code c0020001 on shutdown - how to determine which managed code function didn't run?
- How to use python callback function to get return string values from a C# Dll method
Related Questions in WINDBG
- WinDbg of .Net application shows 2 threads with locks, but empty !locks and !syncblk
- using WinApi 32 in Windbg Breakpoints based actions
- Windows kernel debugging with windbg through network: is there an alternative to ".kdfiles"?
- WinDbg session does not connect
- TEB representation for ARM64, xpr register
- How to pull .natvis data out of a PDB?
- Exception code c0020001 on shutdown - how to determine which managed code function didn't run?
- How Windows Handle to associate corresponding object type?
- Is there any way to debugging Windows XP/2000 BSOD during installation?
- Viewing the named security attributes for token in windbg (kernel mode)
- DLL not found when Debugg using Windbg for Windows7
- Understanding the Dump for w3p app with WinDbg
- find driverObject from module address using windbg kernel mode debugging
- core dump files batch processing (Windows)
- Invalid Pointer Read (Access Violation) from undocumented KERNELBASE methods crashing Windows Services
Related Questions in SOS
- When dragging the slider, the 15 minute candle chart does not update, but the 5-minute candlestick chart updates
- Calculator operators not working in calculator (JavaScript - beginner level)
- WinDbg and SOS: get method return type
- Windbg C# dump analysis: how to retrieve the module an object belongs to?
- How to make a call when click on button in Android studio?
- How i can send a sms message (SOS) to a saved contact by shaking the phone - Android Studio
- Is it possible to use SOS with a .NET7 AOT application?
- How to query profiler instrumented IL code address using Windbg and SOS extension?
- How do I incorporate an if statement inside of another if statement?
- Windby loadby sos clr does nothing
- Use SOS.dll from Windbg extension
- C++ client socket sends original file and file size, Java client always get 8 bytes more. Even after force limiting to -8 bytes file is unreadable
- How to get the custom attributes of a method?
- WinDbg display CLR (c#) exceptions using SOS
- How to look for a thread with specific call stacks (from thousands of threads)
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Popular # Hahtags
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
I wish there is an easy answer and someone else can solve it easier than this.
Background information
dump all objects in a way you can get the addresses from the output:
!dumpheap -shortloop over all those objects
.foreach ( adr {!dumpheap -short}) { ... }The method table will be the first pointer size bytes at the address of the object, so instead of
!do <address>to find the method table, you can also do? poi(<address>).!dumpmtdoes not list the base class, so you need to find it yourself. On 64 bit, the base class is 16 bytes away, so to get the type of a base class from an object address, you can do!dumpmt poi(poi(<address>)+0x10). You can repeat that to get the base-base class:!dumpmt poi(poi(<address>)+0x10)+0x10).You can repeat this until the pointer is 0x00000000, which means you have reached System.Object and there is no more base class.
Since you want to automate this process, you need to put that into a loop as well:
r$t0 =poi(<address>); .while(@$t0) { .if(@$t0 == <basemt>) {...}; r$t0=poi(@$t0+0x10);}Do whatever you want with the address, e.g. just list it:
.echo ${adr}or dump it:!do ${adr}.Put it all together.
Example
Since I don't know what you're looking for, I'll use
Exceptionas an example. And since there's always aStackOverflowException,OutOfMemoryExceptionandExecutionEngineExceptionin any .NET program, it should at least find three objects if you try it.So the
<basemt>parameter which I'm looking for is000007fef2776738.The full statement is now (formatted for readability):
or (formatted for copy & paste):