Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Yao Qi <qiyaoltc@gmail.com>
To: Andreas Arnez <arnez@linux.vnet.ibm.com>
Cc: Yao Qi <qiyaoltc@gmail.com>,
	 gdb-patches@sourceware.org,
	 "Markus T. Metzger" <markus.t.metzger@intel.com>
Subject: Re: [PATCH] linux-record: Squash cases with identical handling
Date: Thu, 14 Apr 2016 10:11:00 -0000	[thread overview]
Message-ID: <868u0gmrf2.fsf@gmail.com> (raw)
In-Reply-To: <m3shypczxm.fsf@oc1027705133.ibm.com> (Andreas Arnez's message of	"Wed, 13 Apr 2016 17:04:53 +0200")

Andreas Arnez <arnez@linux.vnet.ibm.com> writes:

> On Wed, Apr 13 2016, Yao Qi wrote:
>
>> I thought about squashing them too, but the reason I didn't do that is
>> these enum gdb_syscall in the switch block are listed in the numeric
>> order, so that it is quite easy to find whether a syscall is supported,
>> or add a new syscall.
>
> Ah, interesting point.  If we want to stick to this rule, maybe this
> should be stated in a comment above the switch statement?
>

It is not my intention to stick to this rule.

> Or should we aim at getting GDB '-Wswitch'-clean?  (Probably a good idea

-Wswitch is enabled by -Wall, so gdb is '-Wswitch'-clean already.

> anyhow...)  Then we could replace the default label by explicit case
> labels for all unsupported syscalls and rely on GCC to catch any further
> missing case labels.  Once that's done, the order of case labels
> wouldn't matter, IMO.
>

That will be overkill compared with your patch, so ...

>> but, I don't like the fall-through.
>
> Yeah, it's kind of ugly.  I can certainly drop this change from the
> patch if that helps.
>

... your patch except the fall-through is good to me.

-- 
Yao (齐尧)


  reply	other threads:[~2016-04-14 10:11 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-04-13 10:55 Andreas Arnez
2016-04-13 12:03 ` Yao Qi
2016-04-13 15:05   ` Andreas Arnez
2016-04-14 10:11     ` Yao Qi [this message]
2016-04-19 15:10       ` Andreas Arnez

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=868u0gmrf2.fsf@gmail.com \
    --to=qiyaoltc@gmail.com \
    --cc=arnez@linux.vnet.ibm.com \
    --cc=gdb-patches@sourceware.org \
    --cc=markus.t.metzger@intel.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