From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6599 invoked by alias); 4 Mar 2012 03:29:31 -0000 Received: (qmail 6586 invoked by uid 22791); 4 Mar 2012 03:29:30 -0000 X-SWARE-Spam-Status: No, hits=-1.4 required=5.0 tests=AWL,BAYES_00,TW_XS X-Spam-Check-By: sourceware.org Received: from relay1.mentorg.com (HELO relay1.mentorg.com) (192.94.38.131) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sun, 04 Mar 2012 03:29:17 +0000 Received: from svr-orw-exc-10.mgc.mentorg.com ([147.34.98.58]) by relay1.mentorg.com with esmtp id 1S428K-0000Pn-IE from Yao_Qi@mentor.com for gdb-patches@sourceware.org; Sat, 03 Mar 2012 19:29:16 -0800 Received: from SVR-ORW-FEM-02.mgc.mentorg.com ([147.34.96.206]) by SVR-ORW-EXC-10.mgc.mentorg.com with Microsoft SMTPSVC(6.0.3790.4675); Sat, 3 Mar 2012 19:28:30 -0800 Received: from [127.0.0.1] (147.34.91.1) by svr-orw-fem-02.mgc.mentorg.com (147.34.96.168) with Microsoft SMTP Server id 14.1.289.1; Sat, 3 Mar 2012 19:29:15 -0800 Message-ID: <4F52E18A.3050201@codesourcery.com> Date: Sun, 04 Mar 2012 03:29:00 -0000 From: Yao Qi User-Agent: Mozilla/5.0 (X11; Linux i686; rv:10.0.2) Gecko/20120216 Thunderbird/10.0.2 MIME-Version: 1.0 To: Subject: Re: New ARI warning Sun Mar 4 01:53:53 UTC 2012 References: <20120304015353.GA4975@sourceware.org> In-Reply-To: <20120304015353.GA4975@sourceware.org> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8bit X-IsSubscribed: yes 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 X-SW-Source: 2012-03/txt/msg00124.txt.bz2 On 03/04/2012 09:53 AM, GDB Administrator wrote: > 114a115,123 >> gdb/common/agent.c:138: gettext: _ markup: All messages should be marked up with _. > gdb/common/agent.c:138: warning ("Error reading helper thread's id in lib"); >> gdb/common/agent.c:174: gettext: _ markup: All messages should be marked up with _. > gdb/common/agent.c:174: warning ("error opening sync socket: %s\n", strerror (errno)); >> gdb/common/agent.c:183: gettext: _ markup: All messages should be marked up with _. > gdb/common/agent.c:183: warning ("string overflow allocating socket name\n"); >> gdb/common/agent.c:191: gettext: _ markup: All messages should be marked up with _. > gdb/common/agent.c:191: warning ("error connecting sync socket (%s): %s. " >> gdb/common/agent.c:227: gettext: _ markup: All messages should be marked up with _. > gdb/common/agent.c:227: warning ("unable to write"); >> gdb/common/agent.c:313: gettext: _ markup: All messages should be marked up with _. > gdb/common/agent.c:313: warning ("Error reading command response"); >> gdb/common/agent.c:345: gettext: _ markup: All messages should be marked up with _. > gdb/common/agent.c:345: warning ("Error reading capability of agent"); > 784a794 The patch below is to add _ marker and remove trailing new line. Committed as obvious. >> gdb/remote.c:10757: code: sprintf: Do not use sprintf, instead use xsnprintf or xstrprintf > gdb/remote.c:10757: sprintf (rs->buf, ', use); Looks like sprintf has been widely used in gdb/remote.c, so I'll give a separate fix. > gdb/common/agent.c:174: warning (', strerror (errno)); >> gdb/common/agent.c:174: regression: strerror: Do not use strerror(), instead use safe_strerror() > gdb/common/agent.c:174: warning ("error opening sync socket: %s\n", strerror (errno)); > gdb/common/agent.c:174: warning (', strerror (errno)); >> gdb/common/agent.c:193: regression: strerror: Do not use strerror(), instead use safe_strerror() > gdb/common/agent.c:193: path, strerror (errno)); We don't have a safe_strerror in GDBserver, so I am inclined to wrap strerror by safe_strerror in GDBserver. -- Yao (齐尧) * common/agent.c (gdb_connect_sync_socket): Add _ markup and remove trailing new line. (agent_run_command, agent_run_command): Add _ markup. (agent_capability_check): Likewise. Index: gdb/common/agent.c =================================================================== RCS file: /cvs/src/src/gdb/common/agent.c,v retrieving revision 1.5 diff -u -p -r1.5 agent.c --- gdb/common/agent.c 3 Mar 2012 09:51:28 -0000 1.5 +++ gdb/common/agent.c 4 Mar 2012 03:11:47 -0000 @@ -135,7 +135,7 @@ agent_get_helper_thread_id (void) else } } @@ -171,7 +171,7 @@ gdb_connect_sync_socket (int pid) res = fd = socket (PF_UNIX, SOCK_STREAM, 0); if (res == -1) { - warning ("error opening sync socket: %s\n", strerror (errno)); + warning (_("error opening sync socket: %s"), strerror (errno)); return -1; } @@ -180,7 +180,7 @@ gdb_connect_sync_socket (int pid) res = xsnprintf (addr.sun_path, UNIX_PATH_MAX, "%s", path); if (res >= UNIX_PATH_MAX) { - warning ("string overflow allocating socket name\n"); + warning (_("string overflow allocating socket name")); close (fd); return -1; } @@ -188,9 +188,9 @@ gdb_connect_sync_socket (int pid) res = connect (fd, (struct sockaddr *) &addr, sizeof (addr)); if (res == -1) { - warning ("error connecting sync socket (%s): %s. " - "Make sure the directory exists and that it is writable.", - path, strerror (errno)); + warning (_("error connecting sync socket (%s): %s. " + "Make sure the directory exists and that it is writable."), + path, strerror (errno)); close (fd); return -1; } @@ -224,7 +224,7 @@ agent_run_command (int pid, const char * if (ret != 0) { - warning ("unable to write"); + warning (_("unable to write")); return -1; } @@ -310,7 +310,7 @@ agent_run_command (int pid, const char * IPA_CMD_BUF_SIZE)) #endif { - warning ("Error reading command response"); + warning (_("Error reading command response")); return -1; } } @@ -342,7 +342,7 @@ agent_capability_check (enum agent_capa byte_order); else #endif - warning ("Error reading capability of agent"); + warning (_("Error reading capability of agent")); } return agent_capability & agent_capa; }