mirror of
https://github.com/tobast/libunwind-eh_elf.git
synced 2025-01-06 01:23:41 +01:00
x86_64_local_resume is moved undef ifdef __linux__
This commit is contained in:
parent
a6f1065c24
commit
5d4a07690e
2 changed files with 8 additions and 4 deletions
|
@ -249,7 +249,11 @@ x86_64_local_addr_space_init (void)
|
|||
local_addr_space.acc.access_mem = access_mem;
|
||||
local_addr_space.acc.access_reg = access_reg;
|
||||
local_addr_space.acc.access_fpreg = access_fpreg;
|
||||
#ifdef __linux__
|
||||
local_addr_space.acc.resume = x86_64_local_resume;
|
||||
#else // __linux__
|
||||
local_addr_space.acc.resume = 0; // FIXME
|
||||
#endif // __linux__
|
||||
local_addr_space.acc.get_proc_name = get_static_proc_name;
|
||||
unw_flush_cache (&local_addr_space, 0, 0);
|
||||
|
||||
|
|
|
@ -33,6 +33,8 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
|
|||
|
||||
#include <sys/syscall.h>
|
||||
|
||||
#ifdef __linux__
|
||||
|
||||
/* sigreturn() is a no-op on x86_64 glibc. */
|
||||
|
||||
static NORETURN inline long
|
||||
|
@ -49,7 +51,6 @@ my_rt_sigreturn (void *new_sp)
|
|||
HIDDEN inline int
|
||||
x86_64_local_resume (unw_addr_space_t as, unw_cursor_t *cursor, void *arg)
|
||||
{
|
||||
#if defined(__linux)
|
||||
struct cursor *c = (struct cursor *) cursor;
|
||||
ucontext_t *uc = c->uc;
|
||||
|
||||
|
@ -73,12 +74,11 @@ x86_64_local_resume (unw_addr_space_t as, unw_cursor_t *cursor, void *arg)
|
|||
(unsigned long long) c->dwarf.ip);
|
||||
_Ux86_64_setcontext (uc);
|
||||
}
|
||||
#else
|
||||
# warning Implement me!
|
||||
#endif
|
||||
return -UNW_EINVAL;
|
||||
}
|
||||
|
||||
#endif // __linux__
|
||||
|
||||
#endif /* !UNW_REMOTE_ONLY */
|
||||
|
||||
/* This routine is responsible for copying the register values in
|
||||
|
|
Loading…
Reference in a new issue