Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Yao Qi <qiyaoltc@gmail.com>
To: Christopher Friedt <chrisfriedt@gmail.com>
Cc: gdb-patches@sourceware.org
Subject: Re: cortex-m xml register descriptions for m-system
Date: Tue, 15 Dec 2015 08:55:00 -0000	[thread overview]
Message-ID: <86vb80nlac.fsf@gmail.com> (raw)
In-Reply-To: <CAF4BF-RuPwFWfDa2Sp7MzYjF8bo1K3xb=jMThSpK4T7gTe+whQ@mail.gmail.com>	(Christopher Friedt's message of "Mon, 14 Dec 2015 12:04:57 -0500")

Christopher Friedt <chrisfriedt@gmail.com> writes:

> The first question I would ask for clarification from the binutils-gdb
> developers, is, which regnum is appropriate to assign to each of those
> m-system registers? Should these registers enumerate starting with 26
> (resuming from the xpsr)?
>
> Just for comparison, the current binutils-gdb arm-m-profile.xml is
> here (https://goo.gl/hpTye8), and the openocd variant is here
> (http://goo.gl/FFn56X).

The number doesn't matter, but the name does.  In the target
descriptions from openocd, the register is named as "xPSR" in
standard feature org.gnu.gdb.arm.m-profile.

 { ARMV7M_xPSR, "xPSR", 32, REG_TYPE_INT, "general", "org.gnu.gdb.arm.m-profile" },

however, in gdb/arm-tdep.c, gdb expects "xpsr"

      if (is_m)
	valid_p &= tdesc_numbered_register (feature, tdesc_data,
					    ARM_PS_REGNUM, "xpsr");
      else
	valid_p &= tdesc_numbered_register (feature, tdesc_data,
					    ARM_PS_REGNUM, "cpsr");

so I suspect that GDB won't accept the org.gnu.gdb.arm.m-profile feature
from openocd.

-- 
Yao (齐尧)


  parent reply	other threads:[~2015-12-15  8:55 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-12-14 17:05 Christopher Friedt
2015-12-14 18:55 ` Pedro Alves
2015-12-14 23:11   ` Christopher Friedt
2015-12-15  0:13     ` Pedro Alves
2015-12-15 15:35       ` Christopher Friedt
2015-12-16 13:51         ` Tristan Gingold
2015-12-16 17:13           ` Christopher Friedt
2015-12-17  8:32             ` Tristan Gingold
2018-08-14 18:14               ` Christopher Friedt
2015-12-15 11:44     ` Tristan Gingold
2015-12-15 11:59       ` Pedro Alves
2015-12-15 12:11       ` Pedro Alves
2015-12-15 12:13         ` Pedro Alves
2015-12-15  8:55 ` Yao Qi [this message]
2015-12-15 10:25   ` Pedro Alves
2015-12-15 10:32     ` Pedro Alves
2015-12-16  9:49     ` Yao Qi
2015-12-15  9:13 ` Yao Qi
2015-12-15 12:20   ` Christopher Friedt
2015-12-15 15:09     ` Christopher Friedt

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=86vb80nlac.fsf@gmail.com \
    --to=qiyaoltc@gmail.com \
    --cc=chrisfriedt@gmail.com \
    --cc=gdb-patches@sourceware.org \
    /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