Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* [PATCH 0/6] Add gdbarch-checking script
@ 2024-11-04 21:14 Tom Tromey
  2024-11-04 21:14 ` [PATCH 1/6] Add check-gdbarch.py Tom Tromey
                   ` (6 more replies)
  0 siblings, 7 replies; 11+ messages in thread
From: Tom Tromey @ 2024-11-04 21:14 UTC (permalink / raw)
  To: gdb-patches; +Cc: Tom Tromey, Alan Modra, Jan Kratochvil

I was curious if any gdbarch methods were unused, so I wrote a script
to check this.  It works by scanning the source and looking for calls
to gdbarch methods and for arches setting the parameter.

This found a few methods that are obsolete.  These are removed in the
series.

A few other gdbarch settings are used by gdb but not set by any
existing arch.  I haven't removed these since they maybe needed more
discussion:

    stap_gdb_register_suffix
    stap_integer_suffixes
    stap_register_suffixes

Maybe these could be useful.

    bfloat16_bit
    half_bit

Perhaps these should just both be 16-bit types unconditionally.

    addressable_memory_unit_size

This was added in 2015.  Not sure if there's a need for it but at the
same time it seems necessary if we ever want to really support arches
like this.

Signed-off-by: Tom Tromey <tom@tromey.com>
---
Tom Tromey (6):
      Add check-gdbarch.py
      Use 'invalid' rather than 'predicate' in some gdbarch functions
      Remove solib_symbols_extension gdbarch hook
      Remove skip_permanent_breakpoint gdbarch hook
      Remove the print_vector_info gdbarch hook
      Remove the auto_charset gdbarch hook

 gdb/arch-utils.c          |  12 ----
 gdb/arch-utils.h          |   8 ---
 gdb/breakpoint.c          |   3 +-
 gdb/breakpoint.h          |   3 +-
 gdb/charset.c             |   9 +--
 gdb/check-gdbarch.py      |  87 +++++++++++++++++++++++
 gdb/gdbarch-gen.c         | 173 ++--------------------------------------------
 gdb/gdbarch-gen.h         |  40 -----------
 gdb/gdbarch_components.py |  61 ++--------------
 gdb/infcmd.c              |  21 ++----
 gdb/infrun.c              |   7 +-
 gdb/solib.c               |  27 --------
 12 files changed, 118 insertions(+), 333 deletions(-)
---
base-commit: ae2f3fa7581fb59ebbf80f93b7ed75f853f0ba29
change-id: 20241104-check-unused-gdbarch-c396c0aff7fc

Best regards,
-- 
Tom Tromey <tom@tromey.com>


^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2024-12-06  2:59 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-11-04 21:14 [PATCH 0/6] Add gdbarch-checking script Tom Tromey
2024-11-04 21:14 ` [PATCH 1/6] Add check-gdbarch.py Tom Tromey
2024-12-05 22:47   ` Keith Seitz
2024-11-04 21:14 ` [PATCH 2/6] Use 'invalid' rather than 'predicate' in some gdbarch functions Tom Tromey
2024-11-04 21:14 ` [PATCH 3/6] Remove solib_symbols_extension gdbarch hook Tom Tromey
2024-11-04 21:14 ` [PATCH 4/6] Remove skip_permanent_breakpoint " Tom Tromey
2024-11-04 21:14 ` [PATCH 5/6] Remove the print_vector_info " Tom Tromey
2024-12-05 22:49   ` Keith Seitz
2024-11-04 21:14 ` [PATCH 6/6] Remove the auto_charset " Tom Tromey
2024-12-05 22:50 ` [PATCH 0/6] Add gdbarch-checking script Keith Seitz
2024-12-06  2:58   ` Sergio Durigan Junior

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox