Skip to content

Commit

Permalink
printing rbp, rsp in phase 2
Browse files Browse the repository at this point in the history
  • Loading branch information
charlieMonroe committed Aug 20, 2013
1 parent 16deb10 commit 0bc0875
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions unwind-internal.h
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,13 @@ _Unwind_Phase2 (struct _Unwind_Exception *exception_object,
{
/* we may regain control via _Unwind_Resume() */
Debug(-1, "Resuming!\n");

void *rbp = NULL;
void *rsp = NULL;
__asm__("\t movq %%rbp, %0" : "=r"(rbp));
__asm__("\t movq %%rsp, %0" : "=r"(rsp));
printf(">>>>>%s - rbp: %p rsp: %p\n", __FUNCTION__, rbp, rsp);

unw_resume (&context->cursor);
panic ("Couldn't resume!'");
}
Expand Down

0 comments on commit 0bc0875

Please sign in to comment.