Comments (5)
I've begun work on this, not completed. You can see the work in progress with recent commits. Keep in mind that method tables are per type and per app domain. A single clrtype type may have multiple methodtables associated with it. Note that I have named the relevant properties "TypeHandle" as this is more accurate across all versions of clr.
More work coming this week includes getting the app domain from methodtables, mt from object address, eeclass support and so on.
If you have feedback about the design and direction please feel free to comment on the checkin or issues here.
from clrmd.
As long as you're implementing new features, I'm more and more confident I doesn't understand how CLR is designed internally at all :)
Everything looks OK to me, given that type could have multiple MTs. Is this correct for modules that are loaded to the shared domains only? I thought that each AppDomain has its own copy of modules and inner types.
The only note here is whether you keep generics in mind and how they are implemented. For instance, presence of the "canonical" types could lead to the shared EEClass for multiple MTs, etc.
from clrmd.
That is one of the main reasons that I have been hesitant to implement MethodTable support in ClrMD. ClrMD purposefully attempts to hide a lot of the messy implementation details from you. Literally the only reason I decided to implement them is so that it can interop with other tools (and to give missing functionality other tools can do).
Keep in mind that there will be a lot of weird corner cases and stuff you have to work around when dealing with the raw implementation details of CLR (such as MethodTables).
Lastly, please also keep in mind that the underlying dac API does not fully support generics. I will be able to at least provide the same level of generics support that it does, but ClrMD will not be able to fully represent all possible generics unless I make corresponding fixes to the underlying Dac API...which is difficult and unlikely.
from clrmd.
The solution of some problems are in the gore details though. So, making at available at least on demand can help a lot of people without impacting those who still cannot find any use yet 😊
Sent from my Windows Phone
From: Lee Culvermailto:[email protected]
Sent: 9/28/2015 6:13 PM
To: Microsoft/clrmdmailto:[email protected]
Subject: Re: [clrmd] Provide API get ClrType directly by MT & CMT for Desktop flavor (#13)
That is one of the main reasons that I have been hesitant to implement MethodTable support in ClrMD. ClrMD purposefully attempts to hide a lot of the messy implementation details from you. Literally the only reason I decided to implement them is so that it can interop with other tools (and to give missing functionality other tools can do).
Keep in mind that there will be a lot of weird corner cases and stuff you have to work around when dealing with the raw implementation details of CLR (such as MethodTables).
Lastly, please also keep in mind that the underlying dac API does not fully support generics. I will be able to at least provide the same level of generics support that it does, but ClrMD will not be able to fully represent all possible generics unless I make corresponding fixes to the underlying Dac API...which is difficult and unlikely.
Reply to this email directly or view it on GitHub:
#13 (comment)
from clrmd.
Added the basic support for this now. Next up will be methoddescs and EEClass support, but I'm using the other issue to track that. As such I'm closing this issue as completed.
from clrmd.
Related Issues (20)
- HotColdInfo.HotSize is missing in v2 (it's present in v1) HOT 1
- CLRMD fails to load coreclr 7.0 dump - PEImage.Read() doesn't update offset HOT 1
- CLRMD fails to load coreclr 7.0 dump - PEImage.Read() does not apply fixups HOT 3
- Disparity in Objects... HOT 1
- COMException in CacheNativeMethods.Util.EnableDisablePrivilege HOT 2
- Links on FAQ page broken...
- Getting IL and Native Code Addresses... HOT 3
- Windows arm64 support HOT 5
- The license disorientation HOT 1
- ClrMD is moving to dotnet/diagnostics HOT 1
- ClrMD 3.0 will be the next release
- Get ClrValueType similar to !DumpVC HOT 3
- This repo is missing important files
- Could not find matching DAC for process on macOS after switching to ClrMD 2.1
- ILOffsetMap points to QuickJitted assembly code even after method has been Tier-1 compiled (.NET 7+) HOT 1
- Where are the release notes for ClrMD 3.0 ? HOT 3
- Threads are not update after flush HOT 3
- ClrMd floods syslog with stackwalk messages HOT 1
- CreateStackWalk failed error messages in syslog HOT 5
- Using CreateSnapshotAndAttach leaves a process running on Linux using ClrMD 3.1.456101 and .NET 8 HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from clrmd.