-
Notifications
You must be signed in to change notification settings - Fork 4.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[cdac] Implement !PrintException
#99302
Comments
Tagging subscribers to this area: @tommcdon Issue Detailsnull
|
DAC interfaces used by CLRMA https://github.com/mikem8361/diagnostics/blob/clrma/documentation/clrma.md#dac-interfaces-used-by-clrma Managed stack walking:
|
Add new details to the RuntimeTypeSystem and Loader contracts as needed to load metadata and examine and identify all of the kinds of type that the CoreCLR type system can represent Add a type name generator based on a line by line copy from the CoreCLR codebase Add an Ecma335 metadata parser which is pure safe managed code, and is capable of loading metadata that is not structured as a single array. This implementation is heavily based on the dnmd implementation. It is intended that this implementation is short-lived, and really ought to be replaced by dnmd or System.Reflection.Metadata when those apis become suitable for use in this scenario. Provide implementations and documentation for all of the new contracts except for the RW metadata one. (Its rarely needed, so we can add it later) Enhance the target infrastructure to better handle various forms of arrays, and contracts which do math based on target pointer sizes. Contributes to #99302
Add a number of new `MethodDesc` contract definitions | Contract algorithm on RuntimeTypeSystem | | --- | | `IsGenericMethodDefinition`| |`GetGenericMethodInstantiation`| |`GetMethodToken`| |`IsArrayMethod`| |`IsDynamicMethod`| |`IsStoredSigMethodDesc`| |`IsNoMetadataMethod`| |`IsILStub`| Update cDAC compat asserts in cDAC to always be enabled by using a tls variable in `mscordaccore` Implement `GetMethodDescName` on `ISOSDacInterface` in the `cdacreader` Stub out an implementation of `GetPath` in the `Loader` contract used in a fallback after a fallback. This will need further work, but is included to make sure the code path isn't lost. Fix the `EcmaMetadataReader` to be able to find blobs in the metadata Add ability to read target data from a buffer held on the cdac side using the `Target` class. This was needed to handle signature containing a `CorElementType.Internal`. And finally actually implement the name generation algorithm via a line for line port from the CoreCLR codebase. Contributes to #99302
The CodeVersions contract implements the IL and native code versioning as described in [code-versioning.md](docs/design/features/code-versioning.md) Contributes to dotnet#108553 Contributes to dotnet#99302 * rename contract NativeCodePointers => CodeVersions * FindActiveILCodeVersion * implement GetModuleLookupMapElement * FindActiveILCodeVersion/FindActiveNativeCodeVersion * il code version lookup table * remove AppDomain.CodeVersionManager from cdac * CodeVersionManager is basically a static class in the C++ side * NativeCodeVersionContract.GetSpecificNativeCodeVersion * checkpoint: start adding NativeCodeVersion operations * WIP: native code version
* [cdac] Add a CodeVersions contract The CodeVersions contract implements the IL and native code versioning as described in [code-versioning.md](docs/design/features/code-versioning.md) Contributes to #108553 Contributes to #99302 * rename contract NativeCodePointers => CodeVersions * FindActiveILCodeVersion * implement GetModuleLookupMapElement * FindActiveILCodeVersion/FindActiveNativeCodeVersion * il code version lookup table * remove AppDomain.CodeVersionManager from cdac * CodeVersionManager is basically a static class in the C++ side * NativeCodeVersionContract.GetSpecificNativeCodeVersion * checkpoint: start adding NativeCodeVersion operations * WIP: native code version * tighter cdac_data friends * remove unused DataType values they'll come in from a future PR * move ecma metadata helpers to their own class * WIP: CodeVersionsTests * WIP: TestGetNativeCodeVersionOneVersionVersionable * implement GetNativeCode for a NativeCodeVersionNode handle * checkpoint: TestGetNativeCodeVersionOneVersionVersionable passes * Add TestGetActiveNativeCodeVersionDefaultCase * don't add ILCodeVersioningState::Next field yet * describe Loader::GetModuleLookupMapElement contract * remove unused member * update contract markdown * simplify flags handling a bit * add TODOs for RuntimeTypeSystem additions
Part of #99298
This will require bringing up a basic data stream reader and registering enough data types and instances in the runtime so that we can get at the exception.
.NET 10
ISOSDacInterface9::GetBreakingChangeVersion
([cdac] Read/store globals from contract descriptor #101450)ISOSDacInterface::GetThreadStoreData()
([cdac] Implement GetThreadStoreData in cDAC #102404)ISOSDacInterface::GetThreadData()
([cdac] Implement ISOSDacInterface.GetThreadData #103324)ISOSDacInterface::GetNestedExceptionData()
([cdac] Implement ISOSDacInterface::GetNestedExceptionData #103668)PEAssembly
in the SOS DAC APIs - return/consume (including inDacpModuleData
) pointers to aModule
instead, and avoid exposing PEAssembly in the cDAC contracts. (Make DAC return Module instead of PEAssembly for DacpModuleData::PEAssembly #103821, Remove printing of DacpModuleData::PEAssembly from DumpModule command diagnostics#4751)ISOSDacInterface::GetMethodTableData()
([cdac] start of RuntimeTypeSystem contract; implement GetMethodTableData SOS method #103444)ISOSDacInterface::GetModuleData()
([cdac] Start Loader contract and implement ISOSDacInterface::GetModuleData in cDAC #104257)ISOSDacInterface2::GetObjectExceptionData()
(* This is where the stack trace comes from - uses the stack trace array on the exception object) ([cdac] Implement ISOSDacInterface2::GetObjectExceptionData #104343)ISOSDacInterface::GetObjectData()
ISOSDacInterface::GetObjectStringData()
([cdac] Implement GetObjectStringData #105061)ISOSDacInterface::GetMethodDescData()
GetMethodDescData
ISOSDacInterface::GetMethodTableName()
- big, traverses a lot of metadata (cDac work necessary to get the MethodTableName #104759)ISOSDacInterface::GetMethodDescName()
- big, traverses a lot of metadata (Implementation of SOSDacApi GetMethodDescName for cDAC #106169)ISOSDacInterface::GetPEFileName()
Module
for easier diagnostics #106103ISOSDacInterface::GetUsefulGlobals()
([cdac] Implement ISOSDacInterface::GetUsefulGlobals #105106)ISOSDacInterface::GetModule()
IXCLRDataModule::GetFileName()
Additionally see sos_printexception_walkthrough.md#exception-informaiton for a walkthrough of the relationship of these interfaces to what SOS is doing
For CLRMA, we will need a few additional methods:
https://github.com/dotnet/diagnostics/blob/main/documentation/clrma.md#dac-interfaces-used-by-clrma
.NET 9
We maintain a branch
feature/9.0-cdac-backports
that has selected data descriptor and contract changes necessary for the cdacreader to interrogate a net9.0 runtime. The backports to this branch include:Replaces
[cdac][.NET9] Data descriptor changes for GetMethodDescData #106417The text was updated successfully, but these errors were encountered: