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


> Date: Thu, 2 Mar 2006 17:25:43 -0500
> From: Daniel Jacobowitz <drow@false.org>
> 
> 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?

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.

> Now, I could get it from get_current_frame() instead of read_register,
> if you like.

Well, that might be a good idea, because it is somewhat closer to what
would be really correct.  But adding the FIXME is enough to make me
happy, since fixing things properly is clearly too much to ask for,
and this patch really seems to be an improvement.

Mark


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