*** empty log message ***
[deliverable/binutils-gdb.git] / gdb / infcmd.c
index a1a64c0572cf609c31159a5fd6c33336cb3187c5..59602e04655cf3640296df3225227eaf55d3b66f 100644 (file)
@@ -406,6 +406,9 @@ tty_command (char *file, int from_tty)
 void
 post_create_inferior (struct target_ops *target, int from_tty)
 {
+  /* Be sure we own the terminal in case write operations are performed.  */ 
+  target_terminal_ours ();
+
   /* If the target hasn't taken care of this already, do it now.
      Targets which need to access registers during to_open,
      to_create_inferior, or to_attach should do it earlier; but many
@@ -1596,7 +1599,8 @@ default_print_registers_info (struct gdbarch *gdbarch,
                              int regnum, int print_all)
 {
   int i;
-  const int numregs = NUM_REGS + NUM_PSEUDO_REGS;
+  const int numregs = gdbarch_num_regs (current_gdbarch)
+                     + gdbarch_num_pseudo_regs (current_gdbarch);
   gdb_byte buffer[MAX_REGISTER_SIZE];
 
   for (i = 0; i < numregs; i++)
@@ -1624,11 +1628,13 @@ default_print_registers_info (struct gdbarch *gdbarch,
 
       /* If the register name is empty, it is undefined for this
          processor, so don't display anything.  */
-      if (REGISTER_NAME (i) == NULL || *(REGISTER_NAME (i)) == '\0')
+      if (gdbarch_register_name (current_gdbarch, i) == NULL
+         || *(gdbarch_register_name (current_gdbarch, i)) == '\0')
        continue;
 
-      fputs_filtered (REGISTER_NAME (i), file);
-      print_spaces_filtered (15 - strlen (REGISTER_NAME (i)), file);
+      fputs_filtered (gdbarch_register_name (current_gdbarch, i), file);
+      print_spaces_filtered (15 - strlen (gdbarch_register_name
+                                         (current_gdbarch, i)), file);
 
       /* Get the data in raw format.  */
       if (! frame_register_read (frame, i, buffer))
@@ -1650,7 +1656,7 @@ default_print_registers_info (struct gdbarch *gdbarch,
          for (j = 0; j < register_size (current_gdbarch, i); j++)
            {
              int idx;
-             if (TARGET_BYTE_ORDER == BFD_ENDIAN_BIG)
+             if (gdbarch_byte_order (current_gdbarch) == BFD_ENDIAN_BIG)
                idx = j;
              else
                idx = register_size (current_gdbarch, i) - 1 - j;
@@ -1740,7 +1746,8 @@ registers_info (char *addr_exp, int fpregs)
        int regnum = strtol (start, &endptr, 0);
        if (endptr == end
            && regnum >= 0
-           && regnum < NUM_REGS + NUM_PSEUDO_REGS)
+           && regnum < gdbarch_num_regs (current_gdbarch)
+                       + gdbarch_num_pseudo_regs (current_gdbarch))
          {
            gdbarch_print_registers_info (current_gdbarch, gdb_stdout,
                                          frame, regnum, fpregs);
@@ -1764,7 +1771,10 @@ registers_info (char *addr_exp, int fpregs)
        if (group != NULL)
          {
            int regnum;
-           for (regnum = 0; regnum < NUM_REGS + NUM_PSEUDO_REGS; regnum++)
+           for (regnum = 0;
+                regnum < gdbarch_num_regs (current_gdbarch)
+                         + gdbarch_num_pseudo_regs (current_gdbarch);
+                regnum++)
              {
                if (gdbarch_register_reggroup_p (current_gdbarch, regnum,
                                                 group))
@@ -1804,7 +1814,10 @@ print_vector_info (struct gdbarch *gdbarch, struct ui_file *file,
       int regnum;
       int printed_something = 0;
 
-      for (regnum = 0; regnum < NUM_REGS + NUM_PSEUDO_REGS; regnum++)
+      for (regnum = 0;
+          regnum < gdbarch_num_regs (current_gdbarch)
+                   + gdbarch_num_pseudo_regs (current_gdbarch);
+          regnum++)
        {
          if (gdbarch_register_reggroup_p (gdbarch, regnum, vector_reggroup))
            {
@@ -2021,7 +2034,10 @@ print_float_info (struct gdbarch *gdbarch, struct ui_file *file,
       int regnum;
       int printed_something = 0;
 
-      for (regnum = 0; regnum < NUM_REGS + NUM_PSEUDO_REGS; regnum++)
+      for (regnum = 0;
+          regnum < gdbarch_num_regs (current_gdbarch)
+                   + gdbarch_num_pseudo_regs (current_gdbarch);
+          regnum++)
        {
          if (gdbarch_register_reggroup_p (gdbarch, regnum, float_reggroup))
            {
This page took 0.023989 seconds and 4 git commands to generate.