This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [patch] Add support for VFP d16 layout for Cortex-M4
- From: Pedro Alves <palves at redhat dot com>
- To: Jonathan Larmour <jifl at eCosCentric dot com>
- Cc: gdb-patches at sourceware dot org, Ilija Kocho <ilijak at siva dot com dot mk>, Terry Guo <terry dot guo at arm dot com>, Pedro Alves <palves at redhat dot com>
- Date: Fri, 20 Apr 2012 13:40:27 +0100
- Subject: Re: [patch] Add support for VFP d16 layout for Cortex-M4
- References: <4F902B4E.9070704@eCosCentric.com>
On 04/19/2012 04:12 PM, Jonathan Larmour wrote:
> As mentioned in my response to the GDB list mail
> <http://sourceware.org/ml/gdb/2012-04/msg00149.html>, I have a patch to
> allow easy automatic use of Cortex-M targets with a register layout with
> 16 double precision / 32 single precision regs. This is as used in the
> increasingly popular Cortex-M4 core.
>
> I have chosen to use the remote packet guessing approach again, rather
> than inferring from the executable's ELF header, because not everyone will
> actually want to use hardware FP just because they're using that core, so
> what the stub actually supports is a better indicator of what is wanted.
I'd like to make it clear that the guesses mechanism is a just a fallback
mechanism, useful when its too late to change the stubs out there to
send the xml description to gdb themselves. It's not the ideal way forward,
and it can't scale beyond a few guesses. The right thing is for
the stubs themselves to report the xml descriptions to GDB (with qXfer:features:read),
not to have them depend on GDB being able to guess it.
Cortex-M4 stubs can already send a xml description equivalent to this new
description to gdb today (without this patch), and things will work equally well,
since the xml description can be (as yours is) simply built using the
org.gnu.gdb.arm.m-profile and org.gnu.gdb.arm.vfp standard description
features.
Is it too late change the stubs that triggered this need to have them
send a xml description? Despite this patch going in, that's the right
right to do.
That said, I'm no ARM expert, but I don't see anything wrong with the patch.
And having the xml file in the tree that stubs can copy freely is always good.
> +/* Say how long VFP double precision registers are. Used for documentation
^
Double space after full stop, please.
> + purposes and code readability. These are fixed at 64 bits. */
^
Ditto.
--
Pedro Alves