Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Daniel Jacobowitz <dan@codesourcery.com>
To: Jonathan Larmour <jifl@eCosCentric.com>
Cc: gdb-patches@sourceware.org, Kazu Hirata <kazu@codesourcery.com>
Subject: Re: Cortex-M CPSR thumb bit fix
Date: Thu, 08 Jul 2010 21:37:00 -0000	[thread overview]
Message-ID: <20100708213711.GA6577@caradoc.them.org> (raw)
In-Reply-To: <4C362657.9040001@eCosCentric.com>

On Thu, Jul 08, 2010 at 08:26:15PM +0100, Jonathan Larmour wrote:
> I posted a patch in 2008 here:
> http://sourceware.org/ml/gdb-patches/2008-10/msg00462.html but
> unfortunately it wasn't applied. Without it, GDB cannot debug Cortex-M
> processors as the thumb bit is in a different place in the CPSR register.
> 
> I have updated it for GDB 7.1, as per the attached mail and updated
> ChangeLog below.

Please compare with:

  http://sourceware.org/ml/gdb-patches/2010-06/msg00229.html

Kazu has been busy with another project, but I think he'll be back to
that patch pretty soon.  What I'd like, ideally, is a combination of his
patch with yours; you have the bits to auto-probe from the binary, and
he has the ones that let the target specify.  Both are useful.

I see that since I wrote the first version of this patch, we've
started testing CPSR_T in more places :-(  Thanks for finding the
extras.

I would prefer not to call it the "M-profile CPSR"; it's not called
CPSR in the architecture documentation.  It's the XPSR.

> +              /* Cortex-M has different CPSR layout. Use object tags to determine
> +               * if this was generated for the Microcontroller (M) profile.
> +               * Cortex-A has a CPSR like previous ARM cores.
> +               * Cortex-R is unknown.
> +               */

ARM v7-R has a CPSR, just like ARM v7-A and other non-microcontroller
profile devices.

I didn't look too closely at the code, except to observe that you
didn't follow the GNU coding standards, in spacing or formatting; I'd
appreciate it if you could fix that.  Let me know if you want specific
pointers.

Jonathan, Kazu, anyone have a preference on producing a combined patch?

-- 
Daniel Jacobowitz
CodeSourcery


  reply	other threads:[~2010-07-08 21:37 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-07-08 19:26 Jonathan Larmour
2010-07-08 21:37 ` Daniel Jacobowitz [this message]
2010-07-09  3:43   ` Jonathan Larmour
2010-07-09  3:51     ` Daniel Jacobowitz

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20100708213711.GA6577@caradoc.them.org \
    --to=dan@codesourcery.com \
    --cc=gdb-patches@sourceware.org \
    --cc=jifl@eCosCentric.com \
    --cc=kazu@codesourcery.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox