This is the mail archive of the
mailing list for the GDB project.
Re: [COMMITTED] Eliminate dwarf2_frame_cache recursion, don't unwind from the dwarf2 sniffer (move dwarf2_tailcall_sniffer_first elsewhere).
- From: Mark Kettenis <mark dot kettenis at xs4all dot nl>
- To: palves at redhat dot com
- Cc: gdb-patches at sourceware dot org
- Date: Fri, 22 Nov 2013 16:00:58 +0100 (CET)
- Subject: Re: [COMMITTED] Eliminate dwarf2_frame_cache recursion, don't unwind from the dwarf2 sniffer (move dwarf2_tailcall_sniffer_first elsewhere).
- Authentication-results: sourceware.org; auth=none
- References: <1384970595-25601-1-git-send-email-palves at redhat dot com> <528F64D9 dot 50601 at redhat dot com>
> Date: Fri, 22 Nov 2013 14:06:17 +0000
> From: Pedro Alves <email@example.com>
> This one is actually needed to fix PR16155. I've added a new rationale for
> the patch to the commit log, and pushed it. The other get_prev_frame
> patch adds a testcase that covers this too.
> Subject: [PATCH] Eliminate dwarf2_frame_cache recursion, don't unwind from
> the dwarf2 sniffer (move dwarf2_tailcall_sniffer_first
> Two rationales, same patch.
> TL;DR 1:
> dwarf2_frame_cache recursion is evil. dwarf2_frame_cache calls
> dwarf2_tailcall_sniffer_first which then recurses into
> TL;DR 2:
> An unwinder trying to unwind is evil. dwarf2_frame_sniffer calls
> dwarf2_frame_cache which calls dwarf2_tailcall_sniffer_first which
> then tries to unwind the PC of the previous frame.
I wholeheartedly agree with your analysis, and your solution seems