Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Paul Pluzhnikov <ppluzhnikov@google.com>
To: Eli Zaretskii <eliz@gnu.org>
Cc: msnyder@vmware.com, gdb-patches@sourceware.org
Subject: Re: [RFA] [patch] 'info symbol' to print more info
Date: Sun, 16 Nov 2008 01:38:00 -0000	[thread overview]
Message-ID: <8ac60eac0811151022w13df6899v13bb321ee08aae09@mail.gmail.com> (raw)
In-Reply-To: <uskpsnb17.fsf@gnu.org>

On Sat, Nov 15, 2008 at 9:39 AM, Eli Zaretskii <eliz@gnu.org> wrote:

> 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)));


I did this; there are only 3 if/then/else cases ...

>
>>         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.

But here, the message is already built up from 3 separate conditions,
and I am adding one more. What you are proposing then leads to a
chain of 16 if/then/else clauses. I don't think that's really
appropriate ...

>> +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.

Done.

Thanks,
-- 
Paul Pluzhnikov


  reply	other threads:[~2008-11-15 18:23 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-11-15 16:15 Paul Pluzhnikov
2008-11-15 17:00 ` Michael Snyder
2008-11-15 17:22   ` Paul Pluzhnikov
2008-11-15 18:51     ` Michael Snyder
2008-11-15 23:16       ` Paul Pluzhnikov
2008-11-15 23:35         ` Andreas Schwab
2008-11-16  1:35         ` Eli Zaretskii
2008-11-16  1:38           ` Paul Pluzhnikov [this message]
2008-11-16  8:20             ` Joel Brobecker
2008-11-17 22:37               ` Paul Pluzhnikov
2008-11-17 23:35                 ` Daniel Jacobowitz
2008-11-18 16:07                   ` Paul Pluzhnikov
2008-11-18 19:55                     ` Eli Zaretskii
2008-11-19  4:20                     ` Joel Brobecker
2008-11-19 12:45                       ` Paul Pluzhnikov
2008-11-15 17:40 ` Eli Zaretskii

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=8ac60eac0811151022w13df6899v13bb321ee08aae09@mail.gmail.com \
    --to=ppluzhnikov@google.com \
    --cc=eliz@gnu.org \
    --cc=gdb-patches@sourceware.org \
    --cc=msnyder@vmware.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox