From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 25152 invoked by alias); 30 May 2013 12:01:01 -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 25120 invoked by uid 89); 30 May 2013 12:00:55 -0000 X-Spam-SWARE-Status: No, score=-8.1 required=5.0 tests=AWL,BAYES_00,KHOP_THREADED,RCVD_IN_HOSTKARMA_W,RCVD_IN_HOSTKARMA_WL,RP_MATCHES_RCVD,SPF_HELO_PASS,SPF_PASS autolearn=ham version=3.3.1 Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.84/v0.84-167-ge50287c) with ESMTP; Thu, 30 May 2013 12:00:54 +0000 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r4UC0kL9020288 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Thu, 30 May 2013 08:00:48 -0400 Received: from [127.0.0.1] (ovpn01.gateway.prod.ext.ams2.redhat.com [10.39.146.11]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id r4UC0UEU023685; Thu, 30 May 2013 08:00:32 -0400 Message-ID: <51A73F5D.9070402@redhat.com> Date: Thu, 30 May 2013 12:01:00 -0000 From: Pedro Alves User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130311 Thunderbird/17.0.4 MIME-Version: 1.0 To: Tom Tromey CC: gdb-patches@sourceware.org Subject: Re: [PATCH 01/22] [GDBserver] Multi-process + multi-arch: core + GNU/Linux x86* References: <20130529162434.24586.5697.stgit@brno.lan> <20130529162452.24586.9557.stgit@brno.lan> <87mwrdtxqa.fsf@fleche.redhat.com> In-Reply-To: <87mwrdtxqa.fsf@fleche.redhat.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-SW-Source: 2013-05/txt/msg01056.txt.bz2 On 05/29/2013 08:03 PM, Tom Tromey wrote: > Pedro> diff --git a/gdb/gdbserver/linux-amd64-ipa.c b/gdb/gdbserver/linux-amd64-ipa.c > Pedro> index dc20a15..d0c40c9 100644 > Pedro> --- a/gdb/gdbserver/linux-amd64-ipa.c > Pedro> +++ b/gdb/gdbserver/linux-amd64-ipa.c > Pedro> @@ -23,6 +23,9 @@ > Pedro> /* Defined in auto-generated file amd64-linux.c. */ > Pedro> void init_registers_amd64_linux (void); > > Pedro> +/* Ditto. */ > Pedro> +extern struct target_desc *tdesc_amd64_linux; > > It seems like this (and other instances) could be const. Good idea. While at it, I noticed the since the globals in the generated files, are now accessed through the target_desc globals, can/should be made static: -const char *expedite_regs_tilegx[] = { "sp", "lr", "pc", 0 }; -const char *xmltarget_tilegx = 0; +static const char *expedite_regs_tilegx[] = { "sp", "lr", "pc", 0 }; +static const char *xmltarget_tilegx = 0; I did the necessary change to regdat.sh. > Pedro> struct reg * > Pedro> -find_register_by_name (const char *name) > Pedro> +find_register_by_name (struct target_desc *tdesc, const char *name) > > How about const here? > > Pedro> int > Pedro> -find_regno (const char *name) > Pedro> +find_regno (struct target_desc *tdesc, const char *name) > > And here and other similar spots? Yes, a bunch of other spots. :-) Did the adjustment now across the whole series. Good old grep is telling I didn't miss any spot. > Pedro> +struct target_desc > Pedro> +{ > Pedro> + /* An array of NUM_REGISTERS elements of register definitions that > Pedro> + description the inferior's register set. */ > Pedro> + struct reg *reg_defs; > > I think it should be "...that describe...". Indeed. Thanks! v3 coming up... -- Pedro Alves