mirror of
https://github.com/tobast/libunwind-eh_elf.git
synced 2025-01-23 00:30:29 +01:00
Remove obsolete code for 'old way' of handling x86-64 signal frames.
This commit is contained in:
parent
f252f5ff4e
commit
92cc7fd78a
1 changed files with 0 additions and 53 deletions
|
@ -82,31 +82,6 @@ unw_is_signal_frame (unw_cursor_t *cursor)
|
|||
{
|
||||
struct cursor *c = (struct cursor *) cursor;
|
||||
return c->sigcontext_format != X86_64_SCF_NONE;
|
||||
#if 0
|
||||
unw_word_t w0, w1, ip;
|
||||
unw_addr_space_t as;
|
||||
unw_accessors_t *a;
|
||||
void *arg;
|
||||
int ret;
|
||||
|
||||
as = c->dwarf.as;
|
||||
a = unw_get_accessors (as);
|
||||
arg = c->dwarf.as_arg;
|
||||
|
||||
/* Check if RIP points at sigreturn sequence.
|
||||
on x86_64 Linux that is (see libc.so):
|
||||
48 c7 c0 0f 00 00 00 mov $0xf,%rax
|
||||
0f 05 syscall
|
||||
66 data16
|
||||
*/
|
||||
|
||||
ip = c->dwarf.ip;
|
||||
if ((ret = (*a->access_mem) (as, ip, &w0, 0, arg)) < 0
|
||||
|| (ret = (*a->access_mem) (as, ip + 8, &w1, 0, arg)) < 0)
|
||||
return 0;
|
||||
w1 &= 0xff;
|
||||
return (w0 == 0x0f0000000fc0c748 && w1 == 0x05);
|
||||
#endif
|
||||
}
|
||||
|
||||
PROTECTED int
|
||||
|
@ -123,34 +98,6 @@ unw_handle_signal_frame (unw_cursor_t *cursor)
|
|||
assert(c->sigcontext_format == X86_64_SCF_LINUX_RT_SIGFRAME);
|
||||
assert(c->sigcontext_addr == c->dwarf.cfa);
|
||||
assert(0);
|
||||
#if 0
|
||||
struct dwarf_loc rsp_loc = DWARF_LOC (ucontext + UC_MCONTEXT_GREGS_RSP, 0);
|
||||
ret = dwarf_get (&c->dwarf, rsp_loc, &c->dwarf.cfa);
|
||||
if (ret < 0)
|
||||
{
|
||||
Debug (2, "returning %d\n", ret);
|
||||
return ret;
|
||||
}
|
||||
|
||||
c->dwarf.loc[RAX] = DWARF_LOC (ucontext + UC_MCONTEXT_GREGS_RAX, 0);
|
||||
c->dwarf.loc[RDX] = DWARF_LOC (ucontext + UC_MCONTEXT_GREGS_RDX, 0);
|
||||
c->dwarf.loc[RCX] = DWARF_LOC (ucontext + UC_MCONTEXT_GREGS_RCX, 0);
|
||||
c->dwarf.loc[RBX] = DWARF_LOC (ucontext + UC_MCONTEXT_GREGS_RBX, 0);
|
||||
c->dwarf.loc[RSI] = DWARF_LOC (ucontext + UC_MCONTEXT_GREGS_RSI, 0);
|
||||
c->dwarf.loc[RDI] = DWARF_LOC (ucontext + UC_MCONTEXT_GREGS_RDI, 0);
|
||||
c->dwarf.loc[RBP] = DWARF_LOC (ucontext + UC_MCONTEXT_GREGS_RBP, 0);
|
||||
c->dwarf.loc[RSP] = DWARF_LOC (ucontext + UC_MCONTEXT_GREGS_RSP, 0);
|
||||
c->dwarf.loc[ R8] = DWARF_LOC (ucontext + UC_MCONTEXT_GREGS_R8, 0);
|
||||
c->dwarf.loc[ R9] = DWARF_LOC (ucontext + UC_MCONTEXT_GREGS_R9, 0);
|
||||
c->dwarf.loc[R10] = DWARF_LOC (ucontext + UC_MCONTEXT_GREGS_R10, 0);
|
||||
c->dwarf.loc[R11] = DWARF_LOC (ucontext + UC_MCONTEXT_GREGS_R11, 0);
|
||||
c->dwarf.loc[R12] = DWARF_LOC (ucontext + UC_MCONTEXT_GREGS_R12, 0);
|
||||
c->dwarf.loc[R13] = DWARF_LOC (ucontext + UC_MCONTEXT_GREGS_R13, 0);
|
||||
c->dwarf.loc[R14] = DWARF_LOC (ucontext + UC_MCONTEXT_GREGS_R14, 0);
|
||||
c->dwarf.loc[R15] = DWARF_LOC (ucontext + UC_MCONTEXT_GREGS_R15, 0);
|
||||
c->dwarf.loc[RIP] = DWARF_LOC (ucontext + UC_MCONTEXT_GREGS_RIP, 0);
|
||||
#endif
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue