Skip to content

[mono][debugger] Fix assertion when stepping#118458

Merged
thaystg merged 2 commits into
dotnet:mainfrom
thaystg:dev/thays/fix_110016
Aug 6, 2025
Merged

[mono][debugger] Fix assertion when stepping#118458
thaystg merged 2 commits into
dotnet:mainfrom
thaystg:dev/thays/fix_110016

Conversation

@thaystg

@thaystg thaystg commented Aug 6, 2025

Copy link
Copy Markdown
Member

Using the same logic used on amd64.
Fixes #110016

Copilot AI review requested due to automatic review settings August 6, 2025 16:46

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 fixes assertion failures when stepping in the Mono debugger on ARM64 by aligning the breakpoint address calculation logic with the AMD64 implementation. The changes remove the division by 4 that was causing incorrect indexing into the breakpoint addresses array.

  • Removes division by 4 from the breakpoint trampoline offset calculation
  • Updates array indexing to use native_offset directly instead of native_offset/4
  • Eliminates assertions that required 4-byte alignment

Comment thread src/mono/mono/mini/mini-arm64.c Outdated
@dotnet-policy-service

Copy link
Copy Markdown
Contributor

Tagging subscribers to this area: @steveisok, @vitek-karas
See info in area-owners.md if you want to be subscribed.

@thaystg

thaystg commented Aug 6, 2025

Copy link
Copy Markdown
Member Author

/backport to release/9.0-staging

@github-actions

github-actions Bot commented Aug 6, 2025

Copy link
Copy Markdown
Contributor

Started backporting to release/9.0-staging: https://github.com/dotnet/runtime/actions/runs/16783124435

@steveisok steveisok requested a review from lateralusX August 6, 2025 17:13

@steveisok steveisok 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

@thaystg

thaystg commented Aug 6, 2025

Copy link
Copy Markdown
Member Author

/ba-g unrelated failure

@thaystg thaystg merged commit 4da283c into dotnet:main Aug 6, 2025
62 of 65 checks passed
@BrzVlad

BrzVlad commented Aug 8, 2025

Copy link
Copy Markdown
Member

@thaystg I don't really understand why the code offset would ever not be 4 byte aligned. I thought all arm64 instructions are 4 bytes ?

steveisok pushed a commit that referenced this pull request Aug 8, 2025
`bp_addrs` now needs to contain a pointer slot for every single byte in the code.

Regressed after #118458

Fixes #118519
@github-actions github-actions Bot locked and limited conversation to collaborators Sep 8, 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.

Assertion when stepping over breakpoint

4 participants