Skip to content

Conversation

max-charlamb
Copy link
Member

No description provided.

@max-charlamb max-charlamb marked this pull request as ready for review August 13, 2025 19:43
@Copilot Copilot AI review requested due to automatic review settings August 13, 2025 19:43
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR implements the IXCLRDataMethodInstance::GetILOffsetsByAddress method in the cDAC data contract system. The implementation adds support for reading debug information that maps native code addresses to IL offsets, which is essential for debugging scenarios where mapping between native and managed code is needed.

Key Changes:

  • Adds a new IDebugInfo contract for accessing debug information from native code
  • Implements debug info parsing for both jitted code (EEJitManager) and ReadyToRun code (ReadyToRunJitManager)
  • Updates execution manager to provide debug info access through GetDebugInfo method

Reviewed Changes

Copilot reviewed 35 out of 37 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
src/native/managed/cdac/mscordaccore_universal/Legacy/ClrDataMethodInstance.cs Implements the main GetILOffsetsByAddress method with debug validation
src/native/managed/cdac/Microsoft.Diagnostics.DataContractReader.Contracts/Contracts/DebugInfo/DebugInfo_1.cs Core debug info parsing implementation with bounds data decoding
src/native/managed/cdac/Microsoft.Diagnostics.DataContractReader.Contracts/Contracts/ExecutionManager/ExecutionManagerCore.EEJitManager.cs Debug info access for jitted code via RealCodeHeader
src/native/managed/cdac/Microsoft.Diagnostics.DataContractReader.Contracts/Contracts/ExecutionManager/ExecutionManagerCore.ReadyToRunJitManager.cs Debug info access for ReadyToRun code via native arrays
src/coreclr/vm/readytoruninfo.cpp Updates ReadyToRun initialization to cache debug info section
src/coreclr/tools/aot/ILCompiler.Reflection.ReadyToRun/NativeReader.cs Changes Stream.Read to ReadExactly for exact byte reading

@max-charlamb max-charlamb merged commit 80912f6 into dotnet:main Aug 20, 2025
99 of 101 checks passed
@max-charlamb max-charlamb deleted the cdac-symbol-reading-4 branch August 20, 2025 13:42
@github-actions github-actions bot locked and limited conversation to collaborators Sep 20, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants