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: save CPU registers for the frame calling runtime.sigpanic #37683

Open
aarzilli opened this issue Mar 5, 2020 · 2 comments
Open

runtime: save CPU registers for the frame calling runtime.sigpanic #37683

aarzilli opened this issue Mar 5, 2020 · 2 comments

Comments

@aarzilli
Copy link
Contributor

@aarzilli aarzilli commented Mar 5, 2020

When a OS signal/exception causes a panic a call to runtime.sigpanic is pushed onto the goroutine stack but a debugger has no way to recover the state of the CPU registers for the frame that caused the signal to happen. Having them would be useful for debugging optimized executables (where some variables may be registerized) as well as debugging problems with functions implemented in assembly.

Context: go-delve/delve#1838 (comment)

cc @heschik

@gopherbot
Copy link

@gopherbot gopherbot commented Mar 5, 2020

Change https://golang.org/cl/221981 mentions this issue: runtime: save signal context before calling sigpanic on unix/windows

@heschik heschik added the Debugging label Mar 5, 2020
@heschik heschik changed the title [Debugging] runtime: save CPU registers for the frame calling runtime.sigpanic runtime: save CPU registers for the frame calling runtime.sigpanic Mar 5, 2020
@toothrot toothrot added this to the Backlog milestone Mar 9, 2020
@toothrot
Copy link
Contributor

@toothrot toothrot commented Mar 9, 2020

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
4 participants
You can’t perform that action at this time.