mirror of
https://github.com/tobast/libunwind-eh_elf.git
synced 2024-12-23 12:03:41 +01:00
Store the ucontext_t pointer to properly handle resume across signal frames.
This commit is contained in:
parent
f01a043712
commit
69001646fa
2 changed files with 2 additions and 0 deletions
|
@ -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);
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue