This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: RFC: Use the ARM CPSR as a fallback to determine ARM/Thumb


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]