Skip to content

Support reading naot crashinfo via module export - #5528

Merged
tommcdon merged 16 commits into
dotnet:mainfrom
tommcdon:dev/tommcdon/support_naot_crashinfo_export
Jul 30, 2025
Merged

tommcdon merged 16 commits into
dotnet:mainfrom
tommcdon:dev/tommcdon/support_naot_crashinfo_export

Conversation

@tommcdon

Copy link
Copy Markdown
Member

SOS supports reading NAOT crash information using a JSON encoding mechanism. The mechanism relies on passing the serialized exception address via a FailFast exception parameter along with a special code. SOS can read this data via !crashinfo as well as !clrma. As of dotnet/runtime#117832, NAOT can serialize exception data when ExceptionHandling.RaiseAppDomainUnhandledExceptionEvent is called. This PR adds the corresponding SOS functionality to locate the g_CrashInfoBuffer global as an alternate mechanism in the event the exception does not contain the address of the buffer. Since this requires reading module exports, this change introduces a configurable module enumeration mechanism via the !crashinfo command.

@tommcdon tommcdon added this to the 10.0.0 milestone Jul 25, 2025
@tommcdon tommcdon self-assigned this Jul 25, 2025
@tommcdon tommcdon added the sos label Jul 25, 2025
@tommcdon
tommcdon requested a review from a team as a code owner July 25, 2025 17:30
@agocke
agocke requested a review from MichalStrehovsky July 25, 2025 17:38

@MichalStrehovsky MichalStrehovsky left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM although I don't think I can provide better feedback than an LLM would do.

Comment thread src/Microsoft.Diagnostics.DebugServices.Implementation/CrashInfoService.cs Outdated
steveisok
steveisok previously approved these changes Jul 29, 2025
Co-authored-by: Michal Strehovský <MichalStrehovsky@users.noreply.github.com>
@tommcdon
tommcdon dismissed stale reviews from steveisok and MichalStrehovsky via b98d8cd July 29, 2025 15:44
@tommcdon
tommcdon force-pushed the dev/tommcdon/support_naot_crashinfo_export branch from 805be36 to a5debf8 Compare July 29, 2025 18:38
@tommcdon
tommcdon enabled auto-merge (squash) July 30, 2025 04:33
@steveisok
steveisok self-requested a review July 30, 2025 14:32
@tommcdon
tommcdon merged commit aa810aa into dotnet:main Jul 30, 2025
@github-actions github-actions Bot locked and limited conversation to collaborators Aug 30, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants