2005-02-10 Andrew Cagney <cagney@gnu.org>
[deliverable/binutils-gdb.git] / gdb / ocd.c
index 710e4a06c5ec247669d9582102028b01567897ab..3e79a427f20f8efd00e686d4dacfe86eec2763ff 100644 (file)
--- a/gdb/ocd.c
+++ b/gdb/ocd.c
@@ -128,7 +128,7 @@ ocd_error (char *s, int error_code)
       s = buf;
     }
 
-  error ("%s", s);
+  error (("%s"), s);
 }
 
 /*  Return nonzero if the thread TH is still alive on the remote system.  */
@@ -177,13 +177,13 @@ ocd_start_remote (void *dummy)
   p = ocd_get_packet (buf[0], &pktlen, remote_timeout);
 
   if (pktlen < 2)
-    error ("Truncated response packet from OCD device");
+    error (_("Truncated response packet from OCD device"));
 
   status = p[1];
   error_code = p[2];
 
   if (error_code != 0)
-    ocd_error ("OCD_INIT:", error_code);
+    ocd_error (_("OCD_INIT:"), error_code);
 
   ocd_do_command (OCD_AYT, &status, &pktlen);
 
@@ -208,7 +208,7 @@ ocd_start_remote (void *dummy)
   p = ocd_get_packet (buf[0], &pktlen, remote_timeout);
 
   if (pktlen < 2)
-    error ("Truncated response packet from OCD device");
+    error (_("Truncated response packet from OCD device"));
 
   status = p[1];
   error_code = p[2];
@@ -252,8 +252,8 @@ ocd_open (char *name, int from_tty, enum ocd_target_type target_type,
   int pktlen;
 
   if (name == 0)
-    error ("To open an OCD connection, you need to specify the\n\
-device the OCD device is attached to (e.g. /dev/ttya).");
+    error (_("To open an OCD connection, you need to specify the\n\
+device the OCD device is attached to (e.g. /dev/ttya)."));
 
   target_preopen (from_tty);
 
@@ -304,7 +304,7 @@ device the OCD device is attached to (e.g. /dev/ttya).");
                     RETURN_MASK_ALL))
     {
       pop_target ();
-      error ("Failed to connect to OCD.");
+      error (_("Failed to connect to OCD."));
     }
 }
 
@@ -317,7 +317,7 @@ void
 ocd_detach (char *args, int from_tty)
 {
   if (args)
-    error ("Argument given to \"detach\" when remotely debugging.");
+    error (_("Argument given to \"detach\" when remotely debugging."));
 
   pop_target ();
   if (from_tty)
@@ -346,7 +346,7 @@ ocd_stop (void)
   ocd_do_command (OCD_STOP, &status, &pktlen);
 
   if (!(status & OCD_FLAG_BDM))
-    error ("Can't stop target via BDM");
+    error (_("Can't stop target via BDM"));
 }
 
 static volatile int ocd_interrupt_flag;
@@ -435,7 +435,7 @@ ocd_wait (void)
       signal (SIGINT, ofunc);
 
       if (pktlen < 2)
-       error ("Truncated response packet from OCD device");
+       error (_("Truncated response packet from OCD device"));
 
       last_run_status = p[1];
       error_code = p[2];
@@ -444,9 +444,9 @@ ocd_wait (void)
        ocd_error ("target_wait:", error_code);
 
       if (last_run_status & OCD_FLAG_PWF)
-       error ("OCD device lost VCC at BDM interface.");
+       error (_("OCD device lost VCC at BDM interface."));
       else if (last_run_status & OCD_FLAG_CABLE_DISC)
-       error ("OCD device cable appears to have been disconnected.");
+       error (_("OCD device cable appears to have been disconnected."));
     }
 
   if (ocd_interrupt_flag)
@@ -490,7 +490,7 @@ ocd_read_bdm_registers (int first_bdm_regno, int last_bdm_regno, int *reglen)
 
   if (i > pktlen - 4
       || ((i & 3) != 0))
-    error ("Register block size bad:  %d", i);
+    error (_("Register block size bad:  %d"), i);
 
   *reglen = i;
 
@@ -534,7 +534,7 @@ ocd_write_bdm_registers (int first_bdm_regno, unsigned char *regptr, int reglen)
   p = ocd_get_packet (OCD_WRITE_REGS, &pktlen, remote_timeout);
 
   if (pktlen < 3)
-    error ("Truncated response packet from OCD device");
+    error (_("Truncated response packet from OCD device"));
 
   status = p[1];
   error_code = p[2];
@@ -600,7 +600,7 @@ ocd_write_bytes (CORE_ADDR memaddr, char *myaddr, int len)
       ocd_put_packet (buf, 8 + numbytes);
       p = ocd_get_packet (OCD_WRITE_MEM, &pktlen, remote_timeout);
       if (pktlen < 3)
-       error ("Truncated response packet from OCD device");
+       error (_("Truncated response packet from OCD device"));
 
       status = p[1];
       error_code = p[2];
@@ -670,7 +670,7 @@ ocd_read_bytes (CORE_ADDR memaddr, char *myaddr, int len)
       ocd_put_packet (buf, 7);
       p = ocd_get_packet (OCD_READ_MEM, &pktlen, remote_timeout);
       if (pktlen < 4)
-       error ("Truncated response packet from OCD device");
+       error (_("Truncated response packet from OCD device"));
 
       status = p[1];
       error_code = p[2];
@@ -744,7 +744,7 @@ readchar (int timeout)
   switch (ch)
     {
     case SERIAL_EOF:
-      error ("Remote connection closed");
+      error (_("Remote connection closed"));
     case SERIAL_ERROR:
       perror_with_name ("Remote communication error");
     case SERIAL_TIMEOUT:
@@ -807,10 +807,10 @@ ocd_get_packet (int cmd, int *lenp, int timeout)
   ch = readchar (timeout);
 
   if (ch < 0)
-    error ("ocd_get_packet (readchar): %d", ch);
+    error (_("ocd_get_packet (readchar): %d"), ch);
 
   if (ch != 0x55)
-    error ("ocd_get_packet (readchar): %d", ch);
+    error (_("ocd_get_packet (readchar): %d"), ch);
 
 /* Found the start of a packet */
 
@@ -822,7 +822,7 @@ ocd_get_packet (int cmd, int *lenp, int timeout)
   ch = readchar (timeout);
 
   if (ch < 0)
-    error ("ocd_get_packet (readchar): %d", ch);
+    error (_("ocd_get_packet (readchar): %d"), ch);
 
   *packet_ptr++ = ch;
   checksum += ch;
@@ -832,7 +832,7 @@ ocd_get_packet (int cmd, int *lenp, int timeout)
   ch = readchar (timeout);
 
   if (ch < 0)
-    error ("ocd_get_packet (readchar): %d", ch);
+    error (_("ocd_get_packet (readchar): %d"), ch);
   *packet_ptr++ = ch;
   checksum += ch;
 
@@ -841,7 +841,7 @@ ocd_get_packet (int cmd, int *lenp, int timeout)
   ch = readchar (timeout);
 
   if (ch < 0)
-    error ("ocd_get_packet (readchar): %d", ch);
+    error (_("ocd_get_packet (readchar): %d"), ch);
   *packet_ptr++ = ch;
   checksum += ch;
 
@@ -901,7 +901,7 @@ ocd_get_packet (int cmd, int *lenp, int timeout)
          len = 257;
          break;
        default:
-         error ("ocd_get_packet: unknown packet type 0x%x\n", ch);
+         error (_("ocd_get_packet: unknown packet type 0x%x."), ch);
        }
     }
 
@@ -910,7 +910,7 @@ ocd_get_packet (int cmd, int *lenp, int timeout)
       ch = readchar (timeout);
 
       if (ch < 0)
-       error ("ocd_get_packet (readchar): %d", ch);
+       error (_("ocd_get_packet (readchar): %d"), ch);
       *packet_ptr++ = ch;
       checksum += ch;
       len = ch;
@@ -923,16 +923,16 @@ ocd_get_packet (int cmd, int *lenp, int timeout)
       ch = readchar (timeout);
 
       if (ch < 0)
-       error ("ocd_get_packet (readchar): %d", ch);
+       error (_("ocd_get_packet (readchar): %d"), ch);
       *packet_ptr++ = ch;
       checksum += ch;
     }
 
   if (checksum != 0)
-    error ("ocd_get_packet: bad packet checksum");
+    error (_("ocd_get_packet: bad packet checksum"));
 
   if (cmd != -1 && cmd != packet[0])
-    error ("Response phase error.  Got 0x%x, expected 0x%x", packet[0], cmd);
+    error (_("Response phase error.  Got 0x%x, expected 0x%x"), packet[0], cmd);
 
   *lenp = packet_ptr - packet - 1;     /* Subtract checksum byte */
   return packet;
@@ -956,7 +956,7 @@ ocd_do_command (int cmd, int *statusp, int *lenp)
   p = ocd_get_packet (*buf, lenp, remote_timeout);
 
   if (*lenp < 3)
-    error ("Truncated response packet from OCD device");
+    error (_("Truncated response packet from OCD device"));
 
   status = p[1];
   error_code = p[2];
@@ -968,9 +968,9 @@ ocd_do_command (int cmd, int *statusp, int *lenp)
     }
 
   if (status & OCD_FLAG_PWF)
-    error ("OCD device can't detect VCC at BDM interface.");
+    error (_("OCD device can't detect VCC at BDM interface."));
   else if (status & OCD_FLAG_CABLE_DISC)
-    error ("BDM cable appears to be disconnected.");
+    error (_("BDM cable appears to be disconnected."));
 
   *statusp = status;
 
@@ -1018,7 +1018,7 @@ void
 ocd_create_inferior (char *exec_file, char *args, char **env, int from_tty)
 {
   if (args && (*args != '\000'))
-    error ("Args are not supported by BDM.");
+    error (_("Args are not supported by BDM."));
 
   clear_proceed_status ();
   proceed (bfd_get_start_address (exec_bfd), TARGET_SIGNAL_0, 0);
@@ -1076,7 +1076,7 @@ ocd_remove_breakpoint (CORE_ADDR addr, char *contents_cache)
 static void
 bdm_command (char *args, int from_tty)
 {
-  error ("bdm command must be followed by `reset'");
+  error (_("bdm command must be followed by `reset'"));
 }
 
 static void
@@ -1085,7 +1085,7 @@ bdm_reset_command (char *args, int from_tty)
   int status, pktlen;
 
   if (!ocd_desc)
-    error ("Not connected to OCD device.");
+    error (_("Not connected to OCD device."));
 
   ocd_do_command (OCD_RESET, &status, &pktlen);
   dcache_invalidate (target_dcache);
@@ -1098,7 +1098,7 @@ bdm_restart_command (char *args, int from_tty)
   int status, pktlen;
 
   if (!ocd_desc)
-    error ("Not connected to OCD device.");
+    error (_("Not connected to OCD device."));
 
   ocd_do_command (OCD_RESET_RUN, &status, &pktlen);
   last_run_status = status;
@@ -1123,10 +1123,10 @@ bdm_update_flash_command (char *args, int from_tty)
   void (*store_registers_tmp) (int);
 
   if (!ocd_desc)
-    error ("Not connected to OCD device.");
+    error (_("Not connected to OCD device."));
 
   if (!args)
-    error ("Must specify file containing new OCD code.");
+    error (_("Must specify file containing new OCD code."));
 
 /*  old_chain = make_cleanup (flash_cleanup, 0); */
 
This page took 0.027604 seconds and 4 git commands to generate.