[review] Document m68k floating point feature correspondence

Tom Tromey (Code Review) gerrit@gnutoolchain-gerrit.osci.io
Thu Oct 24 16:36:00 GMT 2019


Change URL: https://gnutoolchain-gerrit.osci.io/r/c/binutils-gdb/+/281
......................................................................

Document m68k floating point feature correspondence

>From what I can tell, The m68k floating point target feature should
apparently always be called "org.gnu.gdb.coldfire.fp" -- even when the
primary feature is not "coldfire", because m68k_gdbarch_init only
checks for this feature when assigning register numbers.

However, the floating point registers are expected to match what gdb
thinks are the register sizes for the primary feature.  For example,
if the main feature is "coldfire", then the floating point registers
should be 64 bits.

See this note for some an instance of this confusion:

    https://lists.gnu.org/archive/html/qemu-devel/2017-06/msg04564.html

This patch documents the oddity.

Let me know what you think.  An alternate approach here might be to
make gdb adapt to the register sizes as actually reported.  I'm not
sure if this makes sense or not.

gdb/doc/ChangeLog
2019-10-24  Tom Tromey  <tromey@adacore.com>

	* gdb.texinfo (M68K Features): Document floating-point feature
	correspondence.

Change-Id: I4cd86acbe3449a29ce38327524c508c206b25b8f
---
M gdb/doc/ChangeLog
M gdb/doc/gdb.texinfo
2 files changed, 11 insertions(+), 0 deletions(-)



diff --git a/gdb/doc/ChangeLog b/gdb/doc/ChangeLog
index 0d0d905..2b80699 100644
--- a/gdb/doc/ChangeLog
+++ b/gdb/doc/ChangeLog
@@ -1,3 +1,8 @@
+2019-10-24  Tom Tromey  <tromey@adacore.com>
+
+	* gdb.texinfo (M68K Features): Document floating-point feature
+	correspondence.
+
 2019-10-23  Tom Tromey  <tom@tromey.com>
 
 	* Makefile.in (READLINE_DIR): Update.
diff --git a/gdb/doc/gdb.texinfo b/gdb/doc/gdb.texinfo
index 1208e4f..1fbf349 100644
--- a/gdb/doc/gdb.texinfo
+++ b/gdb/doc/gdb.texinfo
@@ -44346,6 +44346,12 @@
 This feature is optional.  If present, it should contain registers
 @samp{fp0} through @samp{fp7}, @samp{fpcontrol}, @samp{fpstatus} and
 @samp{fpiaddr}.
+
+Note that, despite the fact that this feature's name says
+@samp{coldfire}, it is used to describe any floating point registers.
+The size of the registers must match the main m68k flavor; so, for
+example, if the primary feature is reported as @samp{coldfire}, then
+64-bit floating point registers are required.
 @end table
 
 @node NDS32 Features

-- 
Gerrit-Project: binutils-gdb
Gerrit-Branch: master
Gerrit-Change-Id: I4cd86acbe3449a29ce38327524c508c206b25b8f
Gerrit-Change-Number: 281
Gerrit-PatchSet: 1
Gerrit-Owner: Tom Tromey <tromey@sourceware.org>
Gerrit-MessageType: newchange



More information about the Gdb-patches mailing list