From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24336 invoked by alias); 25 Jun 2012 12:01:19 -0000 Received: (qmail 24306 invoked by uid 22791); 25 Jun 2012 12:01:16 -0000 X-SWARE-Spam-Status: No, hits=-1.5 required=5.0 tests=AWL,BAYES_00,KHOP_RCVD_UNTRUST,MSGID_MULTIPLE_AT,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:00:21 +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:00:16 +0100 Received: from E103079 ([10.1.255.212]) by cam-owa2.Emea.Arm.com with Microsoft SMTPSVC(6.0.3790.3959); Mon, 25 Jun 2012 13:01:00 +0100 From: "Greta Yorsh" To: Cc: "Richard Earnshaw" Subject: [Patch, ARM] Add POP of single register to arm_in_function_epilogue_p Date: Mon, 25 Jun 2012 12:01:00 -0000 Message-ID: <001d01cd52ca$19f65d60$4de31820$@Yorsh@arm.com> MIME-Version: 1.0 X-MC-Unique: 112062513001600401 Content-Type: multipart/mixed; boundary="----=_NextPart_000_001E_01CD52D2.7BBAC560" 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/msg00765.txt.bz2 This is a multi-part message in MIME format. ------=_NextPart_000_001E_01CD52D2.7BBAC560 Content-Type: text/plain; charset=WINDOWS-1252 Content-Transfer-Encoding: quoted-printable Content-length: 956 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 The function arm_in_function_epilogue_p does not recognize POP with a single 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 place) 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 Thanks, Greta ChangeLog gdb/ 2012-06-25 Greta Yorsh * arm-tdep.c (arm_in_function_epilogue_p): Recognize POP with a single register as a stack adjustment in arm mode.= ------=_NextPart_000_001E_01CD52D2.7BBAC560 Content-Type: text/plain; name=gdb-pop-one-reg.patch.txt Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="gdb-pop-one-reg.patch.txt" Content-length: 469 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 if (found_stack_adjust) ------=_NextPart_000_001E_01CD52D2.7BBAC560--