- add_com ("mem", class_vars, mem_command,
- "Define attributes for memory region.\n\
-Usage: 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");
-
- add_cmd ("mem", class_vars, mem_enable_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);
-
- add_cmd ("mem", class_vars, mem_disable_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);
-
- add_cmd ("mem", class_vars, mem_delete_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);
-
- add_info ("mem", mem_info_command,
- "Memory region attributes");
+ add_com ("mem", class_vars, mem_command, _("\
+Define attributes for memory region or reset memory region handling to "
+"target-based.\n\
+Usage: mem auto\n\
+ 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 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 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 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."));
+
+ add_prefix_cmd ("mem", class_vars, dummy_cmd, _("\
+Memory regions settings."),
+ &mem_set_cmdlist, "set mem ",
+ 0/* allow-unknown */, &setlist);
+ add_prefix_cmd ("mem", class_vars, dummy_cmd, _("\
+Memory regions settings."),
+ &mem_show_cmdlist, "show mem ",
+ 0/* allow-unknown */, &showlist);
+
+ add_setshow_boolean_cmd ("inaccessible-by-default", no_class,
+ &inaccessible_by_default, _("\
+Set handling of unknown memory regions."), _("\
+Show handling of unknown memory regions."), _("\
+If on, and some memory map is defined, debugger will emit errors on\n\
+accesses to memory not defined in the memory map. If off, accesses to all\n\
+memory addresses will be allowed."),
+ NULL,
+ show_inaccessible_by_default,
+ &mem_set_cmdlist,
+ &mem_show_cmdlist);