public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Hannes Domani <ssbssa@yahoo.de>
To: gdb-patches@sourceware.org
Subject: [PATCH] Add _sigsys info to siginfo struct
Date: Mon,  3 Jan 2022 19:58:54 +0100	[thread overview]
Message-ID: <20220103185854.1675-1-ssbssa@yahoo.de> (raw)
In-Reply-To: <20220103185854.1675-1-ssbssa.ref@yahoo.de>

This patch adds information about _sigsys structure from newer
kernels, so that $_siginfo decoding can show information about
_sigsys, making it easier for developers to debug seccomp failures.

Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=24283
---
 gdb/linux-tdep.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/gdb/linux-tdep.c b/gdb/linux-tdep.c
index 927e69bf1e1..fb2abdd1a21 100644
--- a/gdb/linux-tdep.c
+++ b/gdb/linux-tdep.c
@@ -379,6 +379,13 @@ linux_get_siginfo_type_with_fields (struct gdbarch *gdbarch,
   append_composite_type_field (type, "si_fd", int_type);
   append_composite_type_field (sifields_type, "_sigpoll", type);
 
+  /* _sigsys */
+  type = arch_composite_type (gdbarch, NULL, TYPE_CODE_STRUCT);
+  append_composite_type_field (type, "_call_addr", void_ptr_type);
+  append_composite_type_field (type, "_syscall", int_type);
+  append_composite_type_field (type, "_arch", uint_type);
+  append_composite_type_field (sifields_type, "_sigsys", type);
+
   /* struct siginfo */
   siginfo_type = arch_composite_type (gdbarch, NULL, TYPE_CODE_STRUCT);
   siginfo_type->set_name (xstrdup ("siginfo"));
-- 
2.34.1


       reply	other threads:[~2022-01-03 18:54 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20220103185854.1675-1-ssbssa.ref@yahoo.de>
2022-01-03 18:58 ` Hannes Domani [this message]
2022-01-08 11:03   ` Joel Brobecker
2022-01-08 12:34     ` Hannes Domani
2022-01-08 12:44       ` Joel Brobecker
2022-01-08 13:18         ` Hannes Domani
2022-01-10 15:12   ` Tom Tromey
2022-01-16  9:39     ` Joel Brobecker

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=20220103185854.1675-1-ssbssa@yahoo.de \
    --to=ssbssa@yahoo.de \
    --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).