public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Pedro Alves <palves@redhat.com>
To: Doug Evans <dje@google.com>
Cc: gdb-patches <gdb-patches@sourceware.org>
Subject: Re: [PATCH 3/6] gdbserver: Add debugging printf when setting last_resume_kind.
Date: Wed, 18 Dec 2013 17:52:00 -0000	[thread overview]
Message-ID: <52B1E0D1.6070803@redhat.com> (raw)
In-Reply-To: <CADPb22S=kQiQYaw47AgD_KKJEHbwE8w6v5kBzPKhMDgj7F1F5Q@mail.gmail.com>

On 12/18/2013 05:31 PM, Doug Evans wrote:

> For three values?  Aren't we getting into over-engineering territory?

The macro way has the nice property that when reading the code
you never have to wonder "is the string actually matching the
enum name correctly?", so IMO it's worth it even with 3 values.
Plus it's 3 today, but might be more tomorrow.  At which point
will we switch over?  So it might seem that way in isolation,
but I'd rather every place that converts enums to strings
always used the same pattern everywhere.

-- 
Pedro Alves

      reply	other threads:[~2013-12-18 17:52 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-12-17 21:45 Doug Evans
2013-12-18 11:16 ` Pedro Alves
2013-12-18 17:31   ` Doug Evans
2013-12-18 17:52     ` Pedro Alves [this message]

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=52B1E0D1.6070803@redhat.com \
    --to=palves@redhat.com \
    --cc=dje@google.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).