From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Received: (qmail 3745 invoked from network); 19 Mar 2004 00:10:01 -0000 Received: from unknown (HELO localhost.redhat.com) (66.30.197.194) by sources.redhat.com with SMTP; 19 Mar 2004 00:10:01 -0000 Received: from gnu.org (localhost [127.0.0.1]) by localhost.redhat.com (Postfix) with ESMTP id 3CAAF2BA1; Thu, 18 Mar 2004 15:35:28 -0500 (EST) Message-ID: <405A0810.90409@gnu.org> Date: Fri, 19 Mar 2004 00:10:00 -0000 From: Andrew Cagney User-Agent: Mozilla/5.0 (X11; U; NetBSD macppc; en-GB; rv:1.4.1) Gecko/20040217 MIME-Version: 1.0 To: Kevin Buettner Cc: gdb-patches@sources.redhat.com Subject: Re: [rfa/ppc] prologue parser tweaks References: <40577FA6.5080506@gnu.org> <20040318091532.63ae9d21@saguaro> In-Reply-To: <20040318091532.63ae9d21@saguaro> Content-Type: multipart/mixed; boundary="------------080904030805000700030801" X-SW-Source: 2004-03/txt/msg00442.txt.bz2 This is a multi-part message in MIME format. --------------080904030805000700030801 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Content-length: 891 >>> + >>> + if ((op & 0xfc1fffff) == 0x7c0802a6) >>> + { /* mflr Rx */ >>> + /* Since shared library / PIC code, which needs to get its >>> + address at runtime, can appear to save more than one link >>> + register vis: >>> + >>> + *INDENT-OFF* >>> + stwu r1,-304(r1) >>> + mflr r3 >>> + bl 0xff570d0 (blrl) >>> + stw r30,296(r1) >>> + mflr r30 >>> + stw r31,300(r1) >>> + stw r3,308(r1); >>> + ... >>> + *INDENT-ON* >>> + >>> + remember just the first one, but skip over additional >>> + ones. */ >>> + if (lr_reg < 0) >>> + lr_reg = (op & 0x03e00000); >>> + continue; >>> + } >>> >>> if ((op & 0xfc1fffff) == 0x7c0802a6) >>> { /* mflr Rx */ > > > The above is okay so long as you remove the old "mflr Rx" test. I've checked this part in, I'll follow up the other part later. Andrew --------------080904030805000700030801 Content-Type: text/plain; name="diffs" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="diffs" Content-length: 1104 2004-03-18 Andrew Cagney * rs6000-tdep.c (skip_prologue): Record only the first LR save. Index: rs6000-tdep.c =================================================================== RCS file: /cvs/src/src/gdb/rs6000-tdep.c,v retrieving revision 1.184 diff -u -r1.184 rs6000-tdep.c --- rs6000-tdep.c 15 Mar 2004 21:21:01 -0000 1.184 +++ rs6000-tdep.c 18 Mar 2004 20:14:38 -0000 @@ -551,9 +551,26 @@ if ((op & 0xfc1fffff) == 0x7c0802a6) { /* mflr Rx */ - lr_reg = (op & 0x03e00000); - continue; + /* Since shared library / PIC code, which needs to get its + address at runtime, can appear to save more than one link + register vis: + + *INDENT-OFF* + stwu r1,-304(r1) + mflr r3 + bl 0xff570d0 (blrl) + stw r30,296(r1) + mflr r30 + stw r31,300(r1) + stw r3,308(r1); + ... + *INDENT-ON* + remember just the first one, but skip over additional + ones. */ + if (lr_reg < 0) + lr_reg = (op & 0x03e00000); + continue; } else if ((op & 0xfc1fffff) == 0x7c000026) { /* mfcr Rx */ --------------080904030805000700030801--