mirror of
https://github.com/tobast/libunwind-eh_elf.git
synced 2024-11-16 13:18:12 +01:00
Change unw_init_local_signal to unw_init_local2(..., UNW_INIT_SIGNAL_FRAME)
Add unw_init_local2 with a flag for better extensibility in the future
This commit is contained in:
parent
644cce3d72
commit
bd3fb89e11
13 changed files with 119 additions and 29 deletions
|
@ -12,7 +12,7 @@ man3_MANS = libunwind.man libunwind-dynamic.man libunwind-ia64.man \
|
|||
unw_get_reg.man \
|
||||
unw_getcontext.man \
|
||||
unw_init_local.man unw_init_remote.man \
|
||||
unw_init_local_signal.man \
|
||||
unw_init_local2.man \
|
||||
unw_is_fpreg.man \
|
||||
unw_is_signal_frame.man \
|
||||
unw_create_addr_space.man \
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
'\" t
|
||||
.\" Manual page created with latex2man on Thu Mar 30 16:13:10 PDT 2017
|
||||
.\" Manual page created with latex2man on Wed Aug 16 12:11:05 PDT 2017
|
||||
.\" NOTE: This file is generated, DO NOT EDIT.
|
||||
.de Vb
|
||||
.ft CW
|
||||
|
@ -10,7 +10,7 @@
|
|||
|
||||
.fi
|
||||
..
|
||||
.TH "UNW\\_INIT\\_LOCAL" "3" "30 March 2017" "Programming Library " "Programming Library "
|
||||
.TH "UNW\\_INIT\\_LOCAL" "3" "16 August 2017" "Programming Library " "Programming Library "
|
||||
.SH NAME
|
||||
unw_init_local
|
||||
\-\- initialize cursor for local unwinding
|
||||
|
@ -26,8 +26,10 @@ unw_init_local(unw_cursor_t *c,
|
|||
unw_context_t *ctxt);
|
||||
.br
|
||||
int
|
||||
unw_init_local_signal(unw_cursor_t *c,
|
||||
unw_context_t *ctxt);
|
||||
unw_init_local2(unw_cursor_t *c,
|
||||
unw_context_t *ctxt,
|
||||
int
|
||||
flag);
|
||||
.br
|
||||
.PP
|
||||
.SH DESCRIPTION
|
||||
|
@ -66,9 +68,9 @@ is not.
|
|||
.PP
|
||||
If the unw_context_t is known to be a signal frame (i.e., from the
|
||||
third argument in a sigaction handler on linux),
|
||||
unw_init_local_signal()
|
||||
should be used for correct
|
||||
initialization on some platforms.
|
||||
unw_init_local2()
|
||||
should be used for correct initialization
|
||||
on some platforms, passing the UNW_INIT_SIGNAL_FRAME flag.
|
||||
.PP
|
||||
.SH RETURN VALUE
|
||||
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
\File{\#include $<$libunwind.h$>$}\\
|
||||
|
||||
\Type{int} \Func{unw\_init\_local}(\Type{unw\_cursor\_t~*}\Var{c}, \Type{unw\_context\_t~*}\Var{ctxt});\\
|
||||
\Type{int} \Func{unw\_init\_local_signal}(\Type{unw\_cursor\_t~*}\Var{c}, \Type{unw\_context\_t~*}\Var{ctxt});\\
|
||||
\Type{int} \Func{unw\_init\_local2}(\Type{unw\_cursor\_t~*}\Var{c}, \Type{unw\_context\_t~*}\Var{ctxt}, \Type{int} \Var{flag});\\
|
||||
|
||||
\section{Description}
|
||||
|
||||
|
@ -39,8 +39,8 @@ is not.
|
|||
|
||||
If the unw_context_t is known to be a signal frame (i.e., from the
|
||||
third argument in a sigaction handler on linux),
|
||||
\Func{unw\_init\_local\_signal}() should be used for correct
|
||||
initialization on some platforms.
|
||||
\Func{unw\_init\_local2}() should be used for correct initialization
|
||||
on some platforms, passing the UNW_INIT_SIGNAL_FRAME flag.
|
||||
|
||||
\section{Return Value}
|
||||
|
||||
|
|
|
@ -59,9 +59,20 @@ unw_init_local (unw_cursor_t *cursor, unw_context_t *uc)
|
|||
}
|
||||
|
||||
PROTECTED int
|
||||
unw_init_local_signal (unw_cursor_t *cursor, unw_context_t *uc)
|
||||
unw_init_local2 (unw_cursor_t *cursor, ucontext_t *uc, int flag)
|
||||
{
|
||||
return unw_init_local_common(cursor, uc, 0);
|
||||
if (!flag)
|
||||
{
|
||||
return unw_init_local_common(cursor, uc, 1);
|
||||
}
|
||||
else if (flag == UNW_INIT_SIGNAL_FRAME)
|
||||
{
|
||||
return unw_init_local_common(cursor, uc, 0);
|
||||
}
|
||||
else
|
||||
{
|
||||
return -UNW_EINVAL;
|
||||
}
|
||||
}
|
||||
|
||||
#endif /* !UNW_REMOTE_ONLY */
|
||||
|
|
|
@ -59,9 +59,20 @@ unw_init_local (unw_cursor_t *cursor, unw_context_t *uc)
|
|||
}
|
||||
|
||||
PROTECTED int
|
||||
unw_init_local_signal (unw_cursor_t *cursor, unw_context_t *uc)
|
||||
unw_init_local2 (unw_cursor_t *cursor, ucontext_t *uc, int flag)
|
||||
{
|
||||
return unw_init_local_common(cursor, uc, 0);
|
||||
if (!flag)
|
||||
{
|
||||
return unw_init_local_common(cursor, uc, 1);
|
||||
}
|
||||
else if (flag == UNW_INIT_SIGNAL_FRAME)
|
||||
{
|
||||
return unw_init_local_common(cursor, uc, 0);
|
||||
}
|
||||
else
|
||||
{
|
||||
return -UNW_EINVAL;
|
||||
}
|
||||
}
|
||||
|
||||
#endif /* !UNW_REMOTE_ONLY */
|
||||
|
|
|
@ -58,9 +58,20 @@ unw_init_local (unw_cursor_t *cursor, ucontext_t *uc)
|
|||
}
|
||||
|
||||
PROTECTED int
|
||||
unw_init_local_signal (unw_cursor_t *cursor, ucontext_t *uc)
|
||||
unw_init_local2 (unw_cursor_t *cursor, ucontext_t *uc, int flag)
|
||||
{
|
||||
return unw_init_local_common(cursor, uc, 0);
|
||||
if (!flag)
|
||||
{
|
||||
return unw_init_local_common(cursor, uc, 1);
|
||||
}
|
||||
else if (flag == UNW_INIT_SIGNAL_FRAME)
|
||||
{
|
||||
return unw_init_local_common(cursor, uc, 0);
|
||||
}
|
||||
else
|
||||
{
|
||||
return -UNW_EINVAL;
|
||||
}
|
||||
}
|
||||
|
||||
#endif /* !UNW_REMOTE_ONLY */
|
||||
|
|
|
@ -57,9 +57,20 @@ unw_init_local(unw_cursor_t *cursor, ucontext_t *uc)
|
|||
}
|
||||
|
||||
PROTECTED int
|
||||
unw_init_local_signal(unw_cursor_t *cursor, ucontext_t *uc)
|
||||
unw_init_local2 (unw_cursor_t *cursor, ucontext_t *uc, int flag)
|
||||
{
|
||||
return unw_init_local_common(cursor, uc, 0);
|
||||
if (!flag)
|
||||
{
|
||||
return unw_init_local_common(cursor, uc, 1);
|
||||
}
|
||||
else if (flag == UNW_INIT_SIGNAL_FRAME)
|
||||
{
|
||||
return unw_init_local_common(cursor, uc, 0);
|
||||
}
|
||||
else
|
||||
{
|
||||
return -UNW_EINVAL;
|
||||
}
|
||||
}
|
||||
|
||||
#endif /* !UNW_REMOTE_ONLY */
|
||||
|
|
|
@ -69,9 +69,20 @@ unw_init_local(unw_cursor_t *cursor, ucontext_t *uc)
|
|||
}
|
||||
|
||||
PROTECTED int
|
||||
unw_init_local_signal(unw_cursor_t *cursor, ucontext_t *uc)
|
||||
unw_init_local2 (unw_cursor_t *cursor, ucontext_t *uc, int flag)
|
||||
{
|
||||
return unw_init_local_common(cursor, uc, 0);
|
||||
if (!flag)
|
||||
{
|
||||
return unw_init_local_common(cursor, uc, 1);
|
||||
}
|
||||
else if (flag == UNW_INIT_SIGNAL_FRAME)
|
||||
{
|
||||
return unw_init_local_common(cursor, uc, 0);
|
||||
}
|
||||
else
|
||||
{
|
||||
return -UNW_EINVAL;
|
||||
}
|
||||
}
|
||||
|
||||
#endif /* !UNW_REMOTE_ONLY */
|
||||
|
|
|
@ -59,9 +59,20 @@ unw_init_local (unw_cursor_t *cursor, unw_context_t *uc)
|
|||
}
|
||||
|
||||
PROTECTED int
|
||||
unw_init_local_signal (unw_cursor_t *cursor, unw_context_t *uc)
|
||||
unw_init_local2 (unw_cursor_t *cursor, ucontext_t *uc, int flag)
|
||||
{
|
||||
return unw_init_local_common(cursor, uc, 0);
|
||||
if (!flag)
|
||||
{
|
||||
return unw_init_local_common(cursor, uc, 1);
|
||||
}
|
||||
else if (flag == UNW_INIT_SIGNAL_FRAME)
|
||||
{
|
||||
return unw_init_local_common(cursor, uc, 0);
|
||||
}
|
||||
else
|
||||
{
|
||||
return -UNW_EINVAL;
|
||||
}
|
||||
}
|
||||
|
||||
#endif /* !UNW_REMOTE_ONLY */
|
||||
|
|
|
@ -61,9 +61,20 @@ unw_init_local (unw_cursor_t *cursor, ucontext_t *uc)
|
|||
}
|
||||
|
||||
PROTECTED int
|
||||
unw_init_local_signal (unw_cursor_t *cursor, ucontext_t *uc)
|
||||
unw_init_local2 (unw_cursor_t *cursor, ucontext_t *uc, int flag)
|
||||
{
|
||||
return unw_init_local_common(cursor, uc, 0);
|
||||
if (!flag)
|
||||
{
|
||||
return unw_init_local_common(cursor, uc, 1);
|
||||
}
|
||||
else if (flag == UNW_INIT_SIGNAL_FRAME)
|
||||
{
|
||||
return unw_init_local_common(cursor, uc, 0);
|
||||
}
|
||||
else
|
||||
{
|
||||
return -UNW_EINVAL;
|
||||
}
|
||||
}
|
||||
|
||||
#endif /* !UNW_REMOTE_ONLY */
|
||||
|
|
|
@ -60,9 +60,20 @@ unw_init_local (unw_cursor_t *cursor, ucontext_t *uc)
|
|||
}
|
||||
|
||||
PROTECTED int
|
||||
unw_init_local_signal (unw_cursor_t *cursor, ucontext_t *uc)
|
||||
unw_init_local2 (unw_cursor_t *cursor, ucontext_t *uc, int flag)
|
||||
{
|
||||
return unw_init_local_common(cursor, uc, 0);
|
||||
if (!flag)
|
||||
{
|
||||
return unw_init_local_common(cursor, uc, 1);
|
||||
}
|
||||
else if (flag == UNW_INIT_SIGNAL_FRAME)
|
||||
{
|
||||
return unw_init_local_common(cursor, uc, 0);
|
||||
}
|
||||
else
|
||||
{
|
||||
return -UNW_EINVAL;
|
||||
}
|
||||
}
|
||||
|
||||
#endif /* !UNW_REMOTE_ONLY */
|
||||
|
|
|
@ -99,7 +99,7 @@ check_local_unw_abi () {
|
|||
match _UL${plat}_get_reg
|
||||
match _UL${plat}_get_save_loc
|
||||
match _UL${plat}_init_local
|
||||
match _UL${plat}_init_local_signal
|
||||
match _UL${plat}_init_local2
|
||||
match _UL${plat}_init_remote
|
||||
match _UL${plat}_is_signal_frame
|
||||
match _UL${plat}_handle_signal_frame
|
||||
|
@ -205,7 +205,7 @@ check_generic_unw_abi () {
|
|||
match _U${plat}_get_reg
|
||||
match _U${plat}_get_save_loc
|
||||
match _U${plat}_init_local
|
||||
match _U${plat}_init_local_signal
|
||||
match _U${plat}_init_local2
|
||||
match _U${plat}_init_remote
|
||||
match _U${plat}_is_signal_frame
|
||||
match _U${plat}_handle_signal_frame
|
||||
|
|
Loading…
Reference in a new issue