From: Tom Tromey <tom@tromey.com>
To: gdb-patches@sourceware.org
Cc: Tom Tromey <tom@tromey.com>, Alan Modra <amodra@gmail.com>,
Jan Kratochvil <jan.kratochvil@redhat.com>
Subject: [PATCH 0/6] Add gdbarch-checking script
Date: Mon, 04 Nov 2024 14:14:10 -0700 [thread overview]
Message-ID: <20241104-check-unused-gdbarch-v1-0-7082f2121077@tromey.com> (raw)
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>
next reply other threads:[~2024-11-04 21:15 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-11-04 21:14 Tom Tromey [this message]
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
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=20241104-check-unused-gdbarch-v1-0-7082f2121077@tromey.com \
--to=tom@tromey.com \
--cc=amodra@gmail.com \
--cc=gdb-patches@sourceware.org \
--cc=jan.kratochvil@redhat.com \
/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