From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19653 invoked by alias); 15 May 2014 10:07:49 -0000 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 Received: (qmail 19639 invoked by uid 89); 15 May 2014 10:07:48 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.0 required=5.0 tests=AWL,BAYES_00,MSGID_MULTIPLE_AT autolearn=no version=3.3.2 X-HELO: mailhost.u-strasbg.fr Received: from mailhost.u-strasbg.fr (HELO mailhost.u-strasbg.fr) (130.79.222.217) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 15 May 2014 10:07:47 +0000 Received: from mailhost.u-strasbg.fr (localhost [127.0.0.1]) by antispam (Postfix) with ESMTP id D121621E56; Thu, 15 May 2014 12:07:43 +0200 (CEST) Received: from mailhost.u-strasbg.fr (localhost [127.0.0.1]) by antivirus (Postfix) with ESMTP id C162421E53; Thu, 15 May 2014 12:07:43 +0200 (CEST) Received: from md16.u-strasbg.fr (md16.u-strasbg.fr [130.79.200.206]) by mr7.u-strasbg.fr (Postfix) with ESMTP id 4CDB421E56; Thu, 15 May 2014 12:07:38 +0200 (CEST) Received: from ms12.u-strasbg.fr (ms12.u-strasbg.fr [130.79.204.112]) by md16.u-strasbg.fr (8.14.3/jtpda-5.5pre1) with ESMTP id s4FA7bbU020329 ; Thu, 15 May 2014 12:07:37 +0200 (envelope-from pierre.muller@ics-cnrs.unistra.fr) Received: from E6510Muller (gw-ics.u-strasbg.fr [130.79.210.225]) (Authenticated sender: mullerp) by ms12.u-strasbg.fr (Postfix) with ESMTPSA id CAD2E1FD92; Thu, 15 May 2014 12:07:32 +0200 (CEST) From: "Pierre Muller" To: , Cc: , , References: <20140514110742.GA25550@blade.nx> <1B70C5D6-D845-4F9A-A874-63DF77FB9030@dell.com> In-Reply-To: <1B70C5D6-D845-4F9A-A874-63DF77FB9030@dell.com> Subject: RE: [PATCH] Prompt user to report bugs Date: Thu, 15 May 2014 10:07:00 -0000 Message-ID: <01d401cf7025$7f3f4ef0$7dbdecd0$@muller@ics-cnrs.unistra.fr> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable X-SW-Source: 2014-05/txt/msg00222.txt.bz2 > -----Message d'origine----- > De=A0: gdb-patches-owner@sourceware.org [mailto:gdb-patches- > owner@sourceware.org] De la part de Paul_Koning@Dell.com > Envoy=E9=A0: mercredi 14 mai 2014 23:11 > =C0=A0: dje@google.com > Cc=A0: gbenson@redhat.com; gdb-patches@sourceware.org; tromey@redhat.com > Objet=A0: Re: [PATCH] Prompt user to report bugs >=20 >=20 > On May 14, 2014, at 5:05 PM, Doug Evans wrote: >=20 > > On Wed, May 14, 2014 at 4:07 AM, Gary Benson > 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 > >> > >> * 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 =3D=3D 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. >=20 >=20 > It also seems odd to see =93%s.=94 inside _( ) since there=92s 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