From 0d3c36672045725236341529f087391470f65e87 Mon Sep 17 00:00:00 2001 From: Jiangshuai Li Date: Mon, 8 Aug 2022 11:15:30 +0800 Subject: gdb/csky support .reg2 for kernel 4.x and later When kernel's version >= 4.x, the size of .reg2 section will be 400. Contents of .reg2 are { unsigned long vr[96]; unsigned long fcr; unsigned long fesr; unsigned long fid; unsigned long reserved; }; VR[96] means: (vr0~vr15) + (fr16~fr31), each Vector register is 128-bits, each Float register is 64 bits, the total size is (4*96). In addition, for fr0~fr15, each FRx is the lower 64 bits of the corresponding VRx. So fr0~fr15 and vr0~vr15 regisetrs use the same offset. --- gdb/csky-tdep.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'gdb/csky-tdep.h') diff --git a/gdb/csky-tdep.h b/gdb/csky-tdep.h index 54000ab..3ee50fc 100644 --- a/gdb/csky-tdep.h +++ b/gdb/csky-tdep.h @@ -93,6 +93,9 @@ enum csky_regnum CSKY_PSR_REGNUM = CSKY_CR0_REGNUM, CSKY_MAX_REGISTER_SIZE = 16, + + /* Actually, the max regs number should be 1187. But if the + gdb stub does not send a tdesc-xml file to gdb, 253 works. */ CSKY_MAX_REGS = 253 }; -- cgit v1.1