gdb/
[deliverable/binutils-gdb.git] / gdb / common / agent.c
index 5c908229043d3c22fb49b2e645633a01b5ab07e8..43f1b65e78145ac4a6c42257d5eab24c8d5d0152 100644 (file)
@@ -135,7 +135,7 @@ agent_get_helper_thread_id (void)
       else
 #endif
        {
-         warning ("Error reading helper thread's id in lib");
+         warning (_("Error reading helper thread's id in lib"));
        }
     }
 
@@ -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;
     }
@@ -208,12 +208,11 @@ gdb_connect_sync_socket (int pid)
    socket.  Return zero if success, otherwise return non-zero.  */
 
 int
-agent_run_command (int pid, const char *cmd)
+agent_run_command (int pid, const char *cmd, int len)
 {
   int fd;
   int tid = agent_get_helper_thread_id ();
   ptid_t ptid = ptid_build (pid, tid, 0);
-  int len = strlen (cmd) + 1;
 
 #ifdef GDBSERVER
   int ret = write_inferior_memory (ipa_sym_addrs.addr_cmd_buf,
@@ -224,7 +223,7 @@ agent_run_command (int pid, const char *cmd)
 
   if (ret != 0)
     {
-      warning ("unable to write");
+      warning (_("unable to write"));
       return -1;
     }
 
@@ -237,11 +236,11 @@ agent_run_command (int pid, const char *cmd)
 
   resume_info.thread = ptid;
   resume_info.kind = resume_continue;
-  resume_info.sig = TARGET_SIGNAL_0;
+  resume_info.sig = GDB_SIGNAL_0;
   (*the_target->resume) (&resume_info, 1);
 }
 #else
- target_resume (ptid, 0, TARGET_SIGNAL_0);
+ target_resume (ptid, 0, GDB_SIGNAL_0);
 #endif
 
   fd = gdb_connect_sync_socket (pid);
@@ -284,7 +283,7 @@ agent_run_command (int pid, const char *cmd)
 
        resume_info.thread = ptid;
        resume_info.kind = resume_stop;
-       resume_info.sig = TARGET_SIGNAL_0;
+       resume_info.sig = GDB_SIGNAL_0;
        (*the_target->resume) (&resume_info, 1);
       }
 
@@ -310,7 +309,7 @@ agent_run_command (int pid, const char *cmd)
                              IPA_CMD_BUF_SIZE))
 #endif
        {
-         warning ("Error reading command response");
+         warning (_("Error reading command response"));
          return -1;
        }
     }
@@ -342,7 +341,7 @@ agent_capability_check (enum agent_capa agent_capa)
                                                     byte_order);
       else
 #endif
-       warning ("Error reading capability of agent");
+       warning (_("Error reading capability of agent"));
     }
   return agent_capability & agent_capa;
 }
This page took 0.026948 seconds and 4 git commands to generate.