Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Keith Seitz <keiths@redhat.com>
To: Tom Tromey <tom@tromey.com>, gdb-patches@sourceware.org
Subject: Re: [PATCH 5/6] Remove the print_vector_info gdbarch hook
Date: Thu, 5 Dec 2024 14:49:02 -0800	[thread overview]
Message-ID: <53f05ae9-d14b-406f-bbbc-3fee92e321f7@redhat.com> (raw)
In-Reply-To: <20241104-check-unused-gdbarch-v1-5-7082f2121077@tromey.com>

Hi,

One really tiny, tiny request:

On 11/4/24 1:14 PM, Tom Tromey wrote:

> diff --git a/gdb/infcmd.c b/gdb/infcmd.c
> index 74873b9f7c80fa2ec299f528cde748161882c175..db9d6e66b57b700b7dc9b7bd6176fdc0ac888ef3 100644
> --- a/gdb/infcmd.c
> +++ b/gdb/infcmd.c
> @@ -2404,25 +2404,18 @@ print_vector_info (struct ui_file *file,
>   		   const frame_info_ptr &frame, const char *args)
>   {
>     struct gdbarch *gdbarch = get_frame_arch (frame);
> +  int printed_something = 0;

Since you're here, would you mind changing `printed_something' to a bool?

[I warned you it was teeny tiny!]

Keith

>   
> -  if (gdbarch_print_vector_info_p (gdbarch))
> -    gdbarch_print_vector_info (gdbarch, file, frame, args);
> -  else
> +  for (int regnum = 0; regnum < gdbarch_num_cooked_regs (gdbarch); regnum++)
>       {
> -      int regnum;
> -      int printed_something = 0;
> -
> -      for (regnum = 0; regnum < gdbarch_num_cooked_regs (gdbarch); regnum++)
> +      if (gdbarch_register_reggroup_p (gdbarch, regnum, vector_reggroup))
>   	{
> -	  if (gdbarch_register_reggroup_p (gdbarch, regnum, vector_reggroup))
> -	    {
> -	      printed_something = 1;
> -	      gdbarch_print_registers_info (gdbarch, file, frame, regnum, 1);
> -	    }
> +	  printed_something = 1;
> +	  gdbarch_print_registers_info (gdbarch, file, frame, regnum, 1);
>   	}
> -      if (!printed_something)
> -	gdb_printf (file, "No vector information\n");
>       }
> +  if (!printed_something)
> +    gdb_printf (file, "No vector information\n");
>   }
>   
>   static void
> 


  reply	other threads:[~2024-12-05 22:49 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
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=53f05ae9-d14b-406f-bbbc-3fee92e321f7@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