Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Doug Evans <dje@google.com>
To: Joel Brobecker <brobecker@adacore.com>
Cc: Jan Kratochvil <jan.kratochvil@redhat.com>,
	gdb-patches <gdb-patches@sourceware.org>
Subject: Re: [PATCH] Delete struct inferior_suspend_state
Date: Thu, 31 Jul 2014 21:11:00 -0000	[thread overview]
Message-ID: <CADPb22TSKj2HmCfpHKgurARrq1AE5_6Mm4juGXqZ6O2wF1RUyQ@mail.gmail.com> (raw)
In-Reply-To: <20140731204242.GH14672@adacore.com>

On Thu, Jul 31, 2014 at 1:42 PM, Joel Brobecker <brobecker@adacore.com> wrote:
>> Comments don't necessarily fare much better.
>> Consider the 23 year old TODO. 1/2 :-)
>> ref: https://sourceware.org/ml/gdb-patches/2014-07/msg00832.html
>
> That is sometimes true, but not always. Comments are easier to
> search/replace, while commented out code is harder to maintain. Consider
> for instance the case of modifying a function where you want to add
> a parameter. With code, you'd have to fix it the best you can, while
> you wouldn't with a simple reference to that function in the comment.

That's a general concern, yes.
My comments in this thread are confined to the particular case at hand.

It would be interesting to do an audit and see how many outdated
comments gdb has.
Plus it's not clear to me comments are easier to search - what search
key do I use if I'm not grepping for a function name, etc.?

While I can envision code changes that obsolete what's currently #if
0'd out (someone renames "inf", "inf_state", or some such), for the
particular case at hand, I don't mind what's there ---  the patch
that's there got checked in, so I'm assuming I'm not the only one. :-)


  reply	other threads:[~2014-07-31 20:58 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-07-31 19:30 Doug Evans
2014-07-31 19:46 ` Jan Kratochvil
2014-07-31 19:54   ` Doug Evans
2014-07-31 20:33     ` Joel Brobecker
2014-07-31 20:42       ` Doug Evans
2014-07-31 20:58         ` Joel Brobecker
2014-07-31 21:11           ` Doug Evans [this message]
2014-07-31 21:53             ` Joel Brobecker
2014-08-01  2:04             ` Doug Evans
2014-08-08 23:25 ` Stan Shebs
2014-08-09 20:53   ` Doug Evans

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=CADPb22TSKj2HmCfpHKgurARrq1AE5_6Mm4juGXqZ6O2wF1RUyQ@mail.gmail.com \
    --to=dje@google.com \
    --cc=brobecker@adacore.com \
    --cc=gdb-patches@sourceware.org \
    --cc=jan.kratochvil@redhat.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