From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18882 invoked by alias); 21 May 2014 21:22:31 -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 18862 invoked by uid 89); 21 May 2014 21:22:30 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.6 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.3.2 X-HELO: rock.gnat.com Received: from rock.gnat.com (HELO rock.gnat.com) (205.232.38.15) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-SHA encrypted) ESMTPS; Wed, 21 May 2014 21:22:29 +0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by filtered-rock.gnat.com (Postfix) with ESMTP id DB3AF1161BC; Wed, 21 May 2014 17:22:27 -0400 (EDT) Received: from rock.gnat.com ([127.0.0.1]) by localhost (rock.gnat.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id mWpPvvJvTa7B; Wed, 21 May 2014 17:22:27 -0400 (EDT) Received: from joel.gnat.com (localhost.localdomain [127.0.0.1]) by rock.gnat.com (Postfix) with ESMTP id B366811618B; Wed, 21 May 2014 17:22:27 -0400 (EDT) Received: by joel.gnat.com (Postfix, from userid 1000) id 6F479436C4; Wed, 21 May 2014 14:22:27 -0700 (PDT) Date: Wed, 21 May 2014 21:22:00 -0000 From: Joel Brobecker To: Tom Tromey Cc: gdb-patches@sourceware.org Subject: Re: [PATCH] constify to_attach Message-ID: <20140521212227.GN22822@adacore.com> References: <1400696455-29563-1-git-send-email-tromey@redhat.com> <87mwebhsc2.fsf@fleche.redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <87mwebhsc2.fsf@fleche.redhat.com> User-Agent: Mutt/1.5.21 (2010-09-15) X-SW-Source: 2014-05/txt/msg00516.txt.bz2 > I also wanted to note that I checked all the functions for forward > declarations as well. > > Tom > > 2014-05-21 Tom Tromey > > * procfs.c (procfs_attach): Make "args" const. > * windows-nat.c (windows_attach): Make "args" const. > * nto-procfs.c (procfs_attach): Make "args" const. > * inf-ttrace.c (inf_ttrace_attach): Make "args" const. > * go32-nat.c (go32_attach): Make "args" const. > * gnu-nat.c (gnu_attach): Make "args" const. > * darwin-nat.c (darwin_attach): Make "args" const. > * inf-ptrace.c (inf_ptrace_attach): Make "args" const. > * linux-nat.c (linux_nat_attach): Make "args" const. > * remote.c (extended_remote_attach_1, extended_remote_attach): > Make "args" const. > * target.h (struct target_ops) : Make "args" const. > (find_default_attach): Likewise. > * utils.c (parse_pid_to_attach): Make "args" const. > * utils.h (parse_pid_to_attach): Update. I tried a few different ways to see if we may have missed any other files, and came up empty, so hopefully you nailed them all. For this sort of search, it would be helpful to have a convention that we either use var->method to set the field, or else put the name of the field in comment next to the assignment like we do with the language vector. That really makes it easier to find them; otherwise, one has to use code analyzers, which sometimes don't work when you can't compile the file first. Patch looks good to me! -- Joel