public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: "Moritz Strübe" <moritz.struebe@siemens-energy.com>
To: gdb-patches@sourceware.org
Cc: "Moritz Strübe" <moritz.struebe@siemens-energy.com>
Subject: [PATCH 1/2] Nios2, libbfd: Support new coredump .reg section
Date: Fri, 19 Apr 2024 12:39:21 +0200	[thread overview]
Message-ID: <fm-32642-202404191039259a5b01c9539d209231-2oN7gY@errorhandling.siemens-energy.com> (raw)
In-Reply-To: <20240419103922.3621961-1-moritz.struebe@siemens-energy.com>

The coredumps of the current kernel are larger.
---
 bfd/elf32-nios2.c | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/bfd/elf32-nios2.c b/bfd/elf32-nios2.c
index 806ec314c82..3d0fa6fbf27 100644
--- a/bfd/elf32-nios2.c
+++ b/bfd/elf32-nios2.c
@@ -1921,7 +1921,18 @@ nios2_grok_prstatus (bfd *abfd, Elf_Internal_Note *note)
     {
     default:
       return false;
+    case 272:  /* Linux/Nios II */
+      /* pr_cursig */
+      elf_tdata (abfd)->core->signal = bfd_get_16 (abfd, note->descdata + 12);
+
+      /* pr_pid */
+      elf_tdata (abfd)->core->pid = bfd_get_32 (abfd, note->descdata + 24);
 
+      /* pr_reg */
+      offset = 72;
+      size = 196;
+
+      break;
     case 212:	      /* Linux/Nios II */
       /* pr_cursig */
       elf_tdata (abfd)->core->signal = bfd_get_16 (abfd, note->descdata + 12);
-- 
2.30.2


       reply	other threads:[~2024-04-19 10:39 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20240419103922.3621961-1-moritz.struebe@siemens-energy.com>
2024-04-19 10:39 ` Moritz Strübe [this message]
2024-04-19 15:06   ` Tom Tromey
2024-04-23 13:28   ` Luis Machado
2024-04-23 14:51     ` Sandra Loosemore
2024-04-23 15:31       ` Simon Marchi
2024-04-23 15:32       ` Luis Machado
2024-04-19 10:39 ` [PATCH 2/2] Nios2, gdb: Adjust to new coredump format Moritz Strübe
2024-04-19 15:08   ` Tom Tromey

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=fm-32642-202404191039259a5b01c9539d209231-2oN7gY@errorhandling.siemens-energy.com \
    --to=moritz.struebe@siemens-energy.com \
    --cc=gdb-patches@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).