[COMMITTED] Eliminate dwarf2_frame_cache recursion, don't unwind from the dwarf2 sniffer (move dwarf2_tailcall_sniffer_first elsewhere).
Mark Kettenis
mark.kettenis@xs4all.nl
Fri Nov 22 15:09:00 GMT 2013
> Date: Fri, 22 Nov 2013 14:06:17 +0000
> From: Pedro Alves <palves@redhat.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
> elsewhere).
>
> 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
> dwarf2_frame_cache.
>
> 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
reasonable.
More information about the Gdb-patches
mailing list