From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12532 invoked by alias); 3 Dec 2005 04:53:54 -0000 Received: (qmail 12525 invoked by uid 22791); 3 Dec 2005 04:53:54 -0000 X-Spam-Check-By: sourceware.org Received: from nevyn.them.org (HELO nevyn.them.org) (66.93.172.17) by sourceware.org (qpsmtpd/0.31.1) with ESMTP; Sat, 03 Dec 2005 04:53:53 +0000 Received: from drow by nevyn.them.org with local (Exim 4.54) id 1EiPPB-0006Rc-9O; Fri, 02 Dec 2005 23:53:49 -0500 Date: Sun, 04 Dec 2005 21:16:00 -0000 From: Daniel Jacobowitz To: Jim Blandy Cc: pgilliam@us.ibm.com, gdb-patches@sourceware.org Subject: Re: [PATCH] add 'rs6000_in_function_epilogue_p()' Message-ID: <20051203045349.GA24721@nevyn.them.org> Mail-Followup-To: Jim Blandy , pgilliam@us.ibm.com, gdb-patches@sourceware.org References: <200511301225.56802.pgilliam@us.ibm.com> <8f2776cb0512011707p120df411w3a685c453d4ec625@mail.gmail.com> <20051202011703.GA27515@nevyn.them.org> <200512021146.54036.pgilliam@us.ibm.com> <8f2776cb0512021419w5af03946je07634a4400417fd@mail.gmail.com> <20051203030533.GA23195@nevyn.them.org> <8f2776cb0512022020i655a67c1td120a61ed5f4154e@mail.gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <8f2776cb0512022020i655a67c1td120a61ed5f4154e@mail.gmail.com> User-Agent: Mutt/1.5.8i X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2005-12/txt/msg00083.txt.bz2 On Fri, Dec 02, 2005 at 08:20:48PM -0800, Jim Blandy wrote: > But we can do a bit better than that. If skip_prologue were sure that > lim_pc represents a real PC value (its callers know), and scanning > from the entry point wasn't able to reach lim_pc, and lim_pc points > directly at a return instruction, then we *know* that the current SP > is our CFA. And if you actually understand all the instructions > between lim_pc and the return instruction, then you may again be able > to derive the CFA. This information can be used in preference to that > obtained with the from-entry-point scan. Fascinating. So, do both prologue and epilogue recognition. It would be useful for backtraces in epilogues, but not for much else, and it would be a lot of work, so I have trouble seeing this get implemented. But, maybe. Of course this is only useful without CFI and the main reason PPC doesn't use CFI has been solved. And the problem is likely to reoccur with CFI that doesn't describe the epilogue, which today is prevalent. -- Daniel Jacobowitz CodeSourcery, LLC