From 14c48b3d5166d5e33b79267f467b5d512c44a5d9 Mon Sep 17 00:00:00 2001 From: Doug Moore Date: Thu, 30 Mar 2017 14:35:35 -0700 Subject: unw_init_local_signal init_local, but *not* setting use_prev_instr. This is necessary to correctly unwind using ucontext argument to signal handlers. --- src/sh/Ginit_local.c | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) (limited to 'src/sh') 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 */ -- cgit v1.2.1