diff options
author | Doug Moore <dougm@rice.edu> | 2017-03-30 14:35:35 -0700 |
---|---|---|
committer | Dave Watson <davejwatson@fb.com> | 2017-04-03 14:44:40 -0700 |
commit | 14c48b3d5166d5e33b79267f467b5d512c44a5d9 (patch) | |
tree | 3a2c98786e053ac07306586db251796bde6729af /src/sh/Ginit_local.c | |
parent | 2b8ab794b3a636c05396fdbaebbba25d8aa4722a (diff) | |
download | libunwind-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.c | 18 |
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 */ |