Fix amd64->i386 linux syscall restart problem
[deliverable/binutils-gdb.git] / gdb / memattr.c
index 04986646db88b5a7325ab1292c9aae3e797138e2..858a41abfb423ac66c1d4f3343682e23b1e62d33 100644 (file)
@@ -1,6 +1,6 @@
 /* Memory attributes support, for GDB.
 
-   Copyright (C) 2001-2017 Free Software Foundation, Inc.
+   Copyright (C) 2001-2019 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -25,7 +25,7 @@
 #include "target-dcache.h"
 #include "value.h"
 #include "language.h"
-#include "vec.h"
+#include "common/vec.h"
 #include "breakpoint.h"
 #include "cli/cli-utils.h"
 #include <algorithm>
@@ -74,9 +74,6 @@ show_inaccessible_by_default (struct ui_file *file, int from_tty,
 static void
 require_user_regions (int from_tty)
 {
-  struct mem_region *m;
-  int ix, length;
-
   /* If we're already using a user-provided list, nothing to do.  */
   if (!mem_use_target ())
     return;
@@ -166,10 +163,8 @@ struct mem_region *
 lookup_mem_region (CORE_ADDR addr)
 {
   static struct mem_region region (0, 0);
-  struct mem_region *m;
   CORE_ADDR lo;
   CORE_ADDR hi;
-  int ix;
 
   require_target_regions ();
 
@@ -341,7 +336,7 @@ mem_command (const char *args, int from_tty)
 \f
 
 static void
-info_mem_command (char *args, int from_tty)
+info_mem_command (const char *args, int from_tty)
 {
   if (mem_use_target ())
     printf_filtered (_("Using memory regions provided by the target.\n"));
@@ -464,8 +459,6 @@ info_mem_command (char *args, int from_tty)
 #endif
 
       printf_filtered ("\n");
-
-      gdb_flush (gdb_stdout);
     }
 }
 \f
@@ -531,9 +524,6 @@ disable_mem_command (const char *args, int from_tty)
 
   if (args == NULL || *args == '\0')
     {
-      struct mem_region *m;
-      int ix;
-
       for (mem_region &m : *mem_region_list)
        m.enabled_p = false;
     }
@@ -553,9 +543,6 @@ disable_mem_command (const char *args, int from_tty)
 static void
 mem_delete (int num)
 {
-  struct mem_region *m;
-  int ix;
-
   if (!mem_region_list)
     {
       printf_unfiltered (_("No memory region number %d.\n"), num);
@@ -614,28 +601,28 @@ _initialize_mem (void)
 Define attributes for memory region or reset memory region handling to\n\
 target-based.\n\
 Usage: mem auto\n\
-       mem <lo addr> <hi addr> [<mode> <width> <cache>],\n\
-where <mode>  may be rw (read/write), ro (read-only) or wo (write-only),\n\
-      <width> may be 8, 16, 32, or 64, and\n\
-      <cache> may be cache or nocache"));
+       mem LOW HIGH [MODE WIDTH CACHE],\n\
+where MODE  may be rw (read/write), ro (read-only) or wo (write-only),\n\
+      WIDTH may be 8, 16, 32, or 64, and\n\
+      CACHE may be cache or nocache"));
 
   add_cmd ("mem", class_vars, enable_mem_command, _("\
 Enable memory region.\n\
-Arguments are the code numbers of the memory regions to enable.\n\
-Usage: enable mem <code number>...\n\
-Do \"info mem\" to see current list of code numbers."), &enablelist);
+Arguments are the IDs of the memory regions to enable.\n\
+Usage: enable mem [ID]...\n\
+Do \"info mem\" to see current list of IDs."), &enablelist);
 
   add_cmd ("mem", class_vars, disable_mem_command, _("\
 Disable memory region.\n\
-Arguments are the code numbers of the memory regions to disable.\n\
-Usage: disable mem <code number>...\n\
-Do \"info mem\" to see current list of code numbers."), &disablelist);
+Arguments are the IDs of the memory regions to disable.\n\
+Usage: disable mem [ID]...\n\
+Do \"info mem\" to see current list of IDs."), &disablelist);
 
   add_cmd ("mem", class_vars, delete_mem_command, _("\
 Delete memory region.\n\
-Arguments are the code numbers of the memory regions to delete.\n\
-Usage: delete mem <code number>...\n\
-Do \"info mem\" to see current list of code numbers."), &deletelist);
+Arguments are the IDs of the memory regions to delete.\n\
+Usage: delete mem [ID]...\n\
+Do \"info mem\" to see current list of IDs."), &deletelist);
 
   add_info ("mem", info_mem_command,
            _("Memory region attributes"));
This page took 0.025075 seconds and 4 git commands to generate.