Delete debugger regdisplay#129671
Merged
Merged
Conversation
Contributor
|
Tagging subscribers to this area: @steveisok, @tommcdon, @dotnet/dotnet-diag |
Contributor
There was a problem hiding this comment.
Pull request overview
This PR removes the DebuggerREGDISPLAY plumbing from the DacDbi surface area and migrates the right-side/debugger register and stack-walk codepaths to operate directly on DT_CONTEXT (including deleting multiple platform-specific regdisplay conversion helpers).
Changes:
- Remove
DebuggerREGDISPLAYfrom native and managed DacDbi APIs (Debugger_STRDatano longer carriesrd, andConvertContextToDebuggerRegDisplayis deleted). - Delete platform-specific
SetDebuggerREGDISPLAYFromREGDISPLAYhelpers and update callers to useDT_CONTEXT-based accessors. - Refactor
CordbRegisterSet/CordbNativeFrameto store and consumeDT_CONTEXTdirectly, and adjustCORDbgGetSPto returnCORDB_ADDRESS.
Show a summary per file
| File | Description |
|---|---|
| src/native/managed/cdac/Microsoft.Diagnostics.DataContractReader.Legacy/Dbi/IDacDbiInterface.cs | Updates managed interop definitions to match the removed regdisplay pointer/method. |
| src/native/managed/cdac/Microsoft.Diagnostics.DataContractReader.Legacy/Dbi/DacDbiImpl.cs | Drops the regdisplay conversion method and updates frame enumeration commentary. |
| src/coreclr/inc/dacdbi.idl | Removes DebuggerREGDISPLAY forward decl and the regdisplay conversion method from the COM IDL. |
| src/coreclr/debug/shared/riscv64/primitives.cpp | Deletes RISCV64 regdisplay conversion helper. |
| src/coreclr/debug/shared/loongarch64/primitives.cpp | Deletes LoongArch64 regdisplay conversion helper. |
| src/coreclr/debug/shared/i386/primitives.cpp | Deletes x86 context/regdisplay conversion helpers. |
| src/coreclr/debug/shared/arm64/primitives.cpp | Deletes ARM64 regdisplay conversion helper. |
| src/coreclr/debug/shared/arm/primitives.cpp | Deletes ARM regdisplay conversion helpers. |
| src/coreclr/debug/shared/amd64/primitives.cpp | Deletes AMD64 context/regdisplay conversion helpers. |
| src/coreclr/debug/inc/riscv64/primitives.h | Changes CORDbgGetSP to return CORDB_ADDRESS. |
| src/coreclr/debug/inc/loongarch64/primitives.h | Changes CORDbgGetSP to return CORDB_ADDRESS. |
| src/coreclr/debug/inc/i386/primitives.h | Changes CORDbgGetSP to return CORDB_ADDRESS. |
| src/coreclr/debug/inc/dbgipcevents.h | Removes DebuggerREGDISPLAY struct and switches SP/FP address helpers to DT_CONTEXT. |
| src/coreclr/debug/inc/dacdbistructures.h | Removes the DebuggerREGDISPLAY* field from Debugger_STRData. |
| src/coreclr/debug/inc/dacdbiinterface.h | Removes ConvertContextToDebuggerRegDisplay from the native interface. |
| src/coreclr/debug/inc/common.h | Removes the DebuggerREGDISPLAY forward decl and related helper declaration. |
| src/coreclr/debug/inc/arm64/primitives.h | Changes CORDbgGetSP to return CORDB_ADDRESS. |
| src/coreclr/debug/inc/arm/primitives.h | Changes CORDbgGetSP to return CORDB_ADDRESS. |
| src/coreclr/debug/inc/amd64/primitives.h | Changes CORDbgGetSP to return CORDB_ADDRESS. |
| src/coreclr/debug/ee/i386/regdisplayhelper.cpp | Renames/rebrands helper file header comment to REGDISPLAY-to-REGDISPLAY transfer. |
| src/coreclr/debug/ee/debugger.h | Removes regdisplay helper declarations/macros no longer applicable. |
| src/coreclr/debug/ee/CMakeLists.txt | Updates source list to new helper filename. |
| src/coreclr/debug/ee/amd64/regdisplayhelper.cpp | Renames/rebrands helper file header comment to REGDISPLAY-to-REGDISPLAY transfer. |
| src/coreclr/debug/di/shimstackwalk.cpp | Adjusts stack pointer handling to the new CORDbgGetSP return type. |
| src/coreclr/debug/di/rsthread.cpp | Refactors register set + native frame code to use DT_CONTEXT instead of DebuggerREGDISPLAY. |
| src/coreclr/debug/di/rsstackwalk.cpp | Stops allocating/passing regdisplay buffers; passes only DT_CONTEXT through Debugger_STRData. |
| src/coreclr/debug/di/rsregsetcommon.cpp | Updates CordbRegisterSet to store a copied DT_CONTEXT and use CORDbgCopyThreadContext. |
| src/coreclr/debug/di/rspriv.h | Updates type members and constructor signatures to remove DebuggerREGDISPLAY usage. |
| src/coreclr/debug/di/riscv64/cordbregisterset.cpp | Removes the unused regdisplay-to-context helper (RISCV64 still NYI for GetRegisters). |
| src/coreclr/debug/di/loongarch64/cordbregisterset.cpp | Refactors register reads to use DT_CONTEXT and deduplicates mapping via a helper. |
| src/coreclr/debug/di/i386/cordbregisterset.cpp | Switches register reads from regdisplay fields to DT_CONTEXT. |
| src/coreclr/debug/di/arm64/cordbregisterset.cpp | Switches register reads from regdisplay fields to DT_CONTEXT. |
| src/coreclr/debug/di/arm/cordbregisterset.cpp | Switches register reads from regdisplay fields to DT_CONTEXT. |
| src/coreclr/debug/di/amd64/cordbregisterset.cpp | Switches register reads from regdisplay fields to DT_CONTEXT. |
| src/coreclr/debug/daccess/dacdbiimplstackwalk.cpp | Deletes regdisplay conversion implementation and stops populating Debugger_STRData::rd. |
| src/coreclr/debug/daccess/dacdbiimpl.h | Removes the regdisplay conversion method declaration from the DAC implementation. |
Copilot's findings
- Files reviewed: 36/36 changed files
- Comments generated: 4
jkotas
reviewed
Jun 21, 2026
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
max-charlamb
approved these changes
Jun 22, 2026
max-charlamb
left a comment
Member
There was a problem hiding this comment.
Seems reasonable to me, but @noahfalk may want to take a look.
Looks like there is a build break caused by these changes.
Contributor
Author
|
/ba-g x86 was down |
am11
reviewed
Jun 25, 2026
| HRESULT hr = S_OK; | ||
| EX_TRY | ||
| { | ||
| pThread->LoadFloatState(); |
Member
There was a problem hiding this comment.
This is not implemented on loomgarch64 and riscv64, synced them both in #129854
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This is not intended to be the final form; I intend to delete these platform-specific register readers altogether. This is just the first stage of a larger refactor, separated out such that we can remove the associated DacDbi API as well as remove the data structure from the API surface.