public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Matthew Gretton-Dann <matthew.gretton-dann@arm.com>
To: Daniel Jacobowitz <dan@codesourcery.com>
Cc: Richard Earnshaw <Richard.Earnshaw@buzzard.freeserve.co.uk>,
	  Kazu Hirata <kazu@codesourcery.com>,
	gdb-patches@sourceware.org,
	  Jonathan Larmour <jifl@eCosCentric.com>
Subject: Re: [patch] Add support for ARMv7M devices.
Date: Tue, 17 Aug 2010 09:00:00 -0000	[thread overview]
Message-ID: <1282035567.4798.39.camel@e102319-lin.cambridge.arm.com> (raw)
In-Reply-To: <20100816180525.GA13106@caradoc.them.org>

Daniel,

In arm_gdbarch_init you have the following:

On Mon, 2010-08-16 at 14:05 -0400, Daniel Jacobowitz wrote:
> +#ifdef HAVE_ELF
> +	      /* Detect M-profile programs.  */
> +	      attr = bfd_elf_get_obj_attr_int (info.abfd, OBJ_ATTR_PROC,
> +					       Tag_CPU_arch);
> +	      /* The lowest value with a meaningful profile is V7; V6-M
> +		 has a higher attribute value.  */
> +	      if (attr >= TAG_CPU_ARCH_V7)
> +		{
> +		  attr = bfd_elf_get_obj_attr_int (info.abfd, OBJ_ATTR_PROC,
> +						   Tag_CPU_arch_profile);
> +		  if (attr == 'M' && ! tdesc_has_registers (tdesc))
> +		    tdesc = tdesc_arm_with_m;
> +		}
> +#endif

Some toolchains do not output Tag_CPU_arch_profile for v6-M or v6S-M (I
think they are taking the viewthat v6-M is before v7 and so
Tag_CPU_arch_profile does not apply).  So this part of the patch will
not pick up images built for v6-M or v6S-M by those toolchains.  

You probably need an explicit test for Tag_CPU_arch being
TAG_CPU_ARCH_V6_M or TAG_CPU_ARCH_V6S_M and if it is then forcing
M-profile at the point (as well as the full test for architecture v7 and
above).

Otherwise it looks good to me.

Thanks,

Matt

-- 
Matthew Gretton-Dann
Principal Engineer - PDSW Tools
ARM Ltd

  reply	other threads:[~2010-08-17  9:00 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-06-09 14:03 Kazu Hirata
2010-06-09 22:29 ` Doug Evans
2010-06-09 23:04 ` Richard Earnshaw
2010-06-24 16:42   ` Daniel Jacobowitz
2010-06-24 20:04     ` Richard Earnshaw
2010-08-16 18:06       ` Daniel Jacobowitz
2010-08-17  9:00         ` Matthew Gretton-Dann [this message]
2010-08-24 15:56           ` Daniel Jacobowitz
2010-10-29 23:47         ` Jonathan Larmour
2010-11-01  3:40           ` Daniel Jacobowitz
2010-11-03  3:21             ` Jonathan Larmour
2010-11-03 13:17               ` Daniel Jacobowitz
2010-11-10  2:21                 ` Jonathan Larmour
2010-06-10  8:56 ` Matthew Gretton-Dann

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=1282035567.4798.39.camel@e102319-lin.cambridge.arm.com \
    --to=matthew.gretton-dann@arm.com \
    --cc=Richard.Earnshaw@buzzard.freeserve.co.uk \
    --cc=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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).