Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Guinevere Larsen <blarsen@redhat.com>
To: Tom Tromey <tom@tromey.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [PATCH 1/3] gdb: Start supporting AVX instruction
Date: Wed, 5 Jun 2024 14:33:51 -0300	[thread overview]
Message-ID: <4e69730a-faba-4c05-b68d-264942d7d1e8@redhat.com> (raw)
In-Reply-To: <87r0dbnzdb.fsf@tromey.com>

On 6/5/24 13:11, Tom Tromey wrote:
>>>>>> "Guinevere" == Guinevere Larsen <blarsen@redhat.com> writes:
> Guinevere> +  /* These are used by VEX and XOP prefixes.  */
> Guinevere> +  uint8_t map_select;
> Guinevere> +  uint8_t vvvv;
> Guinevere> +  uint8_t pp;
> Guinevere> +  uint8_t l;
>
> Are these the names used by the ISA?  Since if not they are pretty ugly.
Yes, these are the ISA names for those bits. I would use more 
descriptive names instead of ISA ones, but I have no idea what they are 
supposed to mean.
>
> Guinevere> +static bool
> Guinevere> +i386_record_vex (struct i386_record_s *ir, uint8_t rex_w, uint8_t rex_r,
> Guinevere> +		 int opcode, struct gdbarch *gdbarch)
> Guinevere> +{
> Guinevere> +  switch (opcode)
> Guinevere> +    {
> Guinevere> +    default:
> Guinevere> +      gdb_printf (gdb_stderr,
> Guinevere> +		  _("Process record does not support VEX instruction 0x%02x "
> Guinevere> +		    "at address %s.\n"),
> Guinevere> +		  (unsigned int) (opcode),
> Guinevere> +		  paddress (gdbarch, ir->orig_addr));
> Guinevere> +      return -1;
>
> This should use true or false, not -1, because the function returns
> bool.
nice catch! the function should be returning int instead.
>
> I wouldn't be surprised to get some kind of dead code warning here,
> since the switch only has a single branch.
no warnings in my system... but that is possible, I guess. Do you think 
it would be better to merge this commit with the following one?

-- 
Cheers,
Guinevere Larsen
She/Her/Hers

>
> Tom
>


  reply	other threads:[~2024-06-05 17:34 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-05-21 20:27 [PATCH 0/3] Small step in supporting AVX instructions Guinevere Larsen
2024-05-21 20:27 ` [PATCH 1/3] gdb: Start supporting AVX instruction Guinevere Larsen
2024-06-05 16:11   ` Tom Tromey
2024-06-05 17:33     ` Guinevere Larsen [this message]
2024-06-06 17:01       ` Tom Tromey
2024-05-21 20:27 ` [PATCH 2/3] gdb/record: add support to vmovd and vmovq instructions Guinevere Larsen
2024-06-05 16:13   ` Tom Tromey
2024-06-05 18:24     ` Guinevere Larsen
2024-06-05 19:53       ` Guinevere Larsen
2024-05-21 20:28 ` [PATCH 3/3] gdb/record: add support to AVX unpack instructions Guinevere Larsen
2024-06-04 19:10 ` [PING][PATCH 0/3] Small step in supporting AVX instructions Guinevere Larsen
2024-06-05 16:13   ` Tom Tromey
2024-06-06  8:16   ` Willgerodt, Felix
2024-06-06 12:50     ` Guinevere Larsen
2024-06-06 13:36       ` Willgerodt, Felix
2024-06-06 13:45         ` Guinevere Larsen

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=4e69730a-faba-4c05-b68d-264942d7d1e8@redhat.com \
    --to=blarsen@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