From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 51148 invoked by alias); 11 Mar 2016 18:37:30 -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 51123 invoked by uid 89); 11 Mar 2016 18:37:29 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RP_MATCHES_RCVD,SPF_HELO_PASS autolearn=ham version=3.3.2 spammy=HContent-Transfer-Encoding:8bit X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Fri, 11 Mar 2016 18:37:25 +0000 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (Postfix) with ESMTPS id 2229D7EBA7; Fri, 11 Mar 2016 18:37:24 +0000 (UTC) Received: from [127.0.0.1] (ovpn01.gateway.prod.ext.phx2.redhat.com [10.5.9.1]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id u2BIbMKa011672; Fri, 11 Mar 2016 13:37:22 -0500 Subject: Re: [PATCH 4/8] gdb/s390: Fill gen_return_address hook. To: Eli Zaretskii References: <1453637529-26972-5-git-send-email-koriakin@0x04.net> <1454853751-18455-1-git-send-email-koriakin@0x04.net> <56E2AD82.3060101@0x04.net> <56E2B95F.7050701@0x04.net> <56E2E7C8.7050901@redhat.com> <56E2FA1B.7050808@redhat.com> <83shzwj2wt.fsf@gnu.org> Cc: arnez@linux.vnet.ibm.com, koriakin@0x04.net, gdb-patches@sourceware.org From: Pedro Alves Message-ID: <56E31062.7020707@redhat.com> Date: Fri, 11 Mar 2016 18:37:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.6.0 MIME-Version: 1.0 In-Reply-To: <83shzwj2wt.fsf@gnu.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit X-SW-Source: 2016-03/txt/msg00198.txt.bz2 On 03/11/2016 06:16 PM, Eli Zaretskii wrote: >> Cc: Eli Zaretskii , >> Marcin Kościelnicki >> , >> gdb-patches@sourceware.org >> From: Pedro Alves >> Date: Fri, 11 Mar 2016 17:02:19 +0000 >> >>> @item $_ret >>> Collect the return address. This is helpful if you want to see more >>> -of a backtrace. >>> +of a backtrace. Note that the return address can not always be >>> +determined reliably, and a wrong address may be collected instead. >>> +The reliability is usually higher for tracepoints at function entry. >> >> Hmm, this reads a bit as if the backtrace will be incorrect/bogus >> later on, which is not true. >> >> How about a merge of your suggestion with Marcin's previous reply, >> and some extras on top: >> >> @item $_ret >> Collect the set of memory addresses and/or registers necessary to compute >> the frame's return address. This is helpful if you want to see >> more of a backtrace. >> >> @emph{Note:} The necessary set can not always be reliability determined up >> front, and the wrong address / registers may end up collected instead. >> The reliability is usually higher for tracepoints at function entry. >> When this happens, backtracing will stop because the return address >> is found unavailable (unless another collect rule happened to match it). > > Maybe it's me, but I don't see the significant difference between > these two versions. I think the original version can be misinterpreted as if the backtrace will show the wrong caller when the wrong address is collected. This version clarifies that it won't. > (And there's a typo in the second one: > "reliability" should be "reliably".) Whoops. Thanks, Pedro Alves