1
0
Fork 0
mirror of https://github.com/tobast/libunwind-eh_elf.git synced 2024-11-16 13:18:12 +01:00

Remove unw_handle_signal_frame from public API.

This commit is contained in:
Dave Watson 2017-12-28 08:58:55 -08:00
parent a1437a3d27
commit e287b69068
20 changed files with 38 additions and 31 deletions

View file

@ -51,8 +51,8 @@ is_plt_entry (struct dwarf_cursor *c)
return ret;
}
int
unw_handle_signal_frame (unw_cursor_t *cursor)
static int
aarch64_handle_signal_frame (unw_cursor_t *cursor)
{
struct cursor *c = (struct cursor *) cursor;
int ret;
@ -141,7 +141,7 @@ unw_step (unw_cursor_t *cursor)
/* Check if this is a signal frame. */
if (unw_is_signal_frame (cursor) > 0)
return unw_handle_signal_frame (cursor);
return aarch64_handle_signal_frame (cursor);
ret = dwarf_step (&c->dwarf);
Debug(1, "dwarf_step()=%d\n", ret);

View file

@ -34,8 +34,8 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
#include "offsets.h"
#include "ex_tables.h"
int
unw_handle_signal_frame (unw_cursor_t *cursor)
HIDDEN int
arm_handle_signal_frame (unw_cursor_t *cursor)
{
struct cursor *c = (struct cursor *) cursor;
int ret, fmt;

View file

@ -29,8 +29,8 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
#include "unwind_i.h"
#include "offsets.h"
int
unw_handle_signal_frame (unw_cursor_t *cursor)
HIDDEN int
arm_handle_signal_frame (unw_cursor_t *cursor)
{
struct cursor *c = (struct cursor *) cursor;
int ret;

View file

@ -29,8 +29,8 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
#include "unwind_i.h"
#include "offsets.h"
int
unw_handle_signal_frame (unw_cursor_t *cursor)
HIDDEN int
arm_handle_signal_frame (unw_cursor_t *cursor)
{
return -UNW_EUNSPEC;
}

View file

@ -92,7 +92,7 @@ unw_step (unw_cursor_t *cursor)
/* Check if this is a signal frame. */
if (unw_is_signal_frame (cursor) > 0)
return unw_handle_signal_frame (cursor);
return arm_handle_signal_frame (cursor);
#ifdef CONFIG_DEBUG_FRAME
/* First, try DWARF-based unwinding. */

View file

@ -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 int arm_local_resume (unw_addr_space_t as, unw_cursor_t *cursor,
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. */
#ifdef UNW_LOCAL_ONLY
# undef ACCESS_MEM_FAST

View file

@ -26,8 +26,8 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
#include "unwind_i.h"
#include "offsets.h"
int
unw_handle_signal_frame (unw_cursor_t *cursor)
static int
mips_handle_signal_frame (unw_cursor_t *cursor)
{
struct cursor *c = (struct cursor *) cursor;
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;
int ret;
ret = unw_handle_signal_frame (cursor);
ret = mips_handle_signal_frame (cursor);
if (ret < 0)
/* Not a signal frame, try DWARF-based unwinding. */
ret = dwarf_step (&c->dwarf);

View file

@ -27,8 +27,8 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
#include "unwind_i.h"
#include "offsets.h"
int
unw_handle_signal_frame (unw_cursor_t *cursor)
static int
sh_handle_signal_frame (unw_cursor_t *cursor)
{
struct cursor *c = (struct cursor *) cursor;
int ret;
@ -103,7 +103,7 @@ unw_step (unw_cursor_t *cursor)
Debug (1, "(cursor=%p)\n", c);
if (unw_is_signal_frame (cursor) > 0)
return unw_handle_signal_frame (cursor);
return sh_handle_signal_frame (cursor);
ret = dwarf_step (&c->dwarf);

View file

@ -75,8 +75,8 @@ unw_is_signal_frame (unw_cursor_t *cursor)
}
int
unw_handle_signal_frame (unw_cursor_t *cursor)
HIDDEN int
tilegx_handle_signal_frame (unw_cursor_t *cursor)
{
int i;
struct cursor *c = (struct cursor *) cursor;

View file

@ -37,7 +37,7 @@ unw_step (unw_cursor_t *cursor)
/* Special handling the singal frame. */
if (unw_is_signal_frame (cursor) > 0)
return unw_handle_signal_frame (cursor);
return tilegx_handle_signal_frame (cursor);
/* Try DWARF-based unwinding... */
ret = dwarf_step (&c->dwarf);

View file

@ -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,
unw_cursor_t *cursor,
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);

View file

@ -101,8 +101,8 @@ XXX
return (ret);
}
int
unw_handle_signal_frame (unw_cursor_t *cursor)
HIDDEN int
x86_handle_signal_frame (unw_cursor_t *cursor)
{
struct cursor *c = (struct cursor *) cursor;
int ret;

View file

@ -69,8 +69,8 @@ unw_is_signal_frame (unw_cursor_t *cursor)
return ret;
}
int
unw_handle_signal_frame (unw_cursor_t *cursor)
HIDDEN int
x86_handle_signal_frame (unw_cursor_t *cursor)
{
struct cursor *c = (struct cursor *) cursor;
int ret;

View file

@ -57,7 +57,7 @@ unw_step (unw_cursor_t *cursor)
if (unw_is_signal_frame (cursor) > 0)
{
ret = unw_handle_signal_frame(cursor);
ret = x86_handle_signal_frame(cursor);
if (ret < 0)
{
Debug (2, "returning 0\n");

View file

@ -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_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 */

View file

@ -87,8 +87,8 @@ eb fd jmp 0b
return (X86_64_SCF_NONE);
}
int
unw_handle_signal_frame (unw_cursor_t *cursor)
HIDDEN int
x86_64_handle_signal_frame (unw_cursor_t *cursor)
{
struct cursor *c = (struct cursor *) cursor;
unw_word_t ucontext;

View file

@ -83,8 +83,8 @@ unw_is_signal_frame (unw_cursor_t *cursor)
return c->sigcontext_format != X86_64_SCF_NONE;
}
int
unw_handle_signal_frame (unw_cursor_t *cursor)
HIDDEN int
x86_64_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

View file

@ -115,7 +115,7 @@ unw_step (unw_cursor_t *cursor)
if (unw_is_signal_frame (cursor) > 0)
{
ret = unw_handle_signal_frame(cursor);
ret = x86_64_handle_signal_frame(cursor);
if (ret < 0)
{
Debug (2, "returning 0\n");

View file

@ -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 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 */

View file

@ -102,7 +102,6 @@ check_local_unw_abi () {
match _UL${plat}_init_local2
match _UL${plat}_init_remote
match _UL${plat}_is_signal_frame
match _UL${plat}_handle_signal_frame
match _UL${plat}_local_addr_space
match _UL${plat}_resume
match _UL${plat}_set_caching_policy
@ -208,7 +207,6 @@ check_generic_unw_abi () {
match _U${plat}_init_local2
match _U${plat}_init_remote
match _U${plat}_is_signal_frame
match _U${plat}_handle_signal_frame
match _U${plat}_local_addr_space
match _U${plat}_regname
match _U${plat}_resume