From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13458 invoked by alias); 17 Apr 2014 12:18:36 -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 13445 invoked by uid 89); 17 Apr 2014 12:18:35 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.7 required=5.0 tests=AWL,BAYES_00,MSGID_FROM_MTA_HEADER,RP_MATCHES_RCVD,SPF_SOFTFAIL autolearn=no version=3.3.2 X-HELO: e36.co.us.ibm.com Received: from e36.co.us.ibm.com (HELO e36.co.us.ibm.com) (32.97.110.154) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-SHA encrypted) ESMTPS; Thu, 17 Apr 2014 12:18:34 +0000 Received: from /spool/local by e36.co.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Thu, 17 Apr 2014 06:18:32 -0600 Received: from d03dlp03.boulder.ibm.com (9.17.202.179) by e36.co.us.ibm.com (192.168.1.136) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Thu, 17 Apr 2014 06:18:31 -0600 Received: from b03cxnp08026.gho.boulder.ibm.com (b03cxnp08026.gho.boulder.ibm.com [9.17.130.18]) by d03dlp03.boulder.ibm.com (Postfix) with ESMTP id 0F13119D8039 for ; Thu, 17 Apr 2014 06:18:26 -0600 (MDT) Received: from d03av02.boulder.ibm.com (d03av02.boulder.ibm.com [9.17.195.168]) by b03cxnp08026.gho.boulder.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id s3HCHeM166781332 for ; Thu, 17 Apr 2014 14:17:48 +0200 Received: from d03av02.boulder.ibm.com (localhost [127.0.0.1]) by d03av02.boulder.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id s3HCHuCi002771 for ; Thu, 17 Apr 2014 06:17:56 -0600 Received: from tuxmaker.boeblingen.de.ibm.com (tuxmaker.boeblingen.de.ibm.com [9.152.85.9]) by d03av02.boulder.ibm.com (8.14.4/8.14.4/NCO v10.0 AVin) with SMTP id s3HCHsn3001844; Thu, 17 Apr 2014 06:17:55 -0600 Message-Id: <201404171217.s3HCHsn3001844@d03av02.boulder.ibm.com> Received: by tuxmaker.boeblingen.de.ibm.com (sSMTP sendmail emulation); Thu, 17 Apr 2014 14:17:30 +0200 Subject: Re: [RFC] Use address_from_register in dwarf2-frame.c:read_addr_from_reg To: brobecker@adacore.com (Joel Brobecker) Date: Thu, 17 Apr 2014 12:18:00 -0000 From: "Ulrich Weigand" Cc: gdb-patches@sourceware.org In-Reply-To: <20140416152935.GU4250@adacore.com> from "Joel Brobecker" at Apr 16, 2014 08:29:35 AM MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-TM-AS-MML: disable X-Content-Scanned: Fidelis XPS MAILER x-cbid: 14041712-3532-0000-0000-0000011E96CA X-SW-Source: 2014-04/txt/msg00363.txt.bz2 Joel Brobecker wrote: > > ChangeLog: > > > > * gdbarch.sh (value_from_register): Make class "m" instead of "f". > > Replace FRAME argument with FRAME_ID. > > * gdbarch.c, gdbarch.h: Regenerate. > > * findvar.c (default_value_from_register): Add GDBARCH argument; > > replace FRAME by FRAME_ID. No longer call get_frame_id. > > (value_from_register): Update call to gdbarch_value_from_register. > > * value.h (default_value_from_register): Update prototype. > > * s390-linux-tdep.c (s390_value_from_register): Update interface > > and call to default_value_from_register. > > * spu-tdep.c (spu_value_from_register): Likewise. > > > > * findvar.c (address_from_register): Remove TYPE argument. > > Do not call value_from_register; use gdbarch_value_from_register > > with null_frame_id instead. > > * value.h (address_from_register): Update prototype. > > * dwarf2-frame.c (read_addr_from_reg): Use address_from_register. > > * dwarf2loc.c (dwarf_expr_read_addr_from_reg): Update for > > address_from_register interface change. > > FWIW, I am not a specialist here, but it seemed reasonable to me. > > It took me a minute or two to figure out that you needed to make > value_from_register a class "m" because you don't have access to > the gdbarch via the frame anymore, so you have to have it passed > directly. Perhaps it's worth a sentence in the revision log when > you commit the patch? > > Thanks for the detailed comment explaining why we use a null_frame_id > in address_from_register, and why it's OK to do so. Very helpful! Thanks for the review! I've checked the patch in now. Bye, Ulrich -- Dr. Ulrich Weigand GNU/Linux compilers and toolchain Ulrich.Weigand@de.ibm.com