From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21195 invoked by alias); 17 Apr 2013 14:37:49 -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 21184 invoked by uid 89); 17 Apr 2013 14:37:49 -0000 X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=AWL,BAYES_00,RCVD_IN_HOSTKARMA_NO,TW_EG autolearn=ham version=3.3.1 Received: from rock.gnat.com (HELO rock.gnat.com) (205.232.38.15) by sourceware.org (qpsmtpd/0.84/v0.84-167-ge50287c) with ESMTP; Wed, 17 Apr 2013 14:37:48 +0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by filtered-rock.gnat.com (Postfix) with ESMTP id 4586D2EAE4; Wed, 17 Apr 2013 10:37:47 -0400 (EDT) Received: from rock.gnat.com ([127.0.0.1]) by localhost (rock.gnat.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id wfZlEPmBoxe5; Wed, 17 Apr 2013 10:37:47 -0400 (EDT) Received: from joel.gnat.com (localhost.localdomain [127.0.0.1]) by rock.gnat.com (Postfix) with ESMTP id 0D7BE2E5AF; Wed, 17 Apr 2013 10:37:47 -0400 (EDT) Received: by joel.gnat.com (Postfix, from userid 1000) id 19BC0C26C0; Wed, 17 Apr 2013 07:37:45 -0700 (PDT) Date: Wed, 17 Apr 2013 17:08:00 -0000 From: Joel Brobecker To: Yufeng Zhang Cc: Marcus Shawcroft , "gdb-patches@sourceware.org" Subject: Re: unnecessary aarch64_write_pc ? Message-ID: <20130417143744.GG3525@adacore.com> References: <20130415125021.GB3525@adacore.com> <516EB29D.2030409@arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <516EB29D.2030409@arm.com> User-Agent: Mutt/1.5.21 (2010-09-15) X-SW-Source: 2013-04/txt/msg00533.txt.bz2 > Thanks for the heads up; yes, aarch64_write_pc doesn't appear > necessary. I've prepared the attached patch to remove the function. Awesome, thanks for confirming. The patch is approved if you throw in a ChangeLog entry :). > diff --git a/gdb/aarch64-tdep.c b/gdb/aarch64-tdep.c > index ebc78d6..2b03106 100644 > --- a/gdb/aarch64-tdep.c > +++ b/gdb/aarch64-tdep.c > @@ -2499,14 +2499,6 @@ aarch64_pseudo_write (struct gdbarch *gdbarch, struct regcache *regcache, > gdb_assert_not_reached ("regnum out of bound"); > } > > -/* Implement the "write_pc" gdbarch method. */ > - > -static void > -aarch64_write_pc (struct regcache *regcache, CORE_ADDR pc) > -{ > - regcache_cooked_write_unsigned (regcache, AARCH64_PC_REGNUM, pc); > -} > - > /* Callback function for user_reg_add. */ > > static struct value * > @@ -2618,8 +2610,6 @@ aarch64_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) > set_gdbarch_push_dummy_call (gdbarch, aarch64_push_dummy_call); > set_gdbarch_frame_align (gdbarch, aarch64_frame_align); > > - set_gdbarch_write_pc (gdbarch, aarch64_write_pc); > - > /* Frame handling. */ > set_gdbarch_dummy_id (gdbarch, aarch64_dummy_id); > set_gdbarch_unwind_pc (gdbarch, aarch64_unwind_pc); -- Joel