Author: markj
Date: Fri Dec 11 00:25:34 2020
New Revision: 368535
URL: https://svnweb.freebsd.org/changeset/base/368535

Log:
  MFC r368108:
  arm: Correctly report the size of FPA registers to GDB
  
  PR:   251022

Modified:
  stable/12/sys/arm/include/gdb_machdep.h
Directory Properties:
  stable/12/   (props changed)

Modified: stable/12/sys/arm/include/gdb_machdep.h
==============================================================================
--- stable/12/sys/arm/include/gdb_machdep.h     Fri Dec 11 00:20:04 2020        
(r368534)
+++ stable/12/sys/arm/include/gdb_machdep.h     Fri Dec 11 00:25:34 2020        
(r368535)
@@ -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
_______________________________________________
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Reply via email to