Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

runtime: support debugCall on arm64 [1.18 backport] #52699

Closed
gopherbot opened this issue May 4, 2022 · 6 comments
Closed

runtime: support debugCall on arm64 [1.18 backport] #52699

gopherbot opened this issue May 4, 2022 · 6 comments
Labels
CherryPickApproved
Milestone

Comments

@gopherbot
Copy link

@gopherbot gopherbot commented May 4, 2022

@tinyfluffs requested issue #50614 to be considered for backport to the next 1.18 minor release.

@gopherbot please open backports for Go 1.18

@gopherbot gopherbot added the CherryPickCandidate label May 4, 2022
@gopherbot gopherbot added this to the Go1.18.2 milestone May 4, 2022
@tinyfluffs
Copy link

@tinyfluffs tinyfluffs commented May 4, 2022

Suggested as a backport candidate, as it's a core feature of the delve debugger that isn't available on darwin/arm64 and linux/arm64. With the growing prevalence of the new Apple M1 silicon, it would be extremely beneficial to include it in the next minor release.

go-delve/delve#2996

@ncomet
Copy link

@ncomet ncomet commented May 4, 2022

Thanks for backporting, really appreciated.

@dr2chase dr2chase added the CherryPickApproved label May 4, 2022
@gopherbot gopherbot removed the CherryPickCandidate label May 4, 2022
@aclements
Copy link
Member

@aclements aclements commented May 4, 2022

There's some concern about back-porting this since it's really a feature, not a bug, but the code is very isolated and hence there are no safety concerns, and it would significantly improve the debugging experience on darwin/arm64, so in the weekly meeting we decided to approve.

@tinyfluffs
Copy link

@tinyfluffs tinyfluffs commented May 4, 2022

Thanks everyone ^^
Really glad this got accepted, even though it does technically count as a feature. Our office recently rolled out the M1 Pro MacBooks to all new developers (myself included), so it's been a hassle for everyone without all the power Delve has to offer. Light at the end of the tunnel 😃

@gopherbot
Copy link
Author

@gopherbot gopherbot commented May 5, 2022

Change https://go.dev/cl/404215 mentions this issue: [release-branch.go1.18] runtime: support for debugger function calls on linux/arm64

@gopherbot
Copy link
Author

@gopherbot gopherbot commented May 9, 2022

Closed by merging 66432da to release-branch.go1.18.

gopherbot pushed a commit that referenced this issue May 9, 2022
…on linux/arm64

This CL adds support for debugger function calls on linux arm64
platform. The protocol is basically the same as in CL 109699, except for
the following differences:
1, The abi difference which affect parameter passing and frame layout.
2, Stores communication information in R20.
3, The closure register is R26.
4, Use BRK 0 instruction to generate a breakpoint. The saved PC in
sigcontext is the PC where the signal occurred, not the next PC.

In addition, this CL refactors the existing code (which is dedicated to
amd64) for easier multi-arch scaling.

Fixes #52699

Change-Id: I06b14e345cc89aab175f4a5f2287b765da85a86b
Reviewed-on: https://go-review.googlesource.com/c/go/+/395754
Reviewed-by: Michael Knyszek <mknyszek@google.com>
Reviewed-by: Cherry Mui <cherryyz@google.com>
Run-TryBot: Eric Fang <eric.fang@arm.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
(cherry picked from commit 9717e8f)
Reviewed-on: https://go-review.googlesource.com/c/go/+/404215
Reviewed-by: David Chase <drchase@google.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CherryPickApproved
Projects
None yet
Development

No branches or pull requests

5 participants