* m32c-desc.c: Regenerated.
[deliverable/binutils-gdb.git] / gdb / remote-e7000.c
index 6c4cdf006de8b6bbe6041dc531313cba41c8667d..aa430e6eda2fa5c85f570fe89894b7d1b6ad5942 100644 (file)
@@ -788,7 +788,7 @@ fetch_regs_from_dump (int (*nextchar) (), char *want)
   int thischar = nextchar ();
 
   if (want == NULL)
-    internal_error (__FILE__, __LINE__, "Register set not selected.");
+    internal_error (__FILE__, __LINE__, _("Register set not selected."));
 
   while (*want)
     {
@@ -877,7 +877,7 @@ fetch_regs_from_dump (int (*nextchar) (), char *want)
                }
 
              else
-               internal_error (__FILE__, __LINE__, "failed internal consistency check");
+               internal_error (__FILE__, __LINE__, _("failed internal consistency check"));
            }
          store_signed_integer (buf,
                                register_size (current_gdbarch, regno),
@@ -893,12 +893,14 @@ e7000_fetch_registers (void)
 {
   int regno;
   char *wanted = NULL;
+  int realregs = 0;
 
   puts_e7000debug ("R\r");
 
   if (TARGET_ARCHITECTURE->arch == bfd_arch_sh)
     {
       wanted = want_sh;
+      realregs = 59;
       switch (TARGET_ARCHITECTURE->mach)
        {
        case bfd_mach_sh3:
@@ -910,6 +912,7 @@ e7000_fetch_registers (void)
   if (TARGET_ARCHITECTURE->arch == bfd_arch_h8300)
     {
       wanted = want_h8300h;
+      realregs = 10;
       switch (TARGET_ARCHITECTURE->mach)
        {
        case bfd_mach_h8300s:
@@ -917,13 +920,14 @@ e7000_fetch_registers (void)
        case bfd_mach_h8300sx:
        case bfd_mach_h8300sxn:
          wanted = want_h8300s;
+         realregs = 11;
        }
     }
 
   fetch_regs_from_dump (gch, wanted);
 
   /* And supply the extra ones the simulator uses */
-  for (regno = NUM_REALREGS; regno < NUM_REGS; regno++)
+  for (regno = realregs; regno < NUM_REGS; regno++)
     {
       int buf = 0;
 
@@ -946,8 +950,18 @@ static void
 e7000_store_registers (void)
 {
   int regno;
+  int realregs = 0;
 
-  for (regno = 0; regno < NUM_REALREGS; regno++)
+  if (TARGET_ARCHITECTURE->arch == bfd_arch_sh)
+    realregs = 59;
+  if (TARGET_ARCHITECTURE->arch == bfd_arch_h8300) {
+    realregs = ((TARGET_ARCHITECTURE->mach == bfd_mach_h8300s ||
+                TARGET_ARCHITECTURE->mach == bfd_mach_h8300sn ||
+                TARGET_ARCHITECTURE->mach == bfd_mach_h8300sx ||
+                TARGET_ARCHITECTURE->mach == bfd_mach_h8300sxn) ? 11 : 10);
+  }
+
+  for (regno = 0; regno < realregs; regno++)
     e7000_store_register (regno);
 
   registers_changed ();
@@ -1464,7 +1478,7 @@ fast_but_for_the_pause_e7000_read_inferior_memory (CORE_ADDR memaddr,
    Returns the number of bytes transferred. */
 
 static int
-e7000_xfer_inferior_memory (CORE_ADDR memaddr, char *myaddr, int len,
+e7000_xfer_inferior_memory (CORE_ADDR memaddr, gdb_byte *myaddr, int len,
                            int write, struct mem_attrib *attrib,
                            struct target_ops *target)
 {
@@ -1688,7 +1702,7 @@ static CORE_ADDR breakaddr[MAX_BREAKPOINTS] =
 {0};
 
 static int
-e7000_insert_breakpoint (CORE_ADDR addr, char *shadow)
+e7000_insert_breakpoint (CORE_ADDR addr, bfd_byte *shadow)
 {
   int i;
   char buf[200];
@@ -1731,7 +1745,7 @@ e7000_insert_breakpoint (CORE_ADDR addr, char *shadow)
 }
 
 static int
-e7000_remove_breakpoint (CORE_ADDR addr, char *shadow)
+e7000_remove_breakpoint (CORE_ADDR addr, bfd_byte *shadow)
 {
   int i;
   char buf[200];
@@ -1998,6 +2012,7 @@ e7000_wait (ptid_t ptid, struct target_waitstatus *status)
   int had_sleep = 0;
   int loop = 1;
   char *wanted_nopc = NULL;
+  int realregs = 0;
 
   /* Then echo chars until PC= string seen */
   gch ();                      /* Drop cr */
@@ -2039,6 +2054,7 @@ e7000_wait (ptid_t ptid, struct target_waitstatus *status)
   if (TARGET_ARCHITECTURE->arch == bfd_arch_sh)
     {
       wanted_nopc = want_nopc_sh;
+      realregs = 59;
       switch (TARGET_ARCHITECTURE->mach)
        {
        case bfd_mach_sh3:
@@ -2050,6 +2066,7 @@ e7000_wait (ptid_t ptid, struct target_waitstatus *status)
   if (TARGET_ARCHITECTURE->arch == bfd_arch_h8300)
     {
       wanted_nopc = want_nopc_h8300h;
+      realregs = 10;
       switch (TARGET_ARCHITECTURE->mach)
        {
        case bfd_mach_h8300s:
@@ -2057,12 +2074,13 @@ e7000_wait (ptid_t ptid, struct target_waitstatus *status)
        case bfd_mach_h8300sx:
        case bfd_mach_h8300sxn:
          wanted_nopc = want_nopc_h8300s;
+         realregs = 11;
        }
     }
   fetch_regs_from_dump (gch, wanted_nopc);
 
   /* And supply the extra ones the simulator uses */
-  for (regno = NUM_REALREGS; regno < NUM_REGS; regno++)
+  for (regno = realregs; regno < NUM_REGS; regno++)
     {
       int buf = 0;
       regcache_raw_supply (current_regcache, regno, (char *) &buf);
@@ -2112,7 +2130,7 @@ e7000_wait (ptid_t ptid, struct target_waitstatus *status)
       break;
     default:
       /* Get the user's attention - this should never happen. */
-      internal_error (__FILE__, __LINE__, "failed internal consistency check");
+      internal_error (__FILE__, __LINE__, _("failed internal consistency check"));
     }
 
   return inferior_ptid;
@@ -2178,20 +2196,22 @@ _initialize_remote_e7000 (void)
   add_target (&e7000_ops);
 
   add_com ("e7000", class_obscure, e7000_command,
-          "Send a command to the e7000 monitor.");
+          _("Send a command to the e7000 monitor."));
 
   add_com ("ftplogin", class_obscure, e7000_login_command,
-          "Login to machine and change to directory.");
+          _("Login to machine and change to directory."));
 
   add_com ("ftpload", class_obscure, e7000_ftp_command,
-          "Fetch and load a file from previously described place.");
+          _("Fetch and load a file from previously described place."));
 
   add_com ("drain", class_obscure, e7000_drain_command,
-          "Drain pending e7000 text buffers.");
-
-  deprecated_add_show_from_set
-    (add_set_cmd ("usehardbreakpoints", no_class,
-                 var_integer, (char *) &use_hard_breakpoints, "\
-Set use of hardware breakpoints for all breakpoints.\n", &setlist),
-     &showlist);
+          _("Drain pending e7000 text buffers."));
+
+  add_setshow_integer_cmd ("usehardbreakpoints", no_class,
+                          &use_hard_breakpoints, _("\
+Set use of hardware breakpoints for all breakpoints."), _("\
+Show use of hardware breakpoints for all breakpoints."), NULL,
+                          NULL,
+                          NULL, /* FIXME: i18n: */
+                          &setlist, &showlist);
 }
This page took 0.026958 seconds and 4 git commands to generate.