Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Siva Chandra <sivachandra@google.com>
To: gdb-patches@sourceware.org
Subject: Re: [RFC] Fix for gdb.parameter('architecture') returning empty string
Date: Mon, 22 Oct 2012 07:16:00 -0000	[thread overview]
Message-ID: <CAGyQ6gzR32eyOPr7q4hUZL7D=Lgj=o6v4TfYsmXODNbV2AAc2w@mail.gmail.com> (raw)
In-Reply-To: <CAGyQ6gwPY9h-KdzaCSQZtqsPX9F9STnseXGG=YPiSiLu-T2MbQ@mail.gmail.com>

PING

On Sun, Oct 14, 2012 at 1:36 AM, Siva Chandra <sivachandra@google.com> wrote:
> Based on Andreas Schwab's feedback, I am now printing 'big' and
> 'little' explicitly.
>
> 2012-10-14  Siva Chandra Reddy  <sivachandra@google.com>
>
>         * arch-utils.c: Rename variables 'set_endian_string' and
>         'set_architecture_string' to 'endian_string' and
>         'architecture_string' respectively.
>         (show_endian): Use 'endian_string' instead of evaluating the
>         endianness from the current architecture.
>         (show_architecture): Use 'architecture_string' instead of
>         evaluating the architecture name from the current architecture.
>         (set_endian, _initialize_gdbarch_utils): Use the new
>         'endian_string' variable.
>         (selected_architecture_name, set_architecture): Use the new
>         'architecture_string' variable.
>         (set_endian_string): New convenience function to set
>         'endian_string'.
>         (on_architecture_change): Callback for the architecture change
>         event.
>         (initialize_current_architecture): Initialize
>         'architecture_string' and 'endian_string'. Attach the callback
>         on_architecture_change to the architecture change observer.
>
> testsuite/
>
> 2012-10-14  Siva Chandra Reddy  <sivachandra@google.com>
>
>         gdb.python/py-parameter.exp: Add a new test to test
>         gdb.parameter ('endian').
>
> Thanks,
> Siva Chandra
>
> On Sun, Oct 14, 2012 at 12:53 AM, Andreas Schwab <schwab@linux-m68k.org> wrote:
>> Siva Chandra <sivachandra@google.com> writes:
>>
>>> @@ -274,19 +275,13 @@ show_endian (struct ui_file *file, int f
>>>            const char *value)
>>>  {
>>>    if (target_byte_order_user == BFD_ENDIAN_UNKNOWN)
>>> -    if (gdbarch_byte_order (get_current_arch ()) == BFD_ENDIAN_BIG)
>>>        fprintf_unfiltered (file, _("The target endianness is set automatically "
>>> -                               "(currently big endian)\n"));
>>> -    else
>>> -      fprintf_unfiltered (file, _("The target endianness is set automatically "
>>> -                               "(currently little endian)\n"));
>>> +                               "(currently %s endian)\n"),
>>> +                          endian_string);
>>>    else
>>> -    if (target_byte_order_user == BFD_ENDIAN_BIG)
>>> -      fprintf_unfiltered (file,
>>> -                       _("The target is assumed to be big endian\n"));
>>> -    else
>>>        fprintf_unfiltered (file,
>>> -                       _("The target is assumed to be little endian\n"));
>>> +                       _("The target is assumed to be %s endian\n"),
>>> +                          endian_string);
>>
>> This is bad for i18n, since big/little can no longer be translated.
>>
>> Andreas.
>>
>> --
>> Andreas Schwab, schwab@linux-m68k.org
>> GPG Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
>> "And now for something completely different."


  reply	other threads:[~2012-10-22  7:16 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-10-13 23:43 Siva Chandra
2012-10-14  7:53 ` Andreas Schwab
2012-10-14  8:37   ` Siva Chandra
2012-10-22  7:16     ` Siva Chandra [this message]
2012-11-01 20:19 ` Tom Tromey
2012-11-02 13:44   ` Siva Chandra
2012-11-02 16:59     ` Tom Tromey
2012-11-02 18:45       ` Siva Chandra
2012-11-02 19:52         ` Tom Tromey
2012-11-05 10:39         ` Phil Muldoon

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='CAGyQ6gzR32eyOPr7q4hUZL7D=Lgj=o6v4TfYsmXODNbV2AAc2w@mail.gmail.com' \
    --to=sivachandra@google.com \
    --cc=gdb-patches@sourceware.org \
    /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