From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 113803 invoked by alias); 14 Mar 2016 10:07:25 -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 112147 invoked by uid 89); 14 Mar 2016 10:07:24 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-0.8 required=5.0 tests=AWL,BAYES_00,KAM_LAZY_DOMAIN_SECURITY,RP_MATCHES_RCVD autolearn=no version=3.3.2 spammy=our X-HELO: e06smtp09.uk.ibm.com Received: from e06smtp09.uk.ibm.com (HELO e06smtp09.uk.ibm.com) (195.75.94.105) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (CAMELLIA256-SHA encrypted) ESMTPS; Mon, 14 Mar 2016 10:07:22 +0000 Received: from localhost by e06smtp09.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Mon, 14 Mar 2016 10:07:19 -0000 Received: from d06dlp01.portsmouth.uk.ibm.com (9.149.20.13) by e06smtp09.uk.ibm.com (192.168.101.139) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Mon, 14 Mar 2016 10:07:16 -0000 X-IBM-Helo: d06dlp01.portsmouth.uk.ibm.com X-IBM-MailFrom: arnez@linux.vnet.ibm.com X-IBM-RcptTo: gdb-patches@sourceware.org Received: from b06cxnps4074.portsmouth.uk.ibm.com (d06relay11.portsmouth.uk.ibm.com [9.149.109.196]) by d06dlp01.portsmouth.uk.ibm.com (Postfix) with ESMTP id 7098017D8059 for ; Mon, 14 Mar 2016 10:07:46 +0000 (GMT) Received: from d06av04.portsmouth.uk.ibm.com (d06av04.portsmouth.uk.ibm.com [9.149.37.216]) by b06cxnps4074.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id u2EA7FxT63242318 for ; Mon, 14 Mar 2016 10:07:15 GMT Received: from d06av04.portsmouth.uk.ibm.com (localhost [127.0.0.1]) by d06av04.portsmouth.uk.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id u2EA7FvJ014559 for ; Mon, 14 Mar 2016 04:07:15 -0600 Received: from oc1027705133.ibm.com (dyn-9-152-212-180.boeblingen.de.ibm.com [9.152.212.180]) by d06av04.portsmouth.uk.ibm.com (8.14.4/8.14.4/NCO v10.0 AVin) with ESMTP id u2EA7E7e014523 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Mon, 14 Mar 2016 04:07:14 -0600 From: Andreas Arnez To: Marcin =?utf-8?Q?Ko=C5=9Bcielnicki?= Cc: gdb-patches@sourceware.org Subject: Re: [PATCH 4/8] gdb/s390: Fill gen_return_address hook. 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> <56E53881.9000700@0x04.net> Date: Mon, 14 Mar 2016 10:07:00 -0000 In-Reply-To: <56E53881.9000700@0x04.net> ("Marcin \=\?utf-8\?Q\?Ko\=C5\=9Bcielni\?\= \=\?utf-8\?Q\?cki\=22's\?\= message of "Sun, 13 Mar 2016 10:53:05 +0100") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-TM-AS-MML: disable x-cbid: 16031410-0037-0000-0000-0000061D0B69 X-IsSubscribed: yes X-SW-Source: 2016-03/txt/msg00207.txt.bz2 On Sun, Mar 13 2016, Marcin Ko=C5=9Bcielnicki wrote: > On 11/03/16 16:31, Andreas Arnez wrote: >> On Fri, Mar 11 2016, Marcin Ko=C5=9Bcielnicki wrote: >> >>> We can always error() in there (and KFAIL the testcase in gdb.trace >>> that exercises it). However, returning garbage here doesn't result in >>> garbage backtrace - this only collects data, if the unwinder actually >>> doing the work later determines it should look for the return address >>> on the stack, it'll just ignore our collected $r14 and consider the >>> return address unavailable (unless another collect rule happened to >>> match it). >> >> Well, from that test case it appears that `$_ret' is generally not >> expected to work very reliably. Since r14 usually does work near >> function entry, this may be sufficient for now. >> >> So I'm OK with the patch. Please add a small comment stating that this >> is a best-can-do approach that usually works near function entry and may >> yield wrong results otherwise. >> > > Thanks, pushed with this comment: > > /* The "gen_return_address" gdbarch method. Since this is supposed to be > just a best-effort method, and we don't really have the means to run > the full unwinder here, just collect the link register. */ Very good, thanks. --=20 Andreas Arnez