1
0
Fork 0
mirror of https://github.com/tobast/libunwind-eh_elf.git synced 2024-12-27 05:23:43 +01:00

Store the ucontext_t pointer to properly handle resume across signal frames.

This commit is contained in:
Konstantin Belousov 2010-04-11 13:48:14 +03:00
parent f01a043712
commit 69001646fa
2 changed files with 2 additions and 0 deletions

View file

@ -108,6 +108,7 @@ unw_handle_signal_frame (unw_cursor_t *cursor)
sf = (struct sigframe *)c->dwarf.cfa;
uc_addr = (uintptr_t)&(sf->sf_uc);
c->uc = (ucontext_t *)uc_addr;
esp_loc = DWARF_LOC (uc_addr + FREEBSD_UC_MCONTEXT_ESP_OFF, 0);
ret = dwarf_get (&c->dwarf, esp_loc, &c->dwarf.cfa);

View file

@ -96,6 +96,7 @@ unw_handle_signal_frame (unw_cursor_t *cursor)
if (c->sigcontext_format == X86_64_SCF_FREEBSD_SIGFRAME)
{
ucontext = c->dwarf.cfa + offsetof(struct sigframe, sf_uc);
c->uc = (ucontext_t *)ucontext;
Debug(1, "signal frame, skip over trampoline\n");
struct dwarf_loc rsp_loc = DWARF_LOC (ucontext + UC_MCONTEXT_GREGS_RSP, 0);