You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Then, run the debugger as usual against the main.go and run the following commands:
b main.go:43
b main.go:61
c
When the breakpoint hits, invoke the following function call call strconv.ParseInt("123", 10, 64)
What did you expect to see?
I would expect to see the result of the evaluation.
What did you see instead?
I got the following error message:
call not at safe point
However, change the commands above to the following sequence and then the function call will work (the debugger is stopped at line 35):
b main.go:35
b main.go:43
b main.go:61
c
From my understanding, this comes from the Go runtime itself, and this does not seem to be fixed in Go 1.13 either, but please confirm this is the case and I'll follow-up with the Go team in a separate ticket.
Thank you!
The text was updated successfully, but these errors were encountered:
It doesn't have anything to do with whether the function was already called or not: some lines of code (really: some instructions) are not safe points and functions can't be called there, because the garbage collector wouldn't be able to deal with the resulting stack frame. Nothing we can do about it.
Is there a way to know where these safe points are? For clients, this could be useful as they could tell the users a more clear error or suggest a different place to execute the calls.
What version of Delve are you using (
dlv version
)?79ad269
What version of Go are you using? (
go version
)?Go 1.12.6 or
go version devel +bc27b64dba
What operating system and processor architecture are you using?
Windows 10 / amd64
What did you do?
Use the code from this repository: https://github.com/dlsniper/debugging/tree/0cf1692cb8518c1ec982c72d71064ffba1d0ed1c and replace the
main.go
file contents with the following ones: https://play.golang.org/p/dJWkRJx1cqNThen, run the debugger as usual against the
main.go
and run the following commands:When the breakpoint hits, invoke the following function call
call strconv.ParseInt("123", 10, 64)
What did you expect to see?
I would expect to see the result of the evaluation.
What did you see instead?
I got the following error message:
However, change the commands above to the following sequence and then the function call will work (the debugger is stopped at line 35):
From my understanding, this comes from the Go runtime itself, and this does not seem to be fixed in Go 1.13 either, but please confirm this is the case and I'll follow-up with the Go team in a separate ticket.
Thank you!
The text was updated successfully, but these errors were encountered: