From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10031 invoked by alias); 25 Oct 2013 13:38:42 -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 10018 invoked by uid 89); 25 Oct 2013 13:38:41 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=1.3 required=5.0 tests=AWL,BAYES_00,GARBLED_BODY autolearn=no version=3.3.2 X-HELO: relay1.mentorg.com 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, 25 Oct 2013 13:38:41 +0000 Received: from svr-orw-exc-10.mgc.mentorg.com ([147.34.98.58]) by relay1.mentorg.com with esmtp id 1VZhb3-0003oC-SE from Yao_Qi@mentor.com ; Fri, 25 Oct 2013 06:38:37 -0700 Received: from SVR-ORW-FEM-04.mgc.mentorg.com ([147.34.97.41]) by SVR-ORW-EXC-10.mgc.mentorg.com with Microsoft SMTPSVC(6.0.3790.4675); Fri, 25 Oct 2013 06:38:38 -0700 Received: from qiyao.dyndns.org (147.34.91.1) by svr-orw-fem-04.mgc.mentorg.com (147.34.97.41) with Microsoft SMTP Server id 14.2.247.3; Fri, 25 Oct 2013 06:38:37 -0700 Message-ID: <526A7407.5090301@codesourcery.com> Date: Fri, 25 Oct 2013 13:38: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: Subject: Re: [PATCH 2/2] Remove varobj_language_string, languages and varobj_languages References: <1382057576-19148-1-git-send-email-yao@codesourcery.com> <1382057576-19148-2-git-send-email-yao@codesourcery.com> <20131025041525.GC4769@adacore.com> In-Reply-To: <20131025041525.GC4769@adacore.com> Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 8bit X-IsSubscribed: yes X-SW-Source: 2013-10/txt/msg00798.txt.bz2 On 10/25/2013 12:15 PM, Joel Brobecker wrote: > I think this can do for now because it is good enough, but I would > definitely prefer we avoid this type transformation. Instead, > I'd rather we added a new field in struct language_defn that > provides the "natural" name. > I am OK to add a new field "la_varobj_name" in struct language_defn, but seems information is duplicated a little, we have both "c++" and "C++" in one language_defn. >> >2013-10-18 Yao Qi >> > >> > * mi/mi-cmd-var.c: Include "language.h" and . >> > (mi_cmd_var_info_expression): Get language name from >> > language_defn. >> > * varobj.c (varobj_language_string): Remove. >> > (variable_language): Remove declaration. >> > (languages): Remove. >> > (varobj_get_language): Change the type of return value. >> > (variable_language): Remove. >> > * varobj.h (enum varobj_languages): Remove. >> > (varobj_language_string): Remove declaration. >> > (varobj_get_language): Update declaration. > Personally, I would do the language_defn update first, and then get > rid of the xstrdup/toupper/xfree dance. But I'm open to others' > opinion. One drawback of xstrdup/toupper/xfree dance is that we loose the freedom to show language name in varobj. I'll post patches in the way you suggested if no one else has other comments here. -- Yao (齐尧)