summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDave Watson <davejwatson@fb.com>2017-12-28 08:58:55 -0800
committerDave Watson <davejwatson@fb.com>2018-01-03 10:22:54 -0800
commite5fc8e77fca1e9d6a5dace39f74f945ce8c56e02 (patch)
tree4b1be7ceef38bca53ae6f57a4682ea8208f3e0ca
parent304f9ea971be33c790e1f28f1b268f6c73458183 (diff)
downloadlibunwind-e5fc8e77fca1e9d6a5dace39f74f945ce8c56e02.tar.gz
Remove unw_handle_signal_frame from public API.
-rw-r--r--src/aarch64/Gstep.c6
-rw-r--r--src/arm/Gos-freebsd.c4
-rw-r--r--src/arm/Gos-linux.c4
-rw-r--r--src/arm/Gos-other.c4
-rw-r--r--src/arm/Gstep.c2
-rw-r--r--src/arm/unwind_i.h3
-rw-r--r--src/mips/Gstep.c6
-rw-r--r--src/sh/Gstep.c6
-rw-r--r--src/tilegx/Gis_signal_frame.c4
-rw-r--r--src/tilegx/Gstep.c2
-rw-r--r--src/tilegx/unwind_i.h2
-rw-r--r--src/x86/Gos-freebsd.c4
-rw-r--r--src/x86/Gos-linux.c4
-rw-r--r--src/x86/Gstep.c2
-rw-r--r--src/x86/unwind_i.h2
-rw-r--r--src/x86_64/Gos-freebsd.c4
-rw-r--r--src/x86_64/Gos-linux.c4
-rw-r--r--src/x86_64/Gstep.c2
-rw-r--r--src/x86_64/unwind_i.h2
-rw-r--r--tests/check-namespace.sh.in2
20 files changed, 38 insertions, 31 deletions
diff --git a/src/aarch64/Gstep.c b/src/aarch64/Gstep.c
index 473be7d7..940bec76 100644
--- a/src/aarch64/Gstep.c
+++ b/src/aarch64/Gstep.c
@@ -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);
diff --git a/src/arm/Gos-freebsd.c b/src/arm/Gos-freebsd.c
index 8efdebac..3423fafb 100644
--- a/src/arm/Gos-freebsd.c
+++ b/src/arm/Gos-freebsd.c
@@ -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;
diff --git a/src/arm/Gos-linux.c b/src/arm/Gos-linux.c
index e14295a4..30923bad 100644
--- a/src/arm/Gos-linux.c
+++ b/src/arm/Gos-linux.c
@@ -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;
diff --git a/src/arm/Gos-other.c b/src/arm/Gos-other.c
index 6f4e1b3d..73c102c3 100644
--- a/src/arm/Gos-other.c
+++ b/src/arm/Gos-other.c
@@ -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;
}
diff --git a/src/arm/Gstep.c b/src/arm/Gstep.c
index 669af7c7..516c9f4d 100644
--- a/src/arm/Gstep.c
+++ b/src/arm/Gstep.c
@@ -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. */
diff --git a/src/arm/unwind_i.h b/src/arm/unwind_i.h
index 4dabf217..fe0bca00 100644
--- a/src/arm/unwind_i.h
+++ b/src/arm/unwind_i.h
@@ -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
diff --git a/src/mips/Gstep.c b/src/mips/Gstep.c
index d4fc690c..937136ae 100644
--- a/src/mips/Gstep.c
+++ b/src/mips/Gstep.c
@@ -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);
diff --git a/src/sh/Gstep.c b/src/sh/Gstep.c
index fd91f4ef..60d7ec2b 100644
--- a/src/sh/Gstep.c
+++ b/src/sh/Gstep.c
@@ -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);
diff --git a/src/tilegx/Gis_signal_frame.c b/src/tilegx/Gis_signal_frame.c
index 802fb7bf..c0cff4a2 100644
--- a/src/tilegx/Gis_signal_frame.c
+++ b/src/tilegx/Gis_signal_frame.c
@@ -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;
diff --git a/src/tilegx/Gstep.c b/src/tilegx/Gstep.c
index e416f01b..c748dbc5 100644
--- a/src/tilegx/Gstep.c
+++ b/src/tilegx/Gstep.c
@@ -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);
diff --git a/src/tilegx/unwind_i.h b/src/tilegx/unwind_i.h
index aac7be38..9d41c90b 100644
--- a/src/tilegx/unwind_i.h
+++ b/src/tilegx/unwind_i.h
@@ -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);
diff --git a/src/x86/Gos-freebsd.c b/src/x86/Gos-freebsd.c
index ddc97cfb..8c4c2bb9 100644
--- a/src/x86/Gos-freebsd.c
+++ b/src/x86/Gos-freebsd.c
@@ -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;
diff --git a/src/x86/Gos-linux.c b/src/x86/Gos-linux.c
index c88ea67c..ae141c6e 100644
--- a/src/x86/Gos-linux.c
+++ b/src/x86/Gos-linux.c
@@ -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;
diff --git a/src/x86/Gstep.c b/src/x86/Gstep.c
index 7b07b4f1..129b739a 100644
--- a/src/x86/Gstep.c
+++ b/src/x86/Gstep.c
@@ -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");
diff --git a/src/x86/unwind_i.h b/src/x86/unwind_i.h
index d2aed609..caa7e02d 100644
--- a/src/x86/unwind_i.h
+++ b/src/x86/unwind_i.h
@@ -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 */
diff --git a/src/x86_64/Gos-freebsd.c b/src/x86_64/Gos-freebsd.c
index c640ad5e..59f3e703 100644
--- a/src/x86_64/Gos-freebsd.c
+++ b/src/x86_64/Gos-freebsd.c
@@ -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;
diff --git a/src/x86_64/Gos-linux.c b/src/x86_64/Gos-linux.c
index ad91a678..bd142345 100644
--- a/src/x86_64/Gos-linux.c
+++ b/src/x86_64/Gos-linux.c
@@ -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
diff --git a/src/x86_64/Gstep.c b/src/x86_64/Gstep.c
index 0d385f28..4865ab96 100644
--- a/src/x86_64/Gstep.c
+++ b/src/x86_64/Gstep.c
@@ -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");
diff --git a/src/x86_64/unwind_i.h b/src/x86_64/unwind_i.h
index 4f81566a..e95a60ff 100644
--- a/src/x86_64/unwind_i.h
+++ b/src/x86_64/unwind_i.h
@@ -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 */
diff --git a/tests/check-namespace.sh.in b/tests/check-namespace.sh.in
index 7268cda4..6d008173 100644
--- a/tests/check-namespace.sh.in
+++ b/tests/check-namespace.sh.in
@@ -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