From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 30878 invoked by alias); 25 Jun 2012 12:16:27 -0000 Received: (qmail 30861 invoked by uid 22791); 25 Jun 2012 12:16:23 -0000 X-SWARE-Spam-Status: No, hits=-1.6 required=5.0 tests=AWL,BAYES_00,KHOP_RCVD_UNTRUST,KHOP_THREADED,RCVD_IN_DNSWL_LOW,RCVD_IN_HOSTKARMA_NO X-Spam-Check-By: sourceware.org Received: from service87.mimecast.com (HELO service87.mimecast.com) (91.220.42.44) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 25 Jun 2012 12:15:46 +0000 Received: from cam-owa2.Emea.Arm.com (fw-tnat.cambridge.arm.com [217.140.96.21]) by service87.mimecast.com; Mon, 25 Jun 2012 13:15:44 +0100 Received: from [10.1.69.67] ([10.1.255.212]) by cam-owa2.Emea.Arm.com with Microsoft SMTPSVC(6.0.3790.3959); Mon, 25 Jun 2012 13:16:30 +0100 Message-ID: <4FE8566E.6090001@arm.com> Date: Mon, 25 Jun 2012 12:16:00 -0000 From: Richard Earnshaw User-Agent: Mozilla/5.0 (X11; Linux i686 on x86_64; rv:13.0) Gecko/20120614 Thunderbird/13.0.1 MIME-Version: 1.0 To: Greta Yorsh CC: "gdb-patches@sourceware.org" Subject: Re: [Patch, ARM] Add POP of single register to arm_in_function_epilogue_p References: <001d01cd52ca$19f65d60$4de31820$@Yorsh@arm.com> In-Reply-To: <001d01cd52ca$19f65d60$4de31820$@Yorsh@arm.com> X-MC-Unique: 112062513154404701 Content-Type: text/plain; charset=WINDOWS-1252 Content-Transfer-Encoding: quoted-printable X-IsSubscribed: yes 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 X-SW-Source: 2012-06/txt/msg00766.txt.bz2 On 25/06/12 13:00, Greta Yorsh wrote: > This patch is related to a recent change in the way gcc generates function > epilogues for arm targets (since gcc trunk r188745): > http://gcc.gnu.org/ml/gcc-patches/2012-05/msg02071.html >=20 > The function arm_in_function_epilogue_p does not recognize POP with a sin= gle > register as a stack adjustment in arm mode.=20 > It causes two test new failures in gdb testsuite: > FAIL: gdb.base/watch-cond.exp: watchpoint with local expression, local > condition evaluates in correct frame > FAIL: gdb.mi/mi2-watch.exp: hw: watchpoint trigger (stopped at wrong plac= e) >=20 > The reason is that in arm mode the encoding of POP with single register is > different from the encoding of POP with multiple registers. The attached > patch adds the missing pattern to arm_in_function_epilogue_p.=20 >=20 > Thanks, > Greta >=20 > ChangeLog >=20 > gdb/ >=20 > 2012-06-25 Greta Yorsh >=20 > * arm-tdep.c (arm_in_function_epilogue_p): Recognize POP > with a single register as a stack adjustment in arm mode. >=20 >=20 > gdb-pop-one-reg.patch.txt >=20 >=20 > diff --git a/gdb/arm-tdep.c b/gdb/arm-tdep.c > index df5dea7..568ace5 100644 > --- a/gdb/arm-tdep.c > +++ b/gdb/arm-tdep.c > @@ -3217,6 +3217,9 @@ arm_in_function_epilogue_p (struct gdbarch *gdbarch= , CORE_ADDR pc) > else if ((insn & 0x0fff0000) =3D=3D 0x08bd0000) > /* POP (LDMIA). */ > found_stack_adjust =3D 1; > + else if ((insn & 0x0fff0000) =3D=3D 0x049d0000) > + /* POP of a single register. */ > + found_stack_adjust =3D 1; > } >=20=20 > if (found_stack_adjust) >=20 OK. R.