public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Tom Tromey <tom@tromey.com>
To: Guinevere Larsen <blarsen@redhat.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [PATCH 1/3] gdb: Start supporting AVX instruction
Date: Wed, 05 Jun 2024 10:11:28 -0600	[thread overview]
Message-ID: <87r0dbnzdb.fsf@tromey.com> (raw)
In-Reply-To: <20240521202800.2865871-2-blarsen@redhat.com> (Guinevere Larsen's message of "Tue, 21 May 2024 17:27:58 -0300")

>>>>> "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.

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.

I wouldn't be surprised to get some kind of dead code warning here,
since the switch only has a single branch.

Tom

  reply	other threads:[~2024-06-05 16:11 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 [this message]
2024-06-05 17:33     ` Guinevere Larsen
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=87r0dbnzdb.fsf@tromey.com \
    --to=tom@tromey.com \
    --cc=blarsen@redhat.com \
    --cc=gdb-patches@sourceware.org \
    /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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).