mirror of
https://github.com/tobast/libunwind-eh_elf.git
synced 2024-11-21 23:27:39 +01:00
ARM: fix with-signal-frame local unw_resume()
Make sure that the `sigcontext_addr' cursor member is pointing to the `struct sigcontext' as expected in arm_local_resume().
This commit is contained in:
parent
14fc15928b
commit
5738bac171
1 changed files with 5 additions and 4 deletions
|
@ -1,6 +1,7 @@
|
|||
/* libunwind - a platform-independent unwind library
|
||||
Copyright (C) 2008 CodeSourcery
|
||||
Copyright 2011 Linaro Limited
|
||||
Copyright (C) 2012 Tommi Rantala <tt.rantala@gmail.com>
|
||||
|
||||
This file is part of libunwind.
|
||||
|
||||
|
@ -111,7 +112,6 @@ unw_handle_signal_frame (unw_cursor_t *cursor)
|
|||
c->sigcontext_format = ARM_SCF_LINUX_OLD_SIGFRAME;
|
||||
sc_addr = sp_addr;
|
||||
}
|
||||
c->sigcontext_addr = sp_addr;
|
||||
}
|
||||
else if (ret == 2)
|
||||
{
|
||||
|
@ -120,18 +120,19 @@ unw_handle_signal_frame (unw_cursor_t *cursor)
|
|||
if (sp == sp_addr + 8)
|
||||
{
|
||||
c->sigcontext_format = ARM_SCF_LINUX_OLD_RT_SIGFRAME;
|
||||
c->sigcontext_addr = sp_addr + 8 + sizeof (siginfo_t);
|
||||
sc_addr = sp_addr + 8 + sizeof (siginfo_t) + LINUX_UC_MCONTEXT_OFF;
|
||||
}
|
||||
else
|
||||
{
|
||||
c->sigcontext_format = ARM_SCF_LINUX_RT_SIGFRAME;
|
||||
c->sigcontext_addr = sp_addr + sizeof (siginfo_t);
|
||||
sc_addr = sp_addr + sizeof (siginfo_t) + LINUX_UC_MCONTEXT_OFF;
|
||||
}
|
||||
sc_addr = c->sigcontext_addr + LINUX_UC_MCONTEXT_OFF;
|
||||
}
|
||||
else
|
||||
return -UNW_EUNSPEC;
|
||||
|
||||
c->sigcontext_addr = sc_addr;
|
||||
|
||||
/* Update the dwarf cursor.
|
||||
Set the location of the registers to the corresponding addresses of the
|
||||
uc_mcontext / sigcontext structure contents. */
|
||||
|
|
Loading…
Reference in a new issue