This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH] Delete struct inferior_suspend_state
- From: Doug Evans <dje at google dot com>
- To: Joel Brobecker <brobecker at adacore dot com>
- Cc: Jan Kratochvil <jan dot kratochvil at redhat dot com>, gdb-patches <gdb-patches at sourceware dot org>
- Date: Thu, 31 Jul 2014 13:58:19 -0700
- Subject: Re: [PATCH] Delete struct inferior_suspend_state
- Authentication-results: sourceware.org; auth=none
- References: <yjt2silh73aa dot fsf at ruffy dot mtv dot corp dot google dot com> <20140731193050 dot GA7927 at host2 dot jankratochvil dot net> <CADPb22TPw+9eOv2hna==EomvmNNyATTkqUvwyqKLU7V-L=PAEA at mail dot gmail dot com> <20140731200529 dot GG14672 at adacore dot com> <CADPb22Sb=LMc-2+gXugd+9CMcRR3KmgNRg_Sde2PaTqz8-VkZA at mail dot gmail dot com> <20140731204242 dot GH14672 at adacore dot 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. :-)