mirror of
https://github.com/tobast/libunwind-eh_elf.git
synced 2024-11-16 21:27:38 +01:00
Remove unw_handle_signal_frame from public API.
This commit is contained in:
parent
a1437a3d27
commit
e287b69068
20 changed files with 38 additions and 31 deletions
|
@ -51,8 +51,8 @@ is_plt_entry (struct dwarf_cursor *c)
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
static int
|
||||||
unw_handle_signal_frame (unw_cursor_t *cursor)
|
aarch64_handle_signal_frame (unw_cursor_t *cursor)
|
||||||
{
|
{
|
||||||
struct cursor *c = (struct cursor *) cursor;
|
struct cursor *c = (struct cursor *) cursor;
|
||||||
int ret;
|
int ret;
|
||||||
|
@ -141,7 +141,7 @@ unw_step (unw_cursor_t *cursor)
|
||||||
|
|
||||||
/* Check if this is a signal frame. */
|
/* Check if this is a signal frame. */
|
||||||
if (unw_is_signal_frame (cursor) > 0)
|
if (unw_is_signal_frame (cursor) > 0)
|
||||||
return unw_handle_signal_frame (cursor);
|
return aarch64_handle_signal_frame (cursor);
|
||||||
|
|
||||||
ret = dwarf_step (&c->dwarf);
|
ret = dwarf_step (&c->dwarf);
|
||||||
Debug(1, "dwarf_step()=%d\n", ret);
|
Debug(1, "dwarf_step()=%d\n", ret);
|
||||||
|
|
|
@ -34,8 +34,8 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
|
||||||
#include "offsets.h"
|
#include "offsets.h"
|
||||||
#include "ex_tables.h"
|
#include "ex_tables.h"
|
||||||
|
|
||||||
int
|
HIDDEN int
|
||||||
unw_handle_signal_frame (unw_cursor_t *cursor)
|
arm_handle_signal_frame (unw_cursor_t *cursor)
|
||||||
{
|
{
|
||||||
struct cursor *c = (struct cursor *) cursor;
|
struct cursor *c = (struct cursor *) cursor;
|
||||||
int ret, fmt;
|
int ret, fmt;
|
||||||
|
|
|
@ -29,8 +29,8 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
|
||||||
#include "unwind_i.h"
|
#include "unwind_i.h"
|
||||||
#include "offsets.h"
|
#include "offsets.h"
|
||||||
|
|
||||||
int
|
HIDDEN int
|
||||||
unw_handle_signal_frame (unw_cursor_t *cursor)
|
arm_handle_signal_frame (unw_cursor_t *cursor)
|
||||||
{
|
{
|
||||||
struct cursor *c = (struct cursor *) cursor;
|
struct cursor *c = (struct cursor *) cursor;
|
||||||
int ret;
|
int ret;
|
||||||
|
|
|
@ -29,8 +29,8 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
|
||||||
#include "unwind_i.h"
|
#include "unwind_i.h"
|
||||||
#include "offsets.h"
|
#include "offsets.h"
|
||||||
|
|
||||||
int
|
HIDDEN int
|
||||||
unw_handle_signal_frame (unw_cursor_t *cursor)
|
arm_handle_signal_frame (unw_cursor_t *cursor)
|
||||||
{
|
{
|
||||||
return -UNW_EUNSPEC;
|
return -UNW_EUNSPEC;
|
||||||
}
|
}
|
||||||
|
|
|
@ -92,7 +92,7 @@ unw_step (unw_cursor_t *cursor)
|
||||||
|
|
||||||
/* Check if this is a signal frame. */
|
/* Check if this is a signal frame. */
|
||||||
if (unw_is_signal_frame (cursor) > 0)
|
if (unw_is_signal_frame (cursor) > 0)
|
||||||
return unw_handle_signal_frame (cursor);
|
return arm_handle_signal_frame (cursor);
|
||||||
|
|
||||||
#ifdef CONFIG_DEBUG_FRAME
|
#ifdef CONFIG_DEBUG_FRAME
|
||||||
/* First, try DWARF-based unwinding. */
|
/* First, try DWARF-based unwinding. */
|
||||||
|
|
|
@ -44,6 +44,9 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
|
||||||
extern void arm_local_addr_space_init (void);
|
extern void arm_local_addr_space_init (void);
|
||||||
extern int arm_local_resume (unw_addr_space_t as, unw_cursor_t *cursor,
|
extern int arm_local_resume (unw_addr_space_t as, unw_cursor_t *cursor,
|
||||||
void *arg);
|
void *arg);
|
||||||
|
#define arm_handle_signal_frame UNW_OBJ(handle_signal_frame)
|
||||||
|
extern int arm_handle_signal_frame(unw_cursor_t *cursor);
|
||||||
|
|
||||||
/* By-pass calls to access_mem() when known to be safe. */
|
/* By-pass calls to access_mem() when known to be safe. */
|
||||||
#ifdef UNW_LOCAL_ONLY
|
#ifdef UNW_LOCAL_ONLY
|
||||||
# undef ACCESS_MEM_FAST
|
# undef ACCESS_MEM_FAST
|
||||||
|
|
|
@ -26,8 +26,8 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
|
||||||
#include "unwind_i.h"
|
#include "unwind_i.h"
|
||||||
#include "offsets.h"
|
#include "offsets.h"
|
||||||
|
|
||||||
int
|
static int
|
||||||
unw_handle_signal_frame (unw_cursor_t *cursor)
|
mips_handle_signal_frame (unw_cursor_t *cursor)
|
||||||
{
|
{
|
||||||
struct cursor *c = (struct cursor *) cursor;
|
struct cursor *c = (struct cursor *) cursor;
|
||||||
unw_word_t sc_addr, sp_addr = c->dwarf.cfa;
|
unw_word_t sc_addr, sp_addr = c->dwarf.cfa;
|
||||||
|
@ -116,7 +116,7 @@ unw_step (unw_cursor_t *cursor)
|
||||||
struct cursor *c = (struct cursor *) cursor;
|
struct cursor *c = (struct cursor *) cursor;
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
ret = unw_handle_signal_frame (cursor);
|
ret = mips_handle_signal_frame (cursor);
|
||||||
if (ret < 0)
|
if (ret < 0)
|
||||||
/* Not a signal frame, try DWARF-based unwinding. */
|
/* Not a signal frame, try DWARF-based unwinding. */
|
||||||
ret = dwarf_step (&c->dwarf);
|
ret = dwarf_step (&c->dwarf);
|
||||||
|
|
|
@ -27,8 +27,8 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
|
||||||
#include "unwind_i.h"
|
#include "unwind_i.h"
|
||||||
#include "offsets.h"
|
#include "offsets.h"
|
||||||
|
|
||||||
int
|
static int
|
||||||
unw_handle_signal_frame (unw_cursor_t *cursor)
|
sh_handle_signal_frame (unw_cursor_t *cursor)
|
||||||
{
|
{
|
||||||
struct cursor *c = (struct cursor *) cursor;
|
struct cursor *c = (struct cursor *) cursor;
|
||||||
int ret;
|
int ret;
|
||||||
|
@ -103,7 +103,7 @@ unw_step (unw_cursor_t *cursor)
|
||||||
Debug (1, "(cursor=%p)\n", c);
|
Debug (1, "(cursor=%p)\n", c);
|
||||||
|
|
||||||
if (unw_is_signal_frame (cursor) > 0)
|
if (unw_is_signal_frame (cursor) > 0)
|
||||||
return unw_handle_signal_frame (cursor);
|
return sh_handle_signal_frame (cursor);
|
||||||
|
|
||||||
ret = dwarf_step (&c->dwarf);
|
ret = dwarf_step (&c->dwarf);
|
||||||
|
|
||||||
|
|
|
@ -75,8 +75,8 @@ unw_is_signal_frame (unw_cursor_t *cursor)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
int
|
HIDDEN int
|
||||||
unw_handle_signal_frame (unw_cursor_t *cursor)
|
tilegx_handle_signal_frame (unw_cursor_t *cursor)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
struct cursor *c = (struct cursor *) cursor;
|
struct cursor *c = (struct cursor *) cursor;
|
||||||
|
|
|
@ -37,7 +37,7 @@ unw_step (unw_cursor_t *cursor)
|
||||||
|
|
||||||
/* Special handling the singal frame. */
|
/* Special handling the singal frame. */
|
||||||
if (unw_is_signal_frame (cursor) > 0)
|
if (unw_is_signal_frame (cursor) > 0)
|
||||||
return unw_handle_signal_frame (cursor);
|
return tilegx_handle_signal_frame (cursor);
|
||||||
|
|
||||||
/* Try DWARF-based unwinding... */
|
/* Try DWARF-based unwinding... */
|
||||||
ret = dwarf_step (&c->dwarf);
|
ret = dwarf_step (&c->dwarf);
|
||||||
|
|
|
@ -38,6 +38,8 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
|
||||||
extern int tilegx_local_resume (unw_addr_space_t as,
|
extern int tilegx_local_resume (unw_addr_space_t as,
|
||||||
unw_cursor_t *cursor,
|
unw_cursor_t *cursor,
|
||||||
void *arg);
|
void *arg);
|
||||||
|
#define tilegx_handle_signal_frame UNW_OBJ(handle_signal_frame)
|
||||||
|
extern int tilegx_handle_signal_frame(unw_cursor_t *cursor);
|
||||||
|
|
||||||
extern void tilegx_local_addr_space_init (void);
|
extern void tilegx_local_addr_space_init (void);
|
||||||
|
|
||||||
|
|
|
@ -101,8 +101,8 @@ XXX
|
||||||
return (ret);
|
return (ret);
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
HIDDEN int
|
||||||
unw_handle_signal_frame (unw_cursor_t *cursor)
|
x86_handle_signal_frame (unw_cursor_t *cursor)
|
||||||
{
|
{
|
||||||
struct cursor *c = (struct cursor *) cursor;
|
struct cursor *c = (struct cursor *) cursor;
|
||||||
int ret;
|
int ret;
|
||||||
|
|
|
@ -69,8 +69,8 @@ unw_is_signal_frame (unw_cursor_t *cursor)
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
HIDDEN int
|
||||||
unw_handle_signal_frame (unw_cursor_t *cursor)
|
x86_handle_signal_frame (unw_cursor_t *cursor)
|
||||||
{
|
{
|
||||||
struct cursor *c = (struct cursor *) cursor;
|
struct cursor *c = (struct cursor *) cursor;
|
||||||
int ret;
|
int ret;
|
||||||
|
|
|
@ -57,7 +57,7 @@ unw_step (unw_cursor_t *cursor)
|
||||||
|
|
||||||
if (unw_is_signal_frame (cursor) > 0)
|
if (unw_is_signal_frame (cursor) > 0)
|
||||||
{
|
{
|
||||||
ret = unw_handle_signal_frame(cursor);
|
ret = x86_handle_signal_frame(cursor);
|
||||||
if (ret < 0)
|
if (ret < 0)
|
||||||
{
|
{
|
||||||
Debug (2, "returning 0\n");
|
Debug (2, "returning 0\n");
|
||||||
|
|
|
@ -62,5 +62,7 @@ extern dwarf_loc_t x86_get_scratch_loc (struct cursor *c, unw_regnum_t reg);
|
||||||
extern void *x86_r_uc_addr (ucontext_t *uc, int reg);
|
extern void *x86_r_uc_addr (ucontext_t *uc, int reg);
|
||||||
|
|
||||||
extern void x86_sigreturn (unw_cursor_t *cursor);
|
extern void x86_sigreturn (unw_cursor_t *cursor);
|
||||||
|
#define x86_handle_signal_frame UNW_OBJ(handle_signal_frame)
|
||||||
|
extern int x86_handle_signal_frame(unw_cursor_t *cursor);
|
||||||
|
|
||||||
#endif /* unwind_i_h */
|
#endif /* unwind_i_h */
|
||||||
|
|
|
@ -87,8 +87,8 @@ eb fd jmp 0b
|
||||||
return (X86_64_SCF_NONE);
|
return (X86_64_SCF_NONE);
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
HIDDEN int
|
||||||
unw_handle_signal_frame (unw_cursor_t *cursor)
|
x86_64_handle_signal_frame (unw_cursor_t *cursor)
|
||||||
{
|
{
|
||||||
struct cursor *c = (struct cursor *) cursor;
|
struct cursor *c = (struct cursor *) cursor;
|
||||||
unw_word_t ucontext;
|
unw_word_t ucontext;
|
||||||
|
|
|
@ -83,8 +83,8 @@ unw_is_signal_frame (unw_cursor_t *cursor)
|
||||||
return c->sigcontext_format != X86_64_SCF_NONE;
|
return c->sigcontext_format != X86_64_SCF_NONE;
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
HIDDEN int
|
||||||
unw_handle_signal_frame (unw_cursor_t *cursor)
|
x86_64_handle_signal_frame (unw_cursor_t *cursor)
|
||||||
{
|
{
|
||||||
#if UNW_DEBUG /* To silence compiler warnings */
|
#if UNW_DEBUG /* To silence compiler warnings */
|
||||||
/* Should not get here because we now use kernel-provided dwarf
|
/* Should not get here because we now use kernel-provided dwarf
|
||||||
|
|
|
@ -115,7 +115,7 @@ unw_step (unw_cursor_t *cursor)
|
||||||
|
|
||||||
if (unw_is_signal_frame (cursor) > 0)
|
if (unw_is_signal_frame (cursor) > 0)
|
||||||
{
|
{
|
||||||
ret = unw_handle_signal_frame(cursor);
|
ret = x86_64_handle_signal_frame(cursor);
|
||||||
if (ret < 0)
|
if (ret < 0)
|
||||||
{
|
{
|
||||||
Debug (2, "returning 0\n");
|
Debug (2, "returning 0\n");
|
||||||
|
|
|
@ -87,5 +87,7 @@ extern dwarf_loc_t x86_64_scratch_loc (struct cursor *c, unw_regnum_t reg);
|
||||||
|
|
||||||
extern void *x86_64_r_uc_addr (ucontext_t *uc, int reg);
|
extern void *x86_64_r_uc_addr (ucontext_t *uc, int reg);
|
||||||
extern NORETURN void x86_64_sigreturn (unw_cursor_t *cursor);
|
extern NORETURN void x86_64_sigreturn (unw_cursor_t *cursor);
|
||||||
|
#define x86_64_handle_signal_frame UNW_OBJ(handle_signal_frame)
|
||||||
|
extern int x86_64_handle_signal_frame(unw_cursor_t *cursor);
|
||||||
|
|
||||||
#endif /* unwind_i_h */
|
#endif /* unwind_i_h */
|
||||||
|
|
|
@ -102,7 +102,6 @@ check_local_unw_abi () {
|
||||||
match _UL${plat}_init_local2
|
match _UL${plat}_init_local2
|
||||||
match _UL${plat}_init_remote
|
match _UL${plat}_init_remote
|
||||||
match _UL${plat}_is_signal_frame
|
match _UL${plat}_is_signal_frame
|
||||||
match _UL${plat}_handle_signal_frame
|
|
||||||
match _UL${plat}_local_addr_space
|
match _UL${plat}_local_addr_space
|
||||||
match _UL${plat}_resume
|
match _UL${plat}_resume
|
||||||
match _UL${plat}_set_caching_policy
|
match _UL${plat}_set_caching_policy
|
||||||
|
@ -208,7 +207,6 @@ check_generic_unw_abi () {
|
||||||
match _U${plat}_init_local2
|
match _U${plat}_init_local2
|
||||||
match _U${plat}_init_remote
|
match _U${plat}_init_remote
|
||||||
match _U${plat}_is_signal_frame
|
match _U${plat}_is_signal_frame
|
||||||
match _U${plat}_handle_signal_frame
|
|
||||||
match _U${plat}_local_addr_space
|
match _U${plat}_local_addr_space
|
||||||
match _U${plat}_regname
|
match _U${plat}_regname
|
||||||
match _U${plat}_resume
|
match _U${plat}_resume
|
||||||
|
|
Loading…
Reference in a new issue