Skip to content

Conversation

thaystg
Copy link
Member

@thaystg thaystg commented Aug 6, 2025

Using the same logic used on amd64.
Fixes #110016

@Copilot Copilot AI review requested due to automatic review settings August 6, 2025 16:46
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 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

Copy link
Contributor

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

@thaystg
Copy link
Member Author

thaystg commented Aug 6, 2025

/backport to release/9.0-staging

Copy link
Contributor

github-actions bot commented Aug 6, 2025

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
Copy link
Member

@steveisok steveisok left a comment

Choose a reason for hiding this comment

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

LGTM

@thaystg
Copy link
Member Author

thaystg commented Aug 6, 2025

/ba-g unrelated failure

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

BrzVlad commented Aug 8, 2025

@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
3 participants