From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6993 invoked by alias); 4 Oct 2013 08:31:56 -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 6982 invoked by uid 89); 4 Oct 2013 08:31:56 -0000 Received: from relay1.mentorg.com (HELO relay1.mentorg.com) (192.94.38.131) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 04 Oct 2013 08:31:56 +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,GARBLED_BODY,RDNS_NONE,SPF_HELO_FAIL autolearn=no version=3.3.2 X-HELO: relay1.mentorg.com Received: from svr-orw-fem-01.mgc.mentorg.com ([147.34.98.93]) by relay1.mentorg.com with esmtp id 1VS0ne-0001N1-UQ from Yao_Qi@mentor.com ; Fri, 04 Oct 2013 01:31:50 -0700 Received: from SVR-ORW-FEM-02.mgc.mentorg.com ([147.34.96.206]) by svr-orw-fem-01.mgc.mentorg.com over TLS secured channel with Microsoft SMTPSVC(6.0.3790.4675); Fri, 4 Oct 2013 01:31:50 -0700 Received: from qiyao.dyndns.org (147.34.91.1) by svr-orw-fem-02.mgc.mentorg.com (147.34.96.168) with Microsoft SMTP Server id 14.2.247.3; Fri, 4 Oct 2013 01:31:49 -0700 Message-ID: <524E7C9E.6060009@codesourcery.com> Date: Fri, 04 Oct 2013 08:31:00 -0000 From: Yao Qi User-Agent: Mozilla/5.0 (X11; Linux i686; rv:17.0) Gecko/20130110 Thunderbird/17.0.2 MIME-Version: 1.0 To: Joel Brobecker CC: Doug Evans , gdb-patches Subject: Re: [PATCH 2/7] Remove vlang_unknown References: <1379512482-31773-1-git-send-email-yao@codesourcery.com> <1379512482-31773-3-git-send-email-yao@codesourcery.com> <20131001100742.GC2840@adacore.com> <524ACF04.2050904@codesourcery.com> <20131002093248.GB2971@adacore.com> In-Reply-To: <20131002093248.GB2971@adacore.com> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8bit X-IsSubscribed: yes X-SW-Source: 2013-10/txt/msg00132.txt.bz2 On 10/02/2013 05:32 PM, Joel Brobecker wrote: > I agree. I think the patch is OK to go with a quick comment added, > explaining that we want to be able to index arrays using this enum, > so we make its first enum explicitly zero (despite the fact that > this is the default, this prevents someone else just accidently > setting the first enum's value to nonzero for other reasons). Comments are added in the patch below. It is obvious to me, and I'll commit it. -- Yao (齐尧) gdb: 2013-10-04 Yao Qi * varobj.h: Add comments to enum varobj_languages. --- gdb/varobj.h | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/gdb/varobj.h b/gdb/varobj.h index 5f6eb88..c794085 100644 --- a/gdb/varobj.h +++ b/gdb/varobj.h @@ -52,7 +52,8 @@ enum varobj_scope_status /* String representations of gdb's format codes (defined in varobj.c). */ extern char *varobj_format_string[]; -/* Languages supported by this variable objects system. */ +/* Languages supported by this variable objects system. This enum is used + to index arrays so we make its first enum explicitly zero. */ enum varobj_languages { vlang_c = 0, vlang_cplus, vlang_java, vlang_ada, vlang_end -- 1.7.7.6