From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 125604 invoked by alias); 5 Feb 2016 14:18:52 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 125519 invoked by uid 89); 5 Feb 2016 14:18:51 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-0.6 required=5.0 tests=AWL,BAYES_00,KAM_LAZY_DOMAIN_SECURITY,RP_MATCHES_RCVD autolearn=no version=3.3.2 spammy=H*r:sk:mmetzge, Hx-languages-length:1031, unintentionally, 1831 X-HELO: mga01.intel.com Received: from mga01.intel.com (HELO mga01.intel.com) (192.55.52.88) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 05 Feb 2016 14:18:47 +0000 Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmsmga101.fm.intel.com with ESMTP; 05 Feb 2016 06:18:45 -0800 X-ExtLoop1: 1 Received: from irvmail001.ir.intel.com ([163.33.26.43]) by orsmga002.jf.intel.com with ESMTP; 05 Feb 2016 06:18:44 -0800 Received: from ulvlx001.iul.intel.com (ulvlx001.iul.intel.com [172.28.207.17]) by irvmail001.ir.intel.com (8.14.3/8.13.6/MailSET/Hub) with ESMTP id u15EIhss008702; Fri, 5 Feb 2016 14:18:43 GMT Received: from ulvlx001.iul.intel.com (localhost [127.0.0.1]) by ulvlx001.iul.intel.com with ESMTP id u15EIhI4002521; Fri, 5 Feb 2016 15:18:43 +0100 Received: (from mmetzger@localhost) by ulvlx001.iul.intel.com with œ id u15EIhwr002517; Fri, 5 Feb 2016 15:18:43 +0100 From: Markus Metzger To: palves@redhat.com Cc: gdb-patches@sourceware.org Subject: [PATCH v2 2/3] frame: use get_prev_frame_always in skip_tailcall_frames Date: Fri, 05 Feb 2016 14:18:00 -0000 Message-Id: <1454681922-2228-2-git-send-email-markus.t.metzger@intel.com> In-Reply-To: <1454681922-2228-1-git-send-email-markus.t.metzger@intel.com> References: <1454681922-2228-1-git-send-email-markus.t.metzger@intel.com> X-IsSubscribed: yes X-SW-Source: 2016-02/txt/msg00146.txt.bz2 Following the practice in skip_artificial_frames, also use get_prev_frame_always instead of get_prev_frame in skip_tailcall_frames. 2016-02-05 Markus Metzger gdb/ * frame.c (skip_tailcall_frames): Call get_prev_frame_always. --- gdb/frame.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/gdb/frame.c b/gdb/frame.c index b7832c7..6ab8834 100644 --- a/gdb/frame.c +++ b/gdb/frame.c @@ -443,8 +443,12 @@ skip_artificial_frames (struct frame_info *frame) struct frame_info * skip_tailcall_frames (struct frame_info *frame) { + /* Note we use get_prev_frame_always, and not get_prev_frame. The + latter will truncate the frame chain, leading to this function + unintentionally returning a null_frame_id (e.g., when the user + sets a backtrace limit). */ while (get_frame_type (frame) == TAILCALL_FRAME) - frame = get_prev_frame (frame); + frame = get_prev_frame_always (frame); return frame; } -- 1.8.3.1