From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1000 invoked by alias); 2 Mar 2006 23:13:10 -0000 Received: (qmail 992 invoked by uid 22791); 2 Mar 2006 23:13:10 -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; Thu, 02 Mar 2006 23:13:09 +0000 Received: from drow by nevyn.them.org with local (Exim 4.54) id 1FEwyk-0005sw-UZ; Thu, 02 Mar 2006 18:13:03 -0500 Date: Thu, 02 Mar 2006 23:23:00 -0000 From: Daniel Jacobowitz To: Mark Kettenis Cc: rearnsha@arm.com, gdb-patches@sourceware.org, sjackman@gmail.com Subject: Re: RFC: Use the ARM CPSR as a fallback to determine ARM/Thumb Message-ID: <20060302231302.GB22458@nevyn.them.org> Mail-Followup-To: Mark Kettenis , rearnsha@arm.com, gdb-patches@sourceware.org, sjackman@gmail.com References: <20060220214918.GA28798@nevyn.them.org> <1140519913.27380.29.camel@pc960.cambridge.arm.com> <20060221153601.GA21183@nevyn.them.org> <20060302221446.GA18830@nevyn.them.org> <200603022222.k22MMQre000048@elgar.sibelius.xs4all.nl> <20060302222543.GA21332@nevyn.them.org> <200603022251.k22Mps0w023981@elgar.sibelius.xs4all.nl> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200603022251.k22Mps0w023981@elgar.sibelius.xs4all.nl> 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: 2006-03/txt/msg00064.txt.bz2 On Thu, Mar 02, 2006 at 11:51:54PM +0100, Mark Kettenis wrote: > > On Thu, Mar 02, 2006 at 11:22:26PM +0100, Mark Kettenis wrote: > > > Hmm, this really should unwind CPSR from the frame I think. A bit > > > impractical to change that now, but something to keep in mind. Could > > > you add a FIXME that points this out if you agree? > > > > But... what frame? Is there a relevant frame? I don't believe that > > there is. This is used for things like breakpoints and explicit "x/i". > > Maybe you see something I don't, though? > > It is possible for thumb code and "normal" code to coexist in a single > address space isn't it? Certainly. > The prologue analyzer seems to use this, so if we're doing a > backtrace, I think it should use the CPSR value for that frame, > instead of whatever the current value for that register is. The CPSR is not saved and restored in the frame. We could pretend that it was, and manually stitch together the T bit from the return address, I suppose - the low bit will already be set in the PC for Thumb so this won't trigger for that case, only for backtracing into an ARM function via Thumb. But I see your point now. I will take another look at this later, to see if I can get it righter. -- Daniel Jacobowitz CodeSourcery