From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 7873) id 44A053857340; Tue, 24 May 2022 14:06:05 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 44A053857340 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable From: Tiezhu Yang To: gdb-cvs@sourceware.org Subject: [binutils-gdb] gdb: LoongArch: Define LOONGARCH_LINUX_NUM_GREGSET as 45 X-Act-Checkin: binutils-gdb X-Git-Author: Tiezhu Yang X-Git-Refname: refs/heads/master X-Git-Oldrev: 81657e580045026b3a79f3a8db6fac5e7e5dad66 X-Git-Newrev: 387e00f3b3e6ea3719f144d7090c1a242174be4d Message-Id: <20220524140605.44A053857340@sourceware.org> Date: Tue, 24 May 2022 14:06:05 +0000 (GMT) X-BeenThere: gdb-cvs@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-cvs mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 May 2022 14:06:05 -0000 https://sourceware.org/git/gitweb.cgi?p=3Dbinutils-gdb.git;h=3D387e00f3b3e6= ea3719f144d7090c1a242174be4d commit 387e00f3b3e6ea3719f144d7090c1a242174be4d Author: Tiezhu Yang Date: Tue May 24 17:46:26 2022 +0800 gdb: LoongArch: Define LOONGARCH_LINUX_NUM_GREGSET as 45 =20 LOONGARCH_LINUX_NUM_GREGSET should be defined as 45 (32 + 1 + 1 + 11) due to reserved 11 for extension in glibc, otherwise when execute: =20 make check-gdb TESTS=3D"gdb.base/corefile.exp" =20 there exists the following failed testcase: =20 (gdb) core-file /home/loongson/build.git/gdb/testsuite/outputs/gdb.ba= se/corefile/corefile.core [New LWP 7742] warning: Unexpected size of section `.reg/7742' in core file. Core was generated by `/home/loongson/build.git/gdb/testsuite/outputs= /gdb.base/corefile/corefile'. Program terminated with signal SIGABRT, Aborted. warning: Unexpected size of section `.reg/7742' in core file. #0 0x000000fff76f4e24 in raise () from /lib/loongarch64-linux-gnu/li= bc.so.6 (gdb) FAIL: gdb.base/corefile.exp: core-file warning-free =20 Signed-off-by: Tiezhu Yang Diff: --- gdb/loongarch-linux-tdep.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gdb/loongarch-linux-tdep.c b/gdb/loongarch-linux-tdep.c index bbb43abe13f..f6854298569 100644 --- a/gdb/loongarch-linux-tdep.c +++ b/gdb/loongarch-linux-tdep.c @@ -30,9 +30,9 @@ #include "tramp-frame.h" =20 /* The general-purpose regset consists of 32 R registers, plus PC, - and BADV registers. */ + and BADV registers. In addition, reserved 11 for extension in glibc. = */ =20 -#define LOONGARCH_LINUX_NUM_GREGSET (34) +#define LOONGARCH_LINUX_NUM_GREGSET (45) =20 /* Unpack an elf_gregset_t into GDB's register cache. */