From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12311 invoked by alias); 1 Aug 2013 20:56:03 -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 12251 invoked by uid 89); 1 Aug 2013 20:56:02 -0000 X-Spam-SWARE-Status: No, score=-4.5 required=5.0 tests=AWL,BAYES_00,KAM_STOCKGEN,RCVD_IN_HOSTKARMA_W,RCVD_IN_HOSTKARMA_WL,RDNS_NONE,SPF_HELO_PASS,SPF_PASS autolearn=no version=3.3.1 Received: from Unknown (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.84/v0.84-167-ge50287c) with ESMTP; Thu, 01 Aug 2013 20:56:02 +0000 Received: from int-mx12.intmail.prod.int.phx2.redhat.com (int-mx12.intmail.prod.int.phx2.redhat.com [10.5.11.25]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r71KtsLw015300 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Thu, 1 Aug 2013 16:55:54 -0400 Received: from barimba (ovpn-113-128.phx2.redhat.com [10.3.113.128]) by int-mx12.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id r71KtquC009225 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NO); Thu, 1 Aug 2013 16:55:53 -0400 From: Tom Tromey To: Michael Eager 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> Date: Thu, 01 Aug 2013 20:56:00 -0000 In-Reply-To: <51FAB8BC.2060108@eagerm.com> (Michael Eager's message of "Thu, 01 Aug 2013 12:36:28 -0700") Message-ID: <874nb9f7vr.fsf@fleche.redhat.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-SW-Source: 2013-08/txt/msg00048.txt.bz2 >>>>> "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. Tom