aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHannes Domani <ssbssa@yahoo.de>2020-04-07 20:57:07 +0200
committerHannes Domani <ssbssa@yahoo.de>2022-01-08 14:17:49 +0100
commit24fe764c8a14bd519826e7e9af01edff59ab6be3 (patch)
tree68a32fb7e47095ee9ae7fc73a6be230291ac8d1f
parentbc2e7c7daaae1595288c3ecedd2902c5bed72e79 (diff)
downloadgdb-24fe764c8a14bd519826e7e9af01edff59ab6be3.zip
gdb-24fe764c8a14bd519826e7e9af01edff59ab6be3.tar.gz
gdb-24fe764c8a14bd519826e7e9af01edff59ab6be3.tar.bz2
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
-rw-r--r--gdb/linux-tdep.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/gdb/linux-tdep.c b/gdb/linux-tdep.c
index 45e7e1d..b005635 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"));