Skip to content
This repository has been archived by the owner on Nov 1, 2020. It is now read-only.

Push proper RBP frame in PUSH_COOP_PINVOKE_FRAME #4812

Merged
merged 2 commits into from
Oct 27, 2017
Merged

Push proper RBP frame in PUSH_COOP_PINVOKE_FRAME #4812

merged 2 commits into from
Oct 27, 2017

Conversation

jkotas
Copy link
Member

@jkotas jkotas commented Oct 26, 2017

This should help with getting better stacktraces under debugger when something goes wrong.

@@ -317,19 +319,14 @@ DEFAULT_FRAME_SAVE_FLAGS = PTFF_SAVE_ALL_PRESERVED + PTFF_SAVE_RSP
push_nonvol_reg rbx // ..
push_imm DEFAULT_FRAME_SAVE_FLAGS // save the register bitmask
push_register \trashReg // Thread * (unused by stackwalker)
push_nonvol_reg rbp // save caller's RBP
mov \trashReg, [rsp + 9*8] // Find the return address
push_register rbp // save caller's RBP
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not caller's RBP anymore with this change.

@janvorli
Copy link
Member

It is strange though that the debugger would not be able to unwind what we had there before.

@jkotas
Copy link
Member Author

jkotas commented Oct 26, 2017

It is strange though that the debugger would not be able to unwind what we had there before.

This change was motivated by #4676 (comment). You can see that the stacktrace after RhpNewArrayRare is garbage. It seems to be caused by the debugger not able to deal with the non-standard RBP frame that we used have here before.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants