aboutsummaryrefslogtreecommitdiff
path: root/gdb/frame-unwind.h
diff options
context:
space:
mode:
authorYao Qi <yao.qi@linaro.org>2017-08-11 09:30:02 +0100
committerYao Qi <yao.qi@linaro.org>2017-08-11 09:30:02 +0100
commitbe7d3cd5f13196dd070978aa48c2832c351c25b6 (patch)
tree278bb3572688fc5348c0ac9318060c16c480b10b /gdb/frame-unwind.h
parent1c90d9f022469629c255d44664b4452998168359 (diff)
downloadgdb-be7d3cd5f13196dd070978aa48c2832c351c25b6.zip
gdb-be7d3cd5f13196dd070978aa48c2832c351c25b6.tar.gz
gdb-be7d3cd5f13196dd070978aa48c2832c351c25b6.tar.bz2
Reset *THIS_CACHE in frame_unwind_try_unwinder in case of exception
It is required that unwinder->sniffer should set *this_cache to NULL if the unwinder is not applicable or exception is thrown, so 78ac5f831692f70b841044961069e50d4ba6a76f adds clear_pointer_cleanup to set *this_cache to NULL in case of exception in order to fix PR 14100. https://sourceware.org/ml/gdb-patches/2012-08/msg00075.html This patch removes that clear_pointer_cleanup, and catch all exception in the caller of unwinder->sniffer. In case of exception, reset *this_case. gdb: 2017-08-11 Yao Qi <yao.qi@linaro.org> * dwarf2-frame.c (clear_pointer_cleanup): Remove. (dwarf2_frame_cache): Remove reset_cache_cleanup. (dwarf2_frame_cache): * frame-unwind.c (frame_unwind_try_unwinder): Catch RETURN_MASK_ALL and set *this_case to NULL. * frame-unwind.h: Update comments.
Diffstat (limited to 'gdb/frame-unwind.h')
-rw-r--r--gdb/frame-unwind.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/gdb/frame-unwind.h b/gdb/frame-unwind.h
index 4588cef..8226b6d 100644
--- a/gdb/frame-unwind.h
+++ b/gdb/frame-unwind.h
@@ -46,7 +46,8 @@ struct value;
the PC and attributes) and if SELF is the applicable unwinder,
return non-zero. Possibly also initialize THIS_PROLOGUE_CACHE; but
only if returning 1. Initializing THIS_PROLOGUE_CACHE in other
- cases (0 return, or exception) is invalid. */
+ cases (0 return) is invalid. In case of exception, the caller has
+ to set *THIS_PROLOGUE_CACHE to NULL. */
typedef int (frame_sniffer_ftype) (const struct frame_unwind *self,
struct frame_info *this_frame,