-
Notifications
You must be signed in to change notification settings - Fork 399
use frame pointer unwinding for Go 1.21+ on aarch64 #422
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -29,10 +29,11 @@ const ( | |
| UnwindOpcodeFlagDeref uint8 = C.UNWIND_OPCODEF_DEREF | ||
|
|
||
| // UnwindCommands from the C header file | ||
| UnwindCommandInvalid int32 = C.UNWIND_COMMAND_INVALID | ||
| UnwindCommandStop int32 = C.UNWIND_COMMAND_STOP | ||
| UnwindCommandPLT int32 = C.UNWIND_COMMAND_PLT | ||
| UnwindCommandSignal int32 = C.UNWIND_COMMAND_SIGNAL | ||
| UnwindCommandInvalid int32 = C.UNWIND_COMMAND_INVALID | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Maybe we should bring these constants into
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Sure, will do a follow up PR on this. |
||
| UnwindCommandStop int32 = C.UNWIND_COMMAND_STOP | ||
| UnwindCommandPLT int32 = C.UNWIND_COMMAND_PLT | ||
| UnwindCommandSignal int32 = C.UNWIND_COMMAND_SIGNAL | ||
| UnwindCommandFramePointer int32 = C.UNWIND_COMMAND_FRAME_POINTER | ||
|
|
||
| // UnwindDeref handling from the C header file | ||
| UnwindDerefMask int32 = C.UNWIND_DEREF_MASK | ||
|
|
@@ -63,12 +64,10 @@ var UnwindInfoStop = UnwindInfo{Opcode: UnwindOpcodeCommand, Param: UnwindComman | |
| // UnwindInfoSignal is the stack delta info indicating signal return frame. | ||
| var UnwindInfoSignal = UnwindInfo{Opcode: UnwindOpcodeCommand, Param: UnwindCommandSignal} | ||
|
|
||
| // UnwindInfoFramePointerX64 contains the description to unwind a x86-64 frame pointer frame. | ||
| var UnwindInfoFramePointerX64 = UnwindInfo{ | ||
| Opcode: UnwindOpcodeBaseFP, | ||
| Param: 16, | ||
| FPOpcode: UnwindOpcodeBaseCFA, | ||
| FPParam: -16, | ||
| // UnwindInfoFramePointer contains the description to unwind a frame pointer frame. | ||
| var UnwindInfoFramePointer = UnwindInfo{ | ||
| Opcode: UnwindOpcodeCommand, | ||
| Param: UnwindCommandFramePointer, | ||
| } | ||
|
|
||
| // UnwindInfoLR contains the description to unwind ARM64 function without a frame (LR only) | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: Release candidates are for temporary testing. Maybe we can just use the first release with this change in Go:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have a strong preference to keep the actual first rc tag here. The Go libraries support comparing versions with them, and this makes the code work with the prerelease tags. This also serves as note to remind what is the first tag when the Golang change was made.