diff options
Diffstat (limited to 'gdb/memattr.c')
-rw-r--r-- | gdb/memattr.c | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/gdb/memattr.c b/gdb/memattr.c index 735068e..9d26d31 100644 --- a/gdb/memattr.c +++ b/gdb/memattr.c @@ -1,6 +1,6 @@ /* Memory attributes support, for GDB. - Copyright (C) 2001-2024 Free Software Foundation, Inc. + Copyright (C) 2001-2025 Free Software Foundation, Inc. This file is part of GDB. @@ -19,6 +19,7 @@ #include "command.h" #include "cli/cli-cmds.h" +#include "cli/cli-style.h" #include "memattr.h" #include "target.h" #include "target-dcache.h" @@ -91,7 +92,8 @@ require_user_regions (int from_tty) /* Otherwise, let the user know how to get back. */ if (from_tty) warning (_("Switching to manual control of memory regions; use " - "\"mem auto\" to fetch regions from the target again.")); + "\"%ps\" to fetch regions from the target again."), + styled_string (command_style.style (), "mem auto")); /* And create a new list (copy of the target-supplied regions) for the user to modify. */ @@ -134,7 +136,7 @@ create_user_mem_region (CORE_ADDR lo, CORE_ADDR hi, int ix = std::distance (user_mem_region_list.begin (), it); /* Check for an overlapping memory region. We only need to check - in the vincinity - at most one before and one after the + in the vicinity - at most one before and one after the insertion point. */ for (int i = ix - 1; i < ix + 1; i++) { @@ -590,13 +592,10 @@ delete_mem_command (const char *args, int from_tty) static struct cmd_list_element *mem_set_cmdlist; static struct cmd_list_element *mem_show_cmdlist; -void _initialize_mem (); -void -_initialize_mem () +INIT_GDB_FILE (mem) { add_com ("mem", class_vars, mem_command, _("\ -Define attributes for memory region or reset memory region handling to " -"target-based.\n\ +Define or reset attributes for memory regions.\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\ |