This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: New ARI warning Sun Mar 4 01:53:53 UTC 2012


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;
 }


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]