From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14781 invoked by alias); 31 Jul 2014 20:58:23 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 14771 invoked by uid 89); 31 Jul 2014 20:58:22 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-3.2 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_LOW,RP_MATCHES_RCVD,SPF_PASS autolearn=ham version=3.3.2 X-HELO: mail-vc0-f173.google.com Received: from mail-vc0-f173.google.com (HELO mail-vc0-f173.google.com) (209.85.220.173) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-SHA encrypted) ESMTPS; Thu, 31 Jul 2014 20:58:21 +0000 Received: by mail-vc0-f173.google.com with SMTP id hy10so5233755vcb.32 for ; Thu, 31 Jul 2014 13:58:19 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=2bsu+6g7G6E7JoltUZVhfsCrLZf11SK3qPOBo/0hkyc=; b=Y9CeKPkmdw8RIa6Ye5fJ0yfmxQS9Q7tZGvNjHzajnQZK1n7w/6X2uJ3dqHLTf0m/OR IloG1X7wrSdTpt1IQHKumI7sqYCcqYyHVLG32g0YmHeAGCCVbqfiEqA9Wt3j/JE/84MS y2VToBpVHceWJuQg7Jp3gu/NjhGyRW9MsRW1vd/zEAL0+hJC9+LOOTtrfa/6rf8i/4ro BqFWGvb4yQlYivRZI6+gWsVxJlyNRVRPnVUtwJMdbicjTh49n7YJ7+/3LV0KC0lcW3hR lKbqvOHuhICUyVNL10GhP4c+ZqaxBBB3+SQceNtDeBgnCmG0mngMcVXeJJHRWvrFujmQ qYgg== X-Gm-Message-State: ALoCoQnANIrnKvYUOkRMeKiQMpc0gwHqqzNtxBpcNGbxxvOdVvpg1Ti+Ozl9OqdUADDJolthELJR MIME-Version: 1.0 X-Received: by 10.52.160.10 with SMTP id xg10mr943101vdb.1.1406840299403; Thu, 31 Jul 2014 13:58:19 -0700 (PDT) Received: by 10.52.28.233 with HTTP; Thu, 31 Jul 2014 13:58:19 -0700 (PDT) In-Reply-To: <20140731204242.GH14672@adacore.com> References: <20140731193050.GA7927@host2.jankratochvil.net> <20140731200529.GG14672@adacore.com> <20140731204242.GH14672@adacore.com> Date: Thu, 31 Jul 2014 21:11:00 -0000 Message-ID: Subject: Re: [PATCH] Delete struct inferior_suspend_state From: Doug Evans To: Joel Brobecker Cc: Jan Kratochvil , gdb-patches Content-Type: text/plain; charset=UTF-8 X-IsSubscribed: yes X-SW-Source: 2014-07/txt/msg00837.txt.bz2 On Thu, Jul 31, 2014 at 1:42 PM, Joel Brobecker 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. :-)