mirror of
https://github.com/tobast/libunwind-eh_elf.git
synced 2024-11-27 01:27:39 +01:00
Update copyright year.
Minor formatting changes. (Logical change 1.110)
This commit is contained in:
parent
c55348de6e
commit
6b6a0079e6
1 changed files with 18 additions and 21 deletions
|
@ -1,5 +1,5 @@
|
|||
/* libunwind - a platform-independent unwind library
|
||||
Copyright (C) 2002 Hewlett-Packard Co
|
||||
Copyright (C) 2002-2003 Hewlett-Packard Co
|
||||
Contributed by David Mosberger-Tang <davidm@hpl.hp.com>
|
||||
|
||||
This file is part of libunwind.
|
||||
|
@ -121,15 +121,12 @@ unw_step (unw_cursor_t *cursor)
|
|||
struct cursor *c = (struct cursor *) cursor;
|
||||
int ret;
|
||||
|
||||
|
||||
if (unw_is_signal_frame(cursor))
|
||||
{
|
||||
/* Without SA_SIGINFO, */
|
||||
/* c -> esp points at the arguments to the handler. */
|
||||
/* This consists of a signal number followed by a */
|
||||
/* struct sigcontext. */
|
||||
/* With SA_SIGINFO, the arguments consists of the */
|
||||
/* signal number, a siginfo *, and a ucontext * . */
|
||||
/* c->esp points at the arguments to the handler. Without
|
||||
SA_SIGINFO, the arguments consist of a signal number followed
|
||||
by a struct sigcontext. With SA_SIGINFO, the arguments
|
||||
consist a signal number, a siginfo *, and a ucontext *. */
|
||||
unw_word_t siginfo_ptr_addr = c->esp + 4;
|
||||
unw_word_t sigcontext_ptr_addr = c->esp + 8;
|
||||
unw_word_t siginfo_ptr, sigcontext_ptr;
|
||||
|
@ -141,8 +138,8 @@ unw_step (unw_cursor_t *cursor)
|
|||
| x86_get (c, sigcontext_ptr_loc, &sigcontext_ptr));
|
||||
if (ret < 0)
|
||||
return 0;
|
||||
if (siginfo_ptr < c -> esp || siginfo_ptr > c -> esp + 256
|
||||
|| sigcontext_ptr < c -> esp || sigcontext_ptr > c -> esp + 256)
|
||||
if (siginfo_ptr < c->esp || siginfo_ptr > c->esp + 256
|
||||
|| sigcontext_ptr < c->esp || sigcontext_ptr > c->esp + 256)
|
||||
{
|
||||
/* Not plausible for SA_SIGINFO signal */
|
||||
unw_word_t sigcontext_addr = c->esp + 4;
|
||||
|
@ -152,11 +149,11 @@ unw_step (unw_cursor_t *cursor)
|
|||
}
|
||||
else
|
||||
{
|
||||
/* If SA_SIGINFO were not specified, we actually read */
|
||||
/* various segment pointers instead. We believe that at */
|
||||
/* least fs and _fsh are always zero for linux, so it is */
|
||||
/* is not just unlikely, but impossible that we would end up */
|
||||
/* here. */
|
||||
/* If SA_SIGINFO were not specified, we actually read
|
||||
various segment pointers instead. We believe that at
|
||||
least fs and _fsh are always zero for linux, so it is not
|
||||
just unlikely, but impossible that we would end up
|
||||
here. */
|
||||
esp_loc = X86_LOC (sigcontext_ptr + LINUX_UC_ESP_OFF, 0);
|
||||
c->ebp_loc = X86_LOC (sigcontext_ptr + LINUX_UC_EBP_OFF, 0);
|
||||
c->eip_loc = X86_LOC (sigcontext_ptr + LINUX_UC_EIP_OFF, 0);
|
||||
|
|
Loading…
Reference in a new issue