public inbox for gdb-cvs@sourceware.org
help / color / mirror / Atom feed
* [binutils-gdb] Add _sigsys info to siginfo struct
@ 2022-01-08 13:16 Hannes Domani
  0 siblings, 0 replies; only message in thread
From: Hannes Domani @ 2022-01-08 13:16 UTC (permalink / raw)
  To: gdb-cvs

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

commit 24fe764c8a14bd519826e7e9af01edff59ab6be3
Author: Hannes Domani <ssbssa@yahoo.de>
Date:   Tue Apr 7 20:57:07 2020 +0200

    Add _sigsys info to siginfo struct
    
    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.
    Requested in PR gdb/24283.
    
    Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=24283

Diff:
---
 gdb/linux-tdep.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/gdb/linux-tdep.c b/gdb/linux-tdep.c
index 45e7e1d0b54..b0056358cf9 100644
--- a/gdb/linux-tdep.c
+++ b/gdb/linux-tdep.c
@@ -380,6 +380,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"));


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2022-01-08 13:16 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-01-08 13:16 [binutils-gdb] Add _sigsys info to siginfo struct Hannes Domani

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).