From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 9910 invoked by alias); 2 Aug 2013 18:00:34 -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 9901 invoked by uid 89); 2 Aug 2013 18:00:34 -0000 X-Spam-SWARE-Status: No, score=-1.8 required=5.0 tests=AWL,BAYES_00,KAM_STOCKGEN,KHOP_THREADED,RCVD_IN_DNSWL_NONE,RCVD_IN_HOSTKARMA_YE,RDNS_NONE autolearn=no version=3.3.1 Received: from Unknown (HELO homiemail-a80.g.dreamhost.com) (208.113.200.5) by sourceware.org (qpsmtpd/0.84/v0.84-167-ge50287c) with ESMTP; Fri, 02 Aug 2013 18:00:33 +0000 Received: from homiemail-a80.g.dreamhost.com (localhost [127.0.0.1]) by homiemail-a80.g.dreamhost.com (Postfix) with ESMTP id 384B837A06F; Fri, 2 Aug 2013 11:00:26 -0700 (PDT) Received: from redwood.eagercon.com (c-50-148-128-197.hsd1.ca.comcast.net [50.148.128.197]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) (Authenticated sender: eager@eagerm.com) by homiemail-a80.g.dreamhost.com (Postfix) with ESMTPSA id 1ACEC37A065; Fri, 2 Aug 2013 11:00:26 -0700 (PDT) Message-ID: <51FBF3B9.9020008@eagerm.com> Date: Fri, 02 Aug 2013 18:00:00 -0000 From: Michael Eager User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130625 Thunderbird/17.0.7 MIME-Version: 1.0 To: Tom Tromey CC: Keith Seitz , "gdb-patches@sourceware.org ml" Subject: Re: [PATCH] Revised display-linkage-name References: <519D086A.50105@eagerm.com> <51BF47DB.6070709@eagerm.com> <51DD891D.7090009@eagerm.com> <51DF3F97.90805@redhat.com> <51E07263.6080605@eagerm.com> <51E6E797.30709@eagerm.com> <51ED705A.5000601@redhat.com> <51ED90E3.30801@eagerm.com> <51EDAA3A.5090504@redhat.com> <51EFF8F8.6050807@eagerm.com> <874nbhtb80.fsf@fleche.redhat.com> <51F2D975.3060801@eagerm.com> <87bo5lp895.fsf@fleche.redhat.com> <51FAB8BC.2060108@eagerm.com> <874nb9f7vr.fsf@fleche.redhat.com> In-Reply-To: <874nb9f7vr.fsf@fleche.redhat.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2013-08/txt/msg00093.txt.bz2 On 08/01/13 13:55, Tom Tromey wrote: >>>>>> "Michael" == Michael Eager writes: > > Michael> I eliminated the annotations and made the other requested changes. > > Michael> + if (strlen (SYMBOL_LINKAGE_NAME (msymbol.minsym)) > Michael> + > display_linkage_name_length) > Michael> + { > > I think this should also check ui_out_is_mi_like_p. > > Michael> + /* Print linkage name after source name if requested and different. */ > Michael> + if ((display_linkage_name || ui_out_is_mi_like_p (uiout)) > Michael> + && linkname != NULL && strcmp (funname, linkname) != 0) > Michael> + { > Michael> + ui_out_text (uiout, " ["); > Michael> + > Michael> + if (strlen (linkname) > display_linkage_name_length) > Michael> + { > > Here too. > > Michael> + char *lname = alloca (display_linkage_name_length + 4); > Michael> + > Michael> + strncpy (lname, linkname, display_linkage_name_length); > Michael> + lname[display_linkage_name_length] = '\0'; > Michael> + strcat (lname, "..."); > Michael> + ui_out_text (uiout, lname); > > Here you emit it as text... > > Michael> + } > Michael> + else > Michael> + ui_out_field_string (uiout, "linkage name", linkname); > > ... here with a field name with spaces... > > Michael> + > Michael> + ui_out_text (uiout, "]"); > Michael> + ui_out_field_stream (uiout, "linkage_name", stb); > > ... and here with an underscore. Another part of the patch used > "linkage-name", with a hyphen. I think the hyphen one should be > preferred. > > Also, this last bit looks the same as an earlier revision to me. > "stb" simply isn't valid here -- your code isn't printing to it, it was > set up earlier; I'm surprised it is even still live. Thanks. I'll rework the MI stuff. I have no experience/understanding of how this is supposed to work. -- Michael Eager eager@eagercon.com 1960 Park Blvd., Palo Alto, CA 94306 650-325-8077