Delete ICorDebugProcess11#128042
Open
Copilot wants to merge 3 commits into
Open
Conversation
…s API Co-authored-by: rcj1 <77995559+rcj1@users.noreply.github.com>
Copilot
AI
changed the title
E_NOTIMPL EnumerateLoaderHeapMemoryRegions and remove GetLoaderHeapMemoryRanges
Return E_NOTIMPL for loader-heap memory region enumeration and remove GetLoaderHeapMemoryRanges
May 11, 2026
Contributor
|
Tagging subscribers to this area: @steveisok, @tommcdon, @dotnet/dotnet-diag |
Contributor
There was a problem hiding this comment.
Pull request overview
This PR disables loader-heap memory range enumeration in the CoreCLR debugging API by making ICorDebugProcess11::EnumerateLoaderHeapMemoryRegions return E_NOTIMPL, and removes the underlying DAC/DBI plumbing (IDacDbiInterface::GetLoaderHeapMemoryRanges) that previously supported the feature.
Changes:
- Return
E_NOTIMPLfromCordbProcess::EnumerateLoaderHeapMemoryRegionsinstead of building aCordbMemoryRangeEnumeratorfrom DAC-provided ranges. - Remove
GetLoaderHeapMemoryRangesfrom the DAC/DBI interface surface (IDL + C++ headers + DAC implementation). - Remove the corresponding managed COM projection and forwarding stub in the legacy managed cDAC layer.
Show a summary per file
| File | Description |
|---|---|
| src/native/managed/cdac/Microsoft.Diagnostics.DataContractReader.Legacy/Dbi/IDacDbiInterface.cs | Removes the managed COM projection entry for GetLoaderHeapMemoryRanges. |
| src/native/managed/cdac/Microsoft.Diagnostics.DataContractReader.Legacy/Dbi/DacDbiImpl.cs | Removes the managed implementation/forwarder for GetLoaderHeapMemoryRanges. |
| src/coreclr/inc/dacdbi.idl | Removes GetLoaderHeapMemoryRanges from the IDL contract. |
| src/coreclr/debug/inc/dacdbiinterface.h | Removes GetLoaderHeapMemoryRanges from the C++ interface declaration. |
| src/coreclr/debug/di/process.cpp | Simplifies EnumerateLoaderHeapMemoryRegions to return E_NOTIMPL. |
| src/coreclr/debug/daccess/dacdbiimpl.h | Removes the DAC-side declaration and helper declarations related to loader-heap range enumeration. |
| src/coreclr/debug/daccess/dacdbiimpl.cpp | Removes the DAC-side implementation that enumerated loader allocator + JIT code heap ranges. |
Copilot's findings
- Files reviewed: 7/7 changed files
- Comments generated: 2
…ANGE Co-authored-by: rcj1 <77995559+rcj1@users.noreply.github.com>
Copilot
AI
changed the title
Return E_NOTIMPL for ICorDebugProcess11::EnumerateLoaderHeapMemoryRegions
Delete ICorDebugProcess11
May 11, 2026
Contributor
There was a problem hiding this comment.
Copilot's findings
Comments suppressed due to low confidence (4)
src/coreclr/inc/dacdbi.idl:435
- Removing
GetLoaderHeapMemoryRangesfromIDacDbiInterfacechanges the COM vtable layout for all subsequent methods (e.g.,IsModuleMapped,MetadataUpdatesApplied, etc.). This is a protocol-breaking change for any scenario where DBI/DAC binaries can be mixed across versions, and typically requires either (1) keeping the method slot (returningE_NOTIMPL), or (2) introducing a new interface IID/version and negotiating viaQueryInterface, and/or (3) bumping/strengthening the DBI↔DAC protocol breaking-change version check so mismatched components fail before calling shifted slots.
// Module Mapping
HRESULT IsModuleMapped([in] VMPTR_Module pModule, [out] BOOL * isModuleMapped);
HRESULT MetadataUpdatesApplied([out] BOOL * pResult);
HRESULT GetAssemblyFromModule([in] VMPTR_Module vmModule, [out] VMPTR_Assembly * pvmAssembly);
src/coreclr/debug/inc/dacdbiinterface.h:2279
GetLoaderHeapMemoryRangeswas removed fromIDacDbiInterface, which shifts vtable slots for everything after it. Unless the DBI↔DAC version/protocol negotiation is guaranteed to prevent mixed-version calls into these later methods, this can lead to calling the wrong function pointer at runtime. Consider keeping the slot (returnE_NOTIMPL) or versioning the interface (new IID) rather than removing an existing method from the middle of the contract.
virtual HRESULT STDMETHODCALLTYPE IsModuleMapped(VMPTR_Module pModule, OUT BOOL *isModuleMapped) = 0;
virtual HRESULT STDMETHODCALLTYPE MetadataUpdatesApplied(OUT BOOL * pResult) = 0;
src/coreclr/inc/cordebug.idl:3333
ICorDebugProcess11(and relatedICorDebugMemoryRangeEnum/COR_MEMORY_RANGE) is removed from the public ICorDebug IDL. This is a breaking change for any external debugger that previouslyQueryInterfaced forICorDebugProcess11(even if the method was rarely used). Please confirm this interface was never shipped/supported, or consider leaving the interface defined and implemented as a stub returningE_NOTIMPL(or following whatever deprecation/breaking-change process is expected for ICorDebug COM surface).
[
object,
local,
uuid(4DCD6FB9-3CF0-43F0-9EDF-E833070FE644),
pointer_default(unique)
]
interface ICorDebugProcess12 : IUnknown
{
HRESULT GetAsyncStack([in] CORDB_ADDRESS continuationAddress, [out] ICorDebugStackWalk** ppStackWalk);
}
src/coreclr/debug/di/process.cpp:2100
- Runtime behavior change:
CordbProcess::QueryInterfaceno longer returnsICorDebugProcess11. If any external debugger relied on this being available, it will now seeE_NOINTERFACE. Please ensure this COM interface removal is intentional/approved and that any consumers (e.g., VS/debugger tooling) don’t rely on it.
else if (id == IID_ICorDebugProcess12)
{
*pInterface = static_cast<ICorDebugProcess12*>(this);
}
- Files reviewed: 11/11 changed files
- Comments generated: 2
Comment on lines
116
to
120
| typedef int COR_TYPEID; | ||
| typedef int COR_FIELD; | ||
| typedef int COR_TYPE_LAYOUT; | ||
| typedef int COR_ARRAY_LAYOUT; | ||
| typedef int COR_HEAPINFO; |
| @@ -2919,7 +2914,6 @@ class CordbProcess : | |||
| public ICorDebugProcess5, | |||
| public ICorDebugProcess7, | |||
| public ICorDebugProcess8, | |||
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.
Removes
ICorDebugProcess11and its associated types (ICorDebugMemoryRangeEnum,COR_MEMORY_RANGE) — the single methodEnumerateLoaderHeapMemoryRegionswas unused.