[PATCH 41/57][Arm][OBJDUMP] Add support for MVE instructions: vld[24] and vst[24]
[binutils-gdb.git] / gdb / maint.c
index 04b4473e31823b285a4e27b60a18a64ee7560f3e..328d6026a341c95798d295f786812b279e7e3c98 100644 (file)
@@ -38,7 +38,7 @@
 #include "value.h"
 #include "top.h"
 #include "maint.h"
-#include "selftest.h"
+#include "common/selftest.h"
 
 #include "cli/cli-decode.h"
 #include "cli/cli-utils.h"
 
 static void maintenance_do_deprecate (const char *, int);
 
-/* Set this to the maximum number of seconds to wait instead of waiting forever
-   in target_wait().  If this timer times out, then it generates an error and
-   the command is aborted.  This replaces most of the need for timeouts in the
-   GDB test suite, and makes it possible to distinguish between a hung target
-   and one with slow communications.  */
-
-int watchdog = 0;
-static void
-show_watchdog (struct ui_file *file, int from_tty,
-              struct cmd_list_element *c, const char *value)
-{
-  fprintf_filtered (file, _("Watchdog timer is %s.\n"), value);
-}
-
 /* Access the maintenance subcommands.  */
 
 static void
@@ -357,7 +343,7 @@ maintenance_info_sections (const char *arg, int from_tty)
          if (strcmp (arg, "ALLOBJ") == 0)
            arg = NULL;
 
-         for (objfile *ofile : all_objfiles (current_program_space))
+         for (objfile *ofile : current_program_space->objfiles ())
            {
              printf_filtered (_("  Object file: %s\n"), 
                               bfd_get_filename (ofile->obfd));
@@ -430,7 +416,6 @@ maintenance_translate_address (const char *arg, int from_tty)
   struct obj_section *sect;
   const char *p;
   struct bound_minimal_symbol sym;
-  struct objfile *objfile;
 
   if (arg == NULL || *arg == 0)
     error (_("requires argument (address or section + address)"));
@@ -448,14 +433,15 @@ maintenance_translate_address (const char *arg, int from_tty)
       int arg_len = p - arg;
       p = skip_spaces (p + 1);
 
-      ALL_OBJSECTIONS (objfile, sect)
-      {
-       if (strncmp (sect->the_bfd_section->name, arg, arg_len) == 0)
-         break;
-      }
+      for (objfile *objfile : current_program_space->objfiles ())
+       ALL_OBJFILE_OSECTIONS (objfile, sect)
+         {
+           if (strncmp (sect->the_bfd_section->name, arg, arg_len) == 0)
+             goto found;
+         }
 
-      if (!objfile)
-       error (_("Unknown section %s."), arg);
+      error (_("Unknown section %s."), arg);
+    found: ;
     }
 
   address = parse_and_eval_address (p);
@@ -771,9 +757,9 @@ count_symtabs_and_blocks (int *nr_symtabs_ptr, int *nr_compunit_symtabs_ptr,
      current_program_space may be NULL.  */
   if (current_program_space != NULL)
     {
-      for (objfile *o : all_objfiles (current_program_space))
+      for (objfile *o : current_program_space->objfiles ())
        {
-         for (compunit_symtab *cu : objfile_compunits (o))
+         for (compunit_symtab *cu : o->compunits ())
            {
              ++nr_compunit_symtabs;
              nr_blocks += BLOCKVECTOR_NBLOCKS (COMPUNIT_BLOCKVECTOR (cu));
@@ -1148,16 +1134,6 @@ If a filter is given, only the tests with that value in their name will ran."),
   add_cmd ("selftests", class_maintenance, maintenance_info_selftests,
         _("List the registered selftests."), &maintenanceinfolist);
 
-  add_setshow_zinteger_cmd ("watchdog", class_maintenance, &watchdog, _("\
-Set watchdog timer."), _("\
-Show watchdog timer."), _("\
-When non-zero, this timeout is used instead of waiting forever for a target\n\
-to finish a low-level step or continue operation.  If the specified amount\n\
-of time passes without a response from the target, an error occurs."),
-                           NULL,
-                           show_watchdog,
-                           &setlist, &showlist);
-
   add_setshow_boolean_cmd ("profile", class_maintenance,
                           &maintenance_profile_p, _("\
 Set internal profiling."), _("\