This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
RE: [PATCH] Prompt user to report bugs
- From: "Pierre Muller" <pierre dot muller at ics-cnrs dot unistra dot fr>
- To: <Paul_Koning at Dell dot com>, <dje at google dot com>
- Cc: <gbenson at redhat dot com>, <gdb-patches at sourceware dot org>, <tromey at redhat dot com>
- Date: Thu, 15 May 2014 12:07:32 +0200
- Subject: RE: [PATCH] Prompt user to report bugs
- Authentication-results: sourceware.org; auth=none
- References: <20140514110742 dot GA25550 at blade dot nx> <CADPb22T0DvL237NkheQ1h0onABvTPUKkXXxZu2Uzh3WdpSbgVA at mail dot gmail dot com> <1B70C5D6-D845-4F9A-A874-63DF77FB9030 at dell dot com>
> -----Message d'origine-----
> De : gdb-patches-owner@sourceware.org [mailto:gdb-patches-
> owner@sourceware.org] De la part de Paul_Koning@Dell.com
> Envoyé : mercredi 14 mai 2014 23:11
> À : dje@google.com
> Cc : gbenson@redhat.com; gdb-patches@sourceware.org; tromey@redhat.com
> Objet : Re: [PATCH] Prompt user to report bugs
>
>
> On May 14, 2014, at 5:05 PM, Doug Evans <dje@google.com> wrote:
>
> > On Wed, May 14, 2014 at 4:07 AM, Gary Benson <gbenson@redhat.com>
> wrote:
> >> Hi all,
> >>
> >> This patch prints a couple of extra lines in internal_vproblem
> >> to prompt the user to report the bug that's just happened.
> >>
> >> Ok to commit?
> >>
> >> Thanks,
> >> Gary
> >>
> >> --
> >> 2014-05-14 Gary Benson <gbenson@redhat.com>
> >>
> >> * utils.c (internal_vproblem): Prompt the user to file a
> report.
> >>
> >> diff --git a/gdb/utils.c b/gdb/utils.c
> >> index a8a7cb3..905ce6d 100644
> >> --- a/gdb/utils.c
> >> +++ b/gdb/utils.c
> >> @@ -746,6 +746,14 @@ internal_vproblem (struct internal_problem
> *problem,
> >> else
> >> internal_error (__FILE__, __LINE__, _("bad switch"));
> >>
> >> + fputs_unfiltered (_("\nThis is a bug, please report it."),
> gdb_stderr);
> >> + if (REPORT_BUGS_TO[0])
> >> + {
> >> + fputs_unfiltered (_(" For instructions, see:\n"),
> gdb_stderr);
> >> + fprintf_unfiltered (gdb_stderr, _("%s."), REPORT_BUGS_TO);
> >> + }
> >> + fputs_unfiltered ("\n\n", gdb_stderr);
> >> +
> >> if (problem->should_dump_core == internal_problem_ask)
> >> {
> >> if (!can_dump_core (reason))
> >>
> >
> > top.c doesn't wrap "%s." in _().
> > I don't know if it matters, it's just odd to see "%s." wrapped.
>
>
> It also seems odd to see ?%s.? inside _( ) since there?s nothing to
> translate there.
I suspect that the main reason is that
otherwise you would generate a new ARI warning
about missing _()...
Of course, you are right that _() around "%s." is useless,
but this, on the other hand seems to indicate that,
while the " For instructions, see: "
might become " Pour les instructions, voir : " in French,
the next part REPORT_BUGS_TO
will not get translated at all...
OK, presently this is a simple URL link...
but we might choose one day to do localized versions of that bug report page
so why not simply use
+ fputs_unfiltered (_("\nThis is a bug, please report it"), gdb_stderr);
+ if (REPORT_BUGS_TO[0])
+ {
+ fputs_unfiltered (_(". For instructions, see:\n"), gdb_stderr);
+ fprintf_unfiltered (gdb_stderr, _(REPORT_BUGS_TO));
+ }
+ fputs_unfiltered (".\n\n", gdb_stderr);
To allow for possible localization of the URL page?
Pierre Muller