From: John Baldwin <jhb@freebsd.org>
To: gdb-patches@sourceware.org
Cc: Tom Tromey <tom@tromey.com>
Subject: Re: [RFA 5/9] Add fall-through comment to i386-tdep.c
Date: Tue, 24 Apr 2018 20:37:00 -0000 [thread overview]
Message-ID: <2811000.1AMpcQedXF@ralph.baldwin.cx> (raw)
In-Reply-To: <20180421183056.29292-6-tom@tromey.com>
On Saturday, April 21, 2018 12:30:52 PM Tom Tromey wrote:
> This adds a fall-through comment in i386-tdep.c. I am not sure if
> this should be a fall-through or a break (it's possible even that it
> does not matter), so I elected to preserve the status quo.
>
> ChangeLog
> 2018-04-21 Tom Tromey <tom@tromey.com>
>
> * i386-tdep.c (i386_process_record): Add fall-through comment.
> ---
> gdb/ChangeLog | 4 ++++
> gdb/i386-tdep.c | 1 +
> 2 files changed, 5 insertions(+)
>
> diff --git a/gdb/i386-tdep.c b/gdb/i386-tdep.c
> index bf4ca54303..8ab7b005b8 100644
> --- a/gdb/i386-tdep.c
> +++ b/gdb/i386-tdep.c
> @@ -7130,6 +7130,7 @@ Do you want to stop the program?"),
> else if (ir.rm == 1)
> break;
> }
> + /* Fall through. */
> case 3: /* lidt */
> if (ir.mod == 3)
> {
I believe this is correct based on the diff that added the special cases
for xgetbv and xsetbv as previously ldgt and lidt were treated the same:
diff --git a/gdb/i386-tdep.c b/gdb/i386-tdep.c
index b4dc646b37..b354462cb9 100644
--- a/gdb/i386-tdep.c
+++ b/gdb/i386-tdep.c
@@ -5172,6 +5172,19 @@ reswitch:
break;
/* lgdt */
case 2:
+ if (ir.mod == 3)
+ {
+ /* xgetbv */
+ if (ir.rm == 0)
+ {
+ I386_RECORD_ARCH_LIST_ADD_REG (X86_RECORD_REAX_REGNUM);
+ I386_RECORD_ARCH_LIST_ADD_REG (X86_RECORD_REDX_REGNUM);
+ break;
+ }
+ /* xsetbv */
+ else if (ir.rm == 1)
+ break;
+ }
/* lidt */
case 3:
if (ir.mod == 3)
--
John Baldwin
next prev parent reply other threads:[~2018-04-24 20:37 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-04-21 18:31 [RFA 0/9] Enable -Wimplicit-fallthrough Tom Tromey
2018-04-21 18:31 ` [RFA 5/9] Add fall-through comment to i386-tdep.c Tom Tromey
2018-04-24 20:37 ` John Baldwin [this message]
2018-04-21 18:31 ` [RFA 7/9] Add missing "breaks" Tom Tromey
2018-04-21 18:31 ` [RFA 1/9] Fix "fall through" comments Tom Tromey
2018-04-21 18:31 ` [RFA 2/9] Add missing ATTRIBUTE_NORETURNs Tom Tromey
2018-04-21 18:31 ` [RFA 9/9] Add -Wimplicit-fallthrough Tom Tromey
2018-05-04 18:34 ` Pedro Alves
2018-05-04 18:47 ` Tom Tromey
2018-04-21 18:31 ` [RFA 8/9] Add a missing break in record_linux_system_call Tom Tromey
2018-04-21 18:31 ` [RFA 4/9] Add a fall-through comment to stabsread.c Tom Tromey
2018-04-21 18:31 ` [RFA 3/9] Fix "obvious" fall-through warnings Tom Tromey
2018-04-21 18:31 ` [RFA 6/9] Add two fall-through comments in rs6000-tdep.c Tom Tromey
2018-05-04 17:51 ` [RFA 0/9] Enable -Wimplicit-fallthrough Pedro Alves
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=2811000.1AMpcQedXF@ralph.baldwin.cx \
--to=jhb@freebsd.org \
--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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).