From: Keith Seitz <keiths@redhat.com>
To: Tom Tromey <tom@tromey.com>, gdb-patches@sourceware.org
Subject: Re: [PATCH 0/6] Add gdbarch-checking script
Date: Thu, 5 Dec 2024 14:50:57 -0800 [thread overview]
Message-ID: <41518c65-4f78-481f-b381-e120d9546d29@redhat.com> (raw)
In-Reply-To: <20241104-check-unused-gdbarch-v1-0-7082f2121077@tromey.com>
Hi, Tom,
[It's me again!]
On 11/4/24 1:14 PM, Tom Tromey wrote:
> 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.
This is very nice... I've looked over the series, and I only have
two minor requests (patch nos. 1 & 5). Otherwise, this series
LGTM.
> 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
I briefly discussed these with fche, and it certainly appears
that the compiler *could* output these suffixes. However, it seems
that either no one has generated a probe that does this (and/or
tried to debug it), or no one has reported any problems.
I agree these need further discussion, but while I understand
the desire to simplify, I still lean toward keeping these around.
> bfloat16_bit
> half_bit
>
> Perhaps these should just both be 16-bit types unconditionally.
It appears that both these methods were just added for parallelism
with other type implementations, like "float_bit" and "float_format".
Honestly, probably what I would have done until a maintainer corrected
me during review!
> 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.
Wow, there's a lot of related code using this, even if nothing ever sets
the value differently from the default... I can't help but wonder if
this was needed for some port which never landed on the list or
something? The work here, as noted in the ChangeLog entry, does note
that this work (at commit time) was not complete. [I don't know if that
has changed?]
Maybe Simon has some further insight?
In any case, these patches need not be delayed further for the sake
of dealing with *everything* it discovered.
Reviewed-By: Keith Seitz <keiths@redhat.com>
Keith
> 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,
next prev parent reply other threads:[~2024-12-05 22:51 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-11-04 21:14 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 ` Keith Seitz [this message]
2024-12-06 2:58 ` [PATCH 0/6] Add gdbarch-checking script 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=41518c65-4f78-481f-b381-e120d9546d29@redhat.com \
--to=keiths@redhat.com \
--cc=gdb-patches@sourceware.org \
--cc=tom@tromey.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