-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Backend does not support function calls while trying to modify a string in Delve #2277
Comments
This is all working as intended. Changing the value of a string requires an allocation, which can only be done by injecting a function call and function call injection is not supported on arm64 because the go runtime doesn't have an implementation for it. |
Can this now be reopened due to the release of go 1.16 which supports arm64? |
the issue persists in go version |
how can we force this issue like a community? |
@avonar given the current regabi transition it's unrealistic to expect this to happen before a register ABI will exist for arm64. So, not before Go 1.18. |
Is anyone concerned about this issue? |
I still have the error with go version |
I still have the same error on the platform that go1.17.2 darwin/arm64. |
same for go1.17.3 darwin/arm64, any updates on this? |
Nobody implemented it for 1.18 given the freeze likely not before 1.19. |
I still have the same issue on the platform M1 Pro and go 1.18 |
+1 |
4 similar comments
+1 |
+1 |
+1 |
+1 |
What is required of both Delve and Go on arm64 in order to implement this debugging feature? Since Delve does not support Rosetta for macOS, we're of course unable to use that with an amd64 build of Go instead. A patch set in Go's Gerrit pages has been available for Linux for a little while, however it doesn't expand to macOS. Looking at it, the assembly portion of the change appears to be idempotent no matter the underlying kernel. My best guess is that we can adapt this change to make sure darwin/arm64 is also supported. I think the test suite should be extended with the build tag to include darwin, possibly? I'm not sure if it's my setup, but I cherry picked the patch set and built it against the latest copy of the main branch. Delve itself reports the underlying backend still doesn't support function calls, however. So I'm guessing a change is required to Delve as well? |
@aarzilli Should this issue be reopened, given that golang/go#50614 is implemented now? |
Reading through all of the linked issues, it's not clear to me if this is going to be supported by Delve on go1.18. It looks like go1.18.2 has the necessary support. Will there be a corresponding Delve release? |
Just noticed 1.18.2 was released. Cool! Whenever Delve does its next release, this will be there. The change was merged to the master branch in c9d800e. If you want access earlier than that, you can compile Delve straight from the master branch as-is. |
Thank you. |
I have installed go version 1.18.2 and delve version from the master branch but still facing the same issue in goland. Do I need to point delve in goland VM options ? |
@tanishgupta1 Yes, try |
Can this be backported to earlier versions of Go? |
I would have to ask the go project, not us. But the answer is likely no. |
I'm on go version
I've added the VM option in goland However my application still throws an error when trying to launch in debug mode (with goland). Application error logs
I suspect this is due to some compatibility issue with Mac M1/ARM and go/delve. Any ideas on how to proceed further? |
Please answer the following before submitting your issue:
Note: Please include any substantial examples (debug session output,
stacktraces, etc) as linked gists.
dlv version
)?go version
)?go version go1.13.15 linux/arm64
Alpine Linux
onaarch64
emulated usingQEMU
onx86_64
Linux Ubuntu 16.04
host which itself is installed on VirtualBox on a Mac.(dlv) goroutine 50 frame 1 set my_variable = "my_string"
Command failed: literal string can not be allocated because function calls are not allowed without using 'call'
ALSO:
(dlv) call
> main.my_function() /usr/lib/go/src/strings/strings.go:308 (hits goroutine(50):1 total:1) (PC: 0x4a929c)
Warning: debugging optimized function
Command failed: backend does not support function calls
Support for changing a string variable
Quite honestly, I'm not sure since I'm not familiar with using call to modify a string in Delve (if at all possible).
The text was updated successfully, but these errors were encountered: