From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 127754 invoked by alias); 11 Mar 2016 11:20:17 -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 127734 invoked by uid 89); 11 Mar 2016 11:20:16 -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=H*o:Research X-HELO: e06smtp12.uk.ibm.com Received: from e06smtp12.uk.ibm.com (HELO e06smtp12.uk.ibm.com) (195.75.94.108) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (CAMELLIA256-SHA encrypted) ESMTPS; Fri, 11 Mar 2016 11:20:11 +0000 Received: from localhost by e06smtp12.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Fri, 11 Mar 2016 11:20:08 -0000 Received: from d06dlp02.portsmouth.uk.ibm.com (9.149.20.14) by e06smtp12.uk.ibm.com (192.168.101.142) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Fri, 11 Mar 2016 11:20:07 -0000 X-IBM-Helo: d06dlp02.portsmouth.uk.ibm.com X-IBM-MailFrom: arnez@linux.vnet.ibm.com X-IBM-RcptTo: gdb-patches@sourceware.org Received: from b06cxnps3074.portsmouth.uk.ibm.com (d06relay09.portsmouth.uk.ibm.com [9.149.109.194]) by d06dlp02.portsmouth.uk.ibm.com (Postfix) with ESMTP id 4FCCF219005E for ; Fri, 11 Mar 2016 11:19:49 +0000 (GMT) Received: from d06av02.portsmouth.uk.ibm.com (d06av02.portsmouth.uk.ibm.com [9.149.37.228]) by b06cxnps3074.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id u2BBK6ep6684986 for ; Fri, 11 Mar 2016 11:20:06 GMT Received: from d06av02.portsmouth.uk.ibm.com (localhost [127.0.0.1]) by d06av02.portsmouth.uk.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id u2BBK6W3020623 for ; Fri, 11 Mar 2016 04:20:06 -0700 Received: from oc1027705133.ibm.com (dyn-9-152-212-180.boeblingen.de.ibm.com [9.152.212.180]) by d06av02.portsmouth.uk.ibm.com (8.14.4/8.14.4/NCO v10.0 AVin) with ESMTP id u2BBK5L5020602 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 11 Mar 2016 04:20:06 -0700 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> Date: Fri, 11 Mar 2016 11:20:00 -0000 In-Reply-To: <1454853751-18455-1-git-send-email-koriakin@0x04.net> ("Marcin \=\?utf-8\?Q\?Ko\=C5\=9Bcielnicki\=22's\?\= message of "Sun, 7 Feb 2016 15:02:31 +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-Content-Scanned: Fidelis XPS MAILER x-cbid: 16031111-0009-0000-0000-0000080086BE X-IsSubscribed: yes X-SW-Source: 2016-03/txt/msg00180.txt.bz2 On Sun, Feb 07 2016, Marcin Ko=C5=9Bcielnicki wrote: > diff --git a/gdb/s390-linux-tdep.c b/gdb/s390-linux-tdep.c > index 97bd564..0b91ed1 100644 > --- a/gdb/s390-linux-tdep.c > +++ b/gdb/s390-linux-tdep.c > @@ -627,6 +627,18 @@ s390_ax_pseudo_register_push_stack (struct gdbarch *= gdbarch, > return 0; > } >=20=20 > +/* The "gen_return_address" gdbarch method. */ > + > +static void > +s390_gen_return_address (struct gdbarch *gdbarch, > + struct agent_expr *ax, struct axs_value *value, > + CORE_ADDR scope) > +{ > + value->type =3D register_type (gdbarch, S390_R14_REGNUM); > + value->kind =3D axs_lvalue_register; > + value->u.reg =3D S390_R14_REGNUM; > +} Under which circumstances is this supposed to work? And how reliable does it need to be? The ABI only guarantees that r14 holds the return address at function entry. Anywhere else it likely doesn't. -- Andreas