1
0
Fork 0
mirror of https://github.com/tobast/libunwind-eh_elf.git synced 2024-06-28 12:11:45 +02:00

Merge commit 'fdc534ccb05d1e6c0438345d292203343a811701'

This commit is contained in:
Arun Sharma 2010-04-28 17:24:47 -07:00
commit 0176c4f723
5 changed files with 11 additions and 1 deletions

View file

@ -27,6 +27,7 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
.global _Ux86_getcontext
.type _Ux86_getcontext, @function
_Ux86_getcontext:
.cfi_startproc
pushl %eax
mov 8(%esp),%eax /* ucontext_t* */
popl FREEBSD_UC_MCONTEXT_EAX_OFF(%eax)
@ -81,6 +82,7 @@ _Ux86_getcontext:
xorl %eax, %eax
ret
.cfi_endproc
.size _Ux86_getcontext, . - _Ux86_getcontext
/* We do not need executable stack. */

View file

@ -36,6 +36,7 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
.global _Ux86_getcontext
.type _Ux86_getcontext, @function
_Ux86_getcontext:
.cfi_startproc
mov 4(%esp),%eax /* ucontext_t* */
/* EAX is not preserved. */
@ -66,6 +67,7 @@ _Ux86_getcontext:
xor %eax, %eax
ret
.cfi_endproc
.size _Ux86_getcontext, . - _Ux86_getcontext
/* We do not need executable stack. */

View file

@ -87,6 +87,7 @@ unw_is_signal_frame (unw_cursor_t *cursor)
PROTECTED int
unw_handle_signal_frame (unw_cursor_t *cursor)
{
#if UNW_DEBUG /* To silence compiler warnings */
/* Should not get here because we now use kernel-provided dwarf
information for the signal trampoline and dwarf_step() works.
Hence dwarf_step() should never call this function. Maybe
@ -97,6 +98,7 @@ 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);
#endif
return 1;
}

View file

@ -37,6 +37,7 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
.global _Ux86_64_getcontext
.type _Ux86_64_getcontext, @function
_Ux86_64_getcontext:
.cfi_startproc
/* Callee saved: RBX, RBP, R12-R15 */
movq %r12, UC_MCONTEXT_GREGS_R12(%rdi)
@ -70,7 +71,9 @@ _Ux86_64_getcontext:
/* Save rflags and segment registers, so that sigreturn(2)
does not complain. */
pushfq
.cfi_adjust_cfa_offset 8
popq UC_MCONTEXT_RFLAGS(%rdi)
.cfi_adjust_cfa_offset -8
movl $0, UC_MCONTEXT_FLAGS(%rdi)
movw %cs, UC_MCONTEXT_CS(%rdi)
movw %ss, UC_MCONTEXT_SS(%rdi)
@ -95,6 +98,7 @@ _Ux86_64_getcontext:
xorq %rax, %rax
retq
.cfi_endproc
.size _Ux86_64_getcontext, . - _Ux86_64_getcontext
/* We do not need executable stack. */

View file

@ -1,2 +1,2 @@
#!/bin/sh
./test-ptrace -c -n -t ./mapper
./test-ptrace -c -n -t ./mapper $*