svn commit: r368108 - head/sys/arm/include
Mark Johnston
markj at FreeBSD.org
Fri Nov 27 16:35:44 UTC 2020
Author: markj
Date: Fri Nov 27 16:35:43 2020
New Revision: 368108
URL: https://svnweb.freebsd.org/changeset/base/368108
Log:
arm: Correctly report the size of FPA registers to GDB
Modern ARM systems do not have an FPA unit but GDB reserves register
indices for FPA registers and expects the stub to know their sizes.
PR: 251022
Submitted by: Dmitry Salychev <dsl at mcusim.org>
MFC after: 2 weeks
Modified:
head/sys/arm/include/gdb_machdep.h
Modified: head/sys/arm/include/gdb_machdep.h
==============================================================================
--- head/sys/arm/include/gdb_machdep.h Fri Nov 27 16:29:54 2020 (r368107)
+++ head/sys/arm/include/gdb_machdep.h Fri Nov 27 16:35:43 2020 (r368108)
@@ -36,9 +36,13 @@
#define GDB_REG_PC 15
static __inline size_t
-gdb_cpu_regsz(int regnum __unused)
+gdb_cpu_regsz(int regnum)
{
- return (sizeof(int));
+ /*
+ * GDB expects the FPA registers f0-f7, each 96 bits wide, to be placed
+ * in between the PC and CSPR in response to a "g" packet.
+ */
+ return (regnum >= 16 && regnum <= 23 ? 12 : sizeof(int));
}
static __inline int
More information about the svn-src-all
mailing list