-
Notifications
You must be signed in to change notification settings - Fork 5k
[cDAC] Stack Walking #110758
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
Comments
Tagging subscribers to this area: @tommcdon |
I would recommend the following approach for the context:
If it was desired to map all registers and offsets to manually assign them out at the cDAC boundary, the data descriptor could have all of the fields for all of the register names for each platform, and then the cdac would do an if-else chain to dynamically read the field offsets and assign them to the buffer depending on the target runtime's architecture. However, even in this case, I'd recommend having well-known names for the above-mentioned registers if there's any contract implementation or logic that uses them as it makes it easier to implement the algorithms with less platform-specific goo. |
dotnet/runtime#110758 Given the cDAC only supports a small subset of the DAC apis, I have created some pared down tests that are `CDACCompatible`. Steps to run tests with cDAC: 1. Build diagnostics repo. 2. Build runtime repo. 3. Run `eng\privatebuild.cmd` in the diagnostics repo 4. Copy over relevant files from runtime repo to `.\dotnet-test`. See https://github.com/dotnet/diagnostics/blob/main/documentation/privatebuildtesting.md for example. Note, with the addition of the cDAC, `cdacreader.dll` and all of the dll's under `cdaclibs` must be copied over as well. 5. Run `eng\testsoscdac.cmd` in the diagnostics repo. The cDAC can be debugged in these tests by running the tests script with `$env:VSTEST_HOST_DEBUG=1` which waits for a debugger to attach to the test host. Use VS with the [Child Process Debugging Power Tool](https://marketplace.visualstudio.com/items?itemName=vsdbgplat.MicrosoftChildProcessDebuggingPowerTool2022) to selectively debug `cdb.exe` child process. Note this requires using mixed mode debugging. --------- Co-authored-by: Max Charlamb <[email protected]> Co-authored-by: Steve Pfister <[email protected]>
In order to support SOS
!analyze
the cDAC must implement stack walking through the following APIs:For more infomation on stackwalking, see StackWalk.md
Work Items
Covert Frames to use an Enum intead of vptr #111875 - Use enum for frametype not v table #112166 Required to identify Frames through datadescriptors at compile time.
Convert dynamically linked native libs to statically linked 113627
Fetching initial thread context - [cDAC] Implement core stackwalking #111759
cDAC native interop to call unwinders - [cDAC] Implement core stackwalking #111759
Automate SOS tests to run against cDAC in CI
[cDAC] Implement
ClrDataAccess::GetFrameName
#112274[cDAC] Support building and linking cross targeted cDAC unwinders on all platforms #112272
[cDAC] Implement support for filtering on
IXCLRDataTask::CreateStackWalk
#112277On ARM64 Linux (maybe other platforms) the contract descriptor is not included in Heap minidumps.
Create cDAC entrypoint same as DAC
CLRDataCreateInstance
#112583Lower Priority Items
IXCLRDataTask.CreateStackWalk
#112366 - Not used in!analyze
IXCLRDataStackWalk::Request
support forCLRDATA_REQUEST_REVISION
andCLRDATA_STACK_WALK_REQUEST_SET_FIRST_FRAME
#112275 - Not used in!analyze
x64 and arm64 specific Work Items
Initial implementation will focus on x64 stack walking before expanding to all supported platforms.
CONTEXT
on x64 and arm64. [cDAC] Implement core stackwalking #111759IXCLRDataStackWalk
- [cDAC] Implement core stackwalking #111759Lower Priority Items
x86 and arm32 specific Work Items
CONTEXT
on x86 and arm32Paths Forwards
The text was updated successfully, but these errors were encountered: