summaryrefslogtreecommitdiff
path: root/src/sh/Ginit_local.c
diff options
context:
space:
mode:
authorDoug Moore <dougm@rice.edu>2017-03-30 14:35:35 -0700
committerDave Watson <davejwatson@fb.com>2017-04-03 14:44:40 -0700
commit14c48b3d5166d5e33b79267f467b5d512c44a5d9 (patch)
tree3a2c98786e053ac07306586db251796bde6729af /src/sh/Ginit_local.c
parent2b8ab794b3a636c05396fdbaebbba25d8aa4722a (diff)
downloadlibunwind-14c48b3d5166d5e33b79267f467b5d512c44a5d9.tar.gz
unw_init_local_signal
init_local, but *not* setting use_prev_instr. This is necessary to correctly unwind using ucontext argument to signal handlers.
Diffstat (limited to 'src/sh/Ginit_local.c')
-rw-r--r--src/sh/Ginit_local.c18
1 files changed, 15 insertions, 3 deletions
diff --git a/src/sh/Ginit_local.c b/src/sh/Ginit_local.c
index e1cc30c6..598f708a 100644
--- a/src/sh/Ginit_local.c
+++ b/src/sh/Ginit_local.c
@@ -36,8 +36,8 @@ unw_init_local (unw_cursor_t *cursor, unw_context_t *uc)
#else /* !UNW_REMOTE_ONLY */
-PROTECTED int
-unw_init_local (unw_cursor_t *cursor, unw_context_t *uc)
+static int
+unw_init_local (unw_cursor_t *cursor, unw_context_t *uc, unsigned use_prev_instr)
{
struct cursor *c = (struct cursor *) cursor;
@@ -49,7 +49,19 @@ unw_init_local (unw_cursor_t *cursor, unw_context_t *uc)
c->dwarf.as = unw_local_addr_space;
c->dwarf.as_arg = uc;
- return common_init (c, 1);
+ return common_init (c, use_prev_instr);
+}
+
+PROTECTED int
+unw_init_local (unw_cursor_t *cursor, unw_context_t *uc)
+{
+ return unw_init_local_common(cursor, uc, 1);
+}
+
+PROTECTED int
+unw_init_local_signal (unw_cursor_t *cursor, unw_context_t *uc)
+{
+ return unw_init_local_common(cursor, uc, 0);
}
#endif /* !UNW_REMOTE_ONLY */