[binutils-gdb] gdb/linux-tdep: remove linux_get_siginfo_type_with_fields
Simon Marchi via Gdb-cvs <[email protected]>
| Newsgroups | gmane.comp.gdb.cvs |
|---|---|
| Message-ID | <[email protected]> |
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=fc9ff2750b1710f9eba1504b04f9c7a65f6d37be commit fc9ff2750b1710f9eba1504b04f9c7a65f6d37be Author: Simon Marchi <[email protected]> Date: Tue Mar 10 13:34:47 2026 -0400 gdb/linux-tdep: remove linux_get_siginfo_type_with_fields It is unused since the removal of MPX, commit fc14343205d3 ("gdb, gdbserver, python, testsuite: Remove MPX"). Change-Id: I459220a851389956112ff36d4b6f2a443357e034 Approved-By: Tom Tromey <[email protected]> Diff: --- gdb/linux-tdep.c | 29 +++-------------------------- gdb/linux-tdep.h | 17 ----------------- 2 files changed, 3 insertions(+), 43 deletions(-) diff --git a/gdb/linux-tdep.c b/gdb/linux-tdep.c index 921bcba9836..3f2bab16630 100644 --- a/gdb/linux-tdep.c +++ b/gdb/linux-tdep.c @@ -263,11 +263,10 @@ get_linux_inferior_data (inferior *inf) return &linux_inferior_data.try_emplace (inf); } -/* See linux-tdep.h. */ +/* Implementation of gdbarch_get_siginfo_type. */ -struct type * -linux_get_siginfo_type_with_fields (struct gdbarch *gdbarch, - linux_siginfo_extra_fields extra_fields) +static struct type * +linux_get_siginfo_type (struct gdbarch *gdbarch) { struct linux_gdbarch_data *linux_gdbarch_data; struct type *void_ptr_type; @@ -286,7 +285,6 @@ linux_get_siginfo_type_with_fields (struct gdbarch *gdbarch, struct type *int_type = builtin_types->builtin_int; struct type *uint_type = builtin_types->builtin_unsigned_int; struct type *long_type = builtin_types->builtin_long; - struct type *short_type = builtin_types->builtin_short; void_ptr_type = lookup_pointer_type (builtin_type (gdbarch)->builtin_void); @@ -366,18 +364,6 @@ linux_get_siginfo_type_with_fields (struct gdbarch *gdbarch, /* _sigfault */ type = arch_composite_type (gdbarch, NULL, TYPE_CODE_STRUCT); append_composite_type_field (type, "si_addr", void_ptr_type); - - /* Additional bound fields for _sigfault in case they were requested. */ - if ((extra_fields & LINUX_SIGINFO_FIELD_ADDR_BND) != 0) - { - struct type *sigfault_bnd_fields; - - append_composite_type_field (type, "_addr_lsb", short_type); - sigfault_bnd_fields = arch_composite_type (gdbarch, NULL, TYPE_CODE_STRUCT); - append_composite_type_field (sigfault_bnd_fields, "_lower", void_ptr_type); - append_composite_type_field (sigfault_bnd_fields, "_upper", void_ptr_type); - append_composite_type_field (type, "_addr_bnd", sigfault_bnd_fields); - } append_composite_type_field (sifields_type, "_sigfault", type); /* _sigpoll */ @@ -408,15 +394,6 @@ linux_get_siginfo_type_with_fields (struct gdbarch *gdbarch, return siginfo_type; } -/* This function is suitable for architectures that don't - extend/override the standard siginfo structure. */ - -static struct type * -linux_get_siginfo_type (struct gdbarch *gdbarch) -{ - return linux_get_siginfo_type_with_fields (gdbarch, 0); -} - /* Return true if the target is running on uClinux instead of normal Linux kernel. */ diff --git a/gdb/linux-tdep.h b/gdb/linux-tdep.h index 92666ea4d97..20d933fe134 100644 --- a/gdb/linux-tdep.h +++ b/gdb/linux-tdep.h @@ -38,23 +38,6 @@ struct regcache; #define PR_SHADOW_STACK_PUSH (1UL << 2) #endif -/* Enum used to define the extra fields of the siginfo type used by an - architecture. */ -enum linux_siginfo_extra_field_values -{ - /* Add bound fields into the segmentation fault field. */ - LINUX_SIGINFO_FIELD_ADDR_BND = 1 -}; - -/* Defines a type for the values defined in linux_siginfo_extra_field_values. */ -DEF_ENUM_FLAGS_TYPE (enum linux_siginfo_extra_field_values, - linux_siginfo_extra_fields); - -/* This function is suitable for architectures that - extend/override the standard siginfo in a specific way. */ -struct type *linux_get_siginfo_type_with_fields (struct gdbarch *gdbarch, - linux_siginfo_extra_fields); - /* Return true if ADDRESS is within the boundaries of a page mapped with memory tagging protection. */ bool linux_address_in_memtag_page (CORE_ADDR address);