From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10977 invoked by alias); 15 Nov 2008 17:40:30 -0000 Received: (qmail 10919 invoked by uid 22791); 15 Nov 2008 17:40:28 -0000 X-Spam-Check-By: sourceware.org Received: from mtaout2.012.net.il (HELO mtaout2.012.net.il) (84.95.2.4) by sourceware.org (qpsmtpd/0.31) with ESMTP; Sat, 15 Nov 2008 17:39:49 +0000 Received: from conversion-daemon.i_mtaout2.012.net.il by i_mtaout2.012.net.il (HyperSendmail v2004.12) id <0KAD00600YHAGC00@i_mtaout2.012.net.il> for gdb-patches@sourceware.org; Sat, 15 Nov 2008 19:41:39 +0200 (IST) Received: from HOME-C4E4A596F7 ([77.126.205.49]) by i_mtaout2.012.net.il (HyperSendmail v2004.12) with ESMTPA id <0KAD004C7YHF0Z50@i_mtaout2.012.net.il>; Sat, 15 Nov 2008 19:41:39 +0200 (IST) Date: Sun, 16 Nov 2008 01:35:00 -0000 From: Eli Zaretskii Subject: Re: [RFA] [patch] 'info symbol' to print more info In-reply-to: <8ac60eac0811150842x78206050t435c6f8c89ddc8ae@mail.gmail.com> X-012-Sender: halo1@inter.net.il To: Paul Pluzhnikov Cc: msnyder@vmware.com, gdb-patches@sourceware.org Reply-to: Eli Zaretskii Message-id: References: <20081114204617.A4A533A6B15@localhost> <491DF12A.5090903@vmware.com> <8ac60eac0811141406h4bb126c0sbd898e7d612f46dd@mail.gmail.com> <491E08BF.2050609@vmware.com> <8ac60eac0811150842x78206050t435c6f8c89ddc8ae@mail.gmail.com> X-IsSubscribed: yes 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 X-SW-Source: 2008-11/txt/msg00392.txt.bz2 > Date: Sat, 15 Nov 2008 08:42:12 -0800 > From: Paul Pluzhnikov > Cc: "gdb-patches@sourceware.org" > > On Fri, Nov 14, 2008 at 2:54 PM, Eli Zaretskii wrote: > > > Please also fix the places in the > > manual where these two commands are described. > > Done. Ok to commit? Yes, but please fix a minor gotcha I point out below. > + printf_filtered ("%s + %s", > + SYMBOL_PRINT_NAME (sym), > + pulongest (address - SYMBOL_VALUE_ADDRESS (sym))); > + if ((sect = SYMBOL_OBJ_SECTION(sym))) > + { > + printf_filtered (_(" in section %s"), sect->the_bfd_section->name); > + if (MULTI_OBJFILE_P () > + && sect->objfile && sect->objfile->name) > + printf_filtered (_(" of %s"), sect->objfile->name); > + } > + printf_filtered (_("\n")); > + } This partition of a phrase into fragments means trouble for translators. Not every language can break the sentence "foo + NNN in section .text of foobar.o" into exactly these 3 parts, like you can in English. In addition, translating each part without seeing the whole sentence is very difficult. So please rewrite this part to not break the sentence, something like this: if ((sect = SYMBOL_OBJ_SECTION (sym)) && MULTI_OBJFILE_P () && sect->objfile && sect->objfile->name) printf_filtered ("%s + %s in section %s of %s\n", SYMBOL_PRINT_NAME (sym), pulongest (address - SYMBOL_VALUE_ADDRESS (sym)), sect->the_bfd_section->name, sect->objfile->name); else if ((sect = SYMBOL_OBJ_SECTION (sym)) printf_filtered ("%s + %s in section %s\n", SYMBOL_PRINT_NAME (sym), pulongest (address - SYMBOL_VALUE_ADDRESS (sym)), sect->the_bfd_section->name); else printf_filtered ("%s + %s\n", SYMBOL_PRINT_NAME (sym), pulongest (address - SYMBOL_VALUE_ADDRESS (sym))); > printf_filtered (_("%s overlay "), > section_is_mapped (osect) ? "mapped" : "unmapped"); > printf_filtered (_("section %s"), osect->the_bfd_section->name); > + if (MULTI_OBJFILE_P () > + && osect->objfile && osect->objfile->name) > + printf_filtered (_(" of %s"), osect->objfile->name); > printf_filtered ("\n"); Same here. > +If section was not specified, the section in which the symbol was found > +is also printed. For dynamically linked executables, the name of ^^ Two spaces after a period that ends a sentence, please.