public inbox for gdb-cvs@sourceware.org
help / color / mirror / Atom feed
From: Tiezhu Yang <yangtiezhu@sourceware.org>
To: gdb-cvs@sourceware.org
Subject: [binutils-gdb] gdb: LoongArch: Define LOONGARCH_LINUX_NUM_GREGSET as 45
Date: Tue, 24 May 2022 14:06:05 +0000 (GMT)	[thread overview]
Message-ID: <20220524140605.44A053857340@sourceware.org> (raw)

https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=387e00f3b3e6ea3719f144d7090c1a242174be4d

commit 387e00f3b3e6ea3719f144d7090c1a242174be4d
Author: Tiezhu Yang <yangtiezhu@loongson.cn>
Date:   Tue May 24 17:46:26 2022 +0800

    gdb: LoongArch: Define LOONGARCH_LINUX_NUM_GREGSET as 45
    
    LOONGARCH_LINUX_NUM_GREGSET should be defined as 45 (32 + 1 + 1 + 11)
    due to reserved 11 for extension in glibc, otherwise when execute:
    
      make check-gdb TESTS="gdb.base/corefile.exp"
    
    there exists the following failed testcase:
    
      (gdb) core-file /home/loongson/build.git/gdb/testsuite/outputs/gdb.base/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/libc.so.6
      (gdb) FAIL: gdb.base/corefile.exp: core-file warning-free
    
    Signed-off-by: Tiezhu Yang <yangtiezhu@loongson.cn>

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"
 
 /* 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.  */
 
-#define LOONGARCH_LINUX_NUM_GREGSET	(34)
+#define LOONGARCH_LINUX_NUM_GREGSET	(45)
 
 /* Unpack an elf_gregset_t into GDB's register cache.  */


                 reply	other threads:[~2022-05-24 14:06 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220524140605.44A053857340@sourceware.org \
    --to=yangtiezhu@sourceware.org \
    --cc=gdb-cvs@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).