Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: "Andrew Burgess" <aburgess@broadcom.com>
To: gdb-patches@sourceware.org
Cc: "Pedro Alves" <palves@redhat.com>
Subject: Re: [PATCH 2/4] Remove deprecated_throw_reason from mips_error.
Date: Wed, 31 Jul 2013 15:37:00 -0000	[thread overview]
Message-ID: <51F92F47.70609@broadcom.com> (raw)
In-Reply-To: <51F922B6.4090200@redhat.com>

On 31/07/2013 3:44 PM, Pedro Alves wrote:
> On 07/31/2013 01:35 PM, Andrew Burgess wrote:
>> On 30/07/2013 8:14 PM, Pedro Alves wrote:
>>
>>> I'd suggest removing or merging the earlier printf_unfiltered with
>>> the error message, they're a bit redundant, and having the text
>>> in the error is better in that a frontend usually displays errors
>>> in a special way (a messagebox or some such), while console prints
>>> end up hidden in the console...
>>
>> So, following the advice in your second paragraph I've got a new patch
>> below, given that it's totally different to the first I'm reposting for
>> a review before committing.
> 
> Thanks.
> 
>> The only testing I've done of this code is to compile it
>> (--enable-targets=all), then add in a fake call to mips_error
>> and check that the output looks reasonable.
> 
> I think that's good enough.  One would hope that whoever still uses
> this target tests it routinely.
> 
>> I've removed the use of error_pre_print given that all the output
>> is now passing through throw_verror, I assume that does the "correct"
>> thing, though interestingly I notice that error_pre_print, and
>> quit_pre_print are no longer used anywhere after this patch....
> 
> Interesting.  Time to garbage collect them, then.
> 
>> -  deprecated_throw_reason (RETURN_ERROR);
>> +  status = asprintf (&fmt, "Ending remote MIPS debugging: %s", string);
> 
> Can you add i18n/_(), while at it?
> 
> Don't use asprintf, use xstrprintf instead.  (The ARI would complain).
> But, this is just concatenating the strings, so:
> 
>  fmt = concat (_("Ending remote MIPS debugging: "),
> 	       string, (char *) NULL);
>  make_cleanup (xfree, fmt);
> 
> ... is even simpler.  concat never returns NULL.
> 
> OK with that change.

Committed with the changes you requested.

Thanks,
Andrew




  reply	other threads:[~2013-07-31 15:37 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-07-30 16:09 [PATCH 0/4] Remove deprecated_throw_reason Andrew Burgess
2013-07-30 16:10 ` [PATCH 1/4] Remove deprecated_throw_reason from internal_verror Andrew Burgess
2013-07-30 19:08   ` Pedro Alves
2013-07-31 10:52     ` Andrew Burgess
2013-07-30 16:11 ` [PATCH 2/4] Remove deprecated_throw_reason from mips_error Andrew Burgess
2013-07-30 19:14   ` Pedro Alves
2013-07-31 12:37     ` Andrew Burgess
2013-07-31 14:44       ` Pedro Alves
2013-07-31 15:37         ` Andrew Burgess [this message]
2013-07-30 16:12 ` [PATCH 3/4] Remove remaining uses of deprecated_throw_reason Andrew Burgess
2013-07-30 19:21   ` Pedro Alves
2013-07-31 12:45     ` Andrew Burgess
2013-07-30 16:13 ` [PATCH 4/4] Remove deprecated_throw_reason Andrew Burgess
2013-07-30 19:22   ` Pedro Alves
2013-07-31 15:45     ` Andrew Burgess

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=51F92F47.70609@broadcom.com \
    --to=aburgess@broadcom.com \
    --cc=gdb-patches@sourceware.org \
    --cc=palves@redhat.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