diff options
author | Mark Johnston <markj@FreeBSD.org> | 2020-12-11 00:25:34 +0000 |
---|---|---|
committer | Mark Johnston <markj@FreeBSD.org> | 2020-12-11 00:25:34 +0000 |
commit | b0171d7c86f10dbe00d5fe26cdce31fd5f7c613a (patch) | |
tree | 803886bef9c37c262f81f80bd42c8069d5b6c3f8 /sys | |
parent | b8fb788e30a5a2346257bed68e9e1841bf0b900c (diff) | |
download | src-test2-b0171d7c86f10dbe00d5fe26cdce31fd5f7c613a.tar.gz src-test2-b0171d7c86f10dbe00d5fe26cdce31fd5f7c613a.zip |
MFC r368108:
arm: Correctly report the size of FPA registers to GDB
PR: 251022
Notes
Notes:
svn path=/stable/12/; revision=368535
Diffstat (limited to 'sys')
-rw-r--r-- | sys/arm/include/gdb_machdep.h | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/sys/arm/include/gdb_machdep.h b/sys/arm/include/gdb_machdep.h index 9269fae01307..79c74cdd0e1f 100644 --- a/sys/arm/include/gdb_machdep.h +++ b/sys/arm/include/gdb_machdep.h @@ -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 |