public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Jonathan Larmour <jifl@eCosCentric.com>
To: gdb-patches@sourceware.org
Cc: Richard Earnshaw <Richard.Earnshaw@buzzard.freeserve.co.uk>,
	 Kazu Hirata <kazu@codesourcery.com>
Subject: Re: [patch] Add support for ARMv7M devices.
Date: Fri, 29 Oct 2010 23:47:00 -0000	[thread overview]
Message-ID: <4CCB5CED.4030109@eCosCentric.com> (raw)
In-Reply-To: <20100816180525.GA13106@caradoc.them.org>

On 16/08/10 19:05, Daniel Jacobowitz wrote:
> On Thu, Jun 24, 2010 at 09:03:52PM +0100, Richard Earnshaw wrote:
>> I'd suggest
>>
>> org.gnu.gdb.arm.m-profile
> 
> Here's a version addressing comments from Richard, Matthew, and Doug,
> and also incorporating Jonathan Larmour's changes.
> 
> I've moved the is_m check lower in arm_pc_is_thumb, to make "set arm
> force-mode" continue to do something sensible; you could arguably push
> it further down, but this is at least an improvement.
> 
> Tested on ARM EABI and by hand; any comments?

Sorry that it's taken me until now to try out this patch. I also see it's
checked in to CVS which is fair enough.

> Jonathan, how's this
> work for you?  If your target does not give GDB any registers, then
> this ought to just switch an M-profile binary over to the xpsr.  If
> your debug stub previously sends a bogus "cpsr", then it's hard to say
> what will happen.

I'm not quite sure what you mean by this since the xpsr and cpsr are given
the same register number so I thought that what happens at the remote
protocol level would be the same?

> I wouldn't be surprised at an error - any target
> which does that, probably also supplies the FPA registers.

Indeed it does. And that makes GDB unhappy, claiming the response to the
$g packet is too long.

>  If it's
> really necessary, we can try to auto-detect that case in the remote
> protocol, but really this is what the XML register descriptions are
> for.

It does create a problem for me at least because we have existing GDB
stubs implementations programmed into flash on Cortex-M targets (it's hard
to do anything else but program into flash with these small chips). So CVS
GDB (and presumably GDB 7.3+) will no longer work with these targets. If
we change the register layout to avoid the FPA registers in the future,
then GDB <= 7.2 won't work, although for that scenario there is at least
the possibility of implementing the XML.

But I can't do anything about the existing stubs out there, other than get
users to reflash their targets which isn't great, or just not use GDB
>7.2. The existing GDB debug stubs don't return any XML target
description, so we can't go back and add that obviously. So there is a
backward compatibility issue.

I also wonder about any JTAG debuggers which support Cortex-M (e.g.
Ronetix PEEDI). Do they return XML data? I haven't actually tried it with
Cortex-M, but looking at a GDB protocol trace with the PEEDI on a
different ARM target, no XML info is provided. If that's also true for
Cortex-M (which seems likely) then these JTAG debuggers will also stop
working. That would probably adversely affect a lot more people than just
the developers using the eCos GDB stubs.

So I think an alternative may be needed. Either the auto-detection you
refer to (although I smell layering violation), or perhaps a 'set' command.

Jifl

  parent reply	other threads:[~2010-10-29 23:47 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
2010-08-24 15:56           ` Daniel Jacobowitz
2010-10-29 23:47         ` Jonathan Larmour [this message]
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=4CCB5CED.4030109@eCosCentric.com \
    --to=jifl@ecoscentric.com \
    --cc=Richard.Earnshaw@buzzard.freeserve.co.uk \
    --cc=gdb-patches@sourceware.org \
    --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).